summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Replace setuptools with entrypointsAnthony Sottile2018-11-055-79/+43
|
* Add tests for the expected behaviour of per-file-ignoresIan Stapleton Cordasco2018-10-271-0/+100
| | | | | These show that there were some subtle bugs in how we were matching things and that there are bugs that need to be fixed.
* Fixups after 3.6.0 releaseAnthony Sottile2018-10-231-12/+11
|
* Be explicit about the bytes put into test filesAnthony Sottile2018-10-231-5/+6
|
* Revert "Merge branch 'revert-63b91c95' into 'master'"Anthony Sottile2018-10-231-0/+26
| | | | | This reverts commit ba2fb9c53a8316642249598f599bbf7608d54260, reversing changes made to 63b91c95ea7795e3c3c90f2d643f685bfff312e9.
* Revert "Merge branch 'match_newlines_py3' into 'master'"Anthony Sottile2018-10-231-26/+0
| | | This reverts merge request !253
* Merge branch 'match_newlines_py3' into 'master'Anthony Sottile2018-10-231-0/+26
|\ | | | | | | | | | | | | Fix inconsistent newlines read from a file in python3 Closes #457 See merge request pycqa/flake8!253
| * Fix inconsistent newlines read from a file in python3Anthony Sottile2018-10-221-0/+26
| |
* | Fix collections ABCs deprecation warning.Jintao Zhang2018-10-231-2/+7
|/ | | | Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
* Fix up test files for W504Ian Stapleton Cordasco2018-10-203-15/+15
|
* Only skip a file if `# flake8: noqa` is on a line by itselfAnthony Sottile2018-07-011-0/+1
|
* Fix issue with pep8-namingIan Stapleton Cordasco2018-05-201-3/+3
|
* Add some extend_ignores into decision engine test casesVille Skyttä2018-05-201-44/+61
|
* Implement --extend-ignoreVille Skyttä2018-05-162-0/+2
| | | | Refs #365
* Merge branch '405-nonexisting-files' into 'master'Ian Stapleton Cordasco2018-04-152-0/+16
|\ | | | | | | | | | | | | Resolve "flake8 does not generate error when given a non-existent file on the command line" Closes #405 See merge request pycqa/flake8!227
| * Report error when non-exiting path is passed to flake8Avraham Shukron2018-02-212-0/+16
| |
* | Do better testing that we actually call run_serial().Craig Silverstein2018-03-021-2/+6
| |
* | Move all uses of `pool` inside `run_parallel()`.Craig Silverstein2018-03-021-2/+4
|/ | | | | | | | | | This includes creating the pool, tearing it down under normal use, and tearing it down in case of exception. Doing this makes it harder to leak processes, as for instance was happening in #410. Fixes #410
* Respect a formatter's newline setting when printingIan Stapleton Cordasco2017-12-311-4/+4
| | | | | | | In working on flake8-json, I noticed that setting newline was only helpful for writing to an ouput-file but not to standard-out. It makes sense for this setting to apply to both branches otherwise plugins need to override the method to get the behaviour they expect.
* Merge branch 'local-plugin-paths' into 'master'Ian Stapleton Cordasco2017-11-263-0/+30
|\ | | | | | | | | | | | | Add paths option in local-plugins config file. Closes #379 See merge request pycqa/flake8!211
| * Add paths option in local-plugins config file.Carl Meyer2017-10-243-0/+30
| |
* | Add pep8-naming to flake8 lintingIan Stapleton Cordasco2017-11-264-12/+12
| |
* | Fix-up new I202 violationsIan Stapleton Cordasco2017-11-261-1/+0
|/
* Fix failing encoding test on appveyorAnthony Sottile2017-10-191-2/+2
|
* Catch UnicodeDecodeError while parsing config filesAnthony Sottile2017-10-091-1/+12
|
* Allow our local plugin parsing to accept commasIan Stapleton Cordasco2017-08-091-0/+3
| | | | | By slightly modifying our utility function to parse comma separated lists we can parse local plugins similar to other configuration options.
* Update our plugin registration for debuggingIan Stapleton Cordasco2017-08-083-39/+45
| | | | | This allows us to report whether or not a plugin is local when users provide `flake8 --bug-report` output.
* Fix finding of local config files.Carl Meyer2017-08-071-0/+10
|
* Simplify application tests; remove unneeded mockingCarl Meyer2017-08-071-27/+22
|
* Append [local] to version of local plugins.Carl Meyer2017-08-061-0/+11
|
* Add support for local (in-repo, non-setuptools) plugins.Carl Meyer2017-08-0310-57/+186
| | | | Closes #357
* Allow spaces in # noqa listsIan Stapleton Cordasco2017-07-282-0/+2
| | | | | | | To match our new configuration file format and its allowance for spaces in the list Closes #356
* Remediate one wafer thing decision logic bugIan Stapleton Cordasco2017-07-281-4/+3
| | | | | | | | Previously we were hitting the catch-all return that decided the error was selected. Instead, let's add specific logic since we now know how we would hit that and we actually don't want it to be selected. Closes #354
* Reproduce quiet/verbose config problemShinya Kawaguchi2017-07-222-3/+23
|
* Add some better comments for decision logicIan Cordasco2017-06-041-1/+3
|
* Get *one* more line of test coverageIan Cordasco2017-06-041-0/+3
| | | | | | | This was mostly to prove to myself that we could possibly reach that return more than actually covering that return. This just shows how gnarly this logic actually is. I wish there were a better way to write it.
* Rename style_guide.Error to style_guide.ViolationIan Cordasco2017-06-046-52/+68
| | | | | Move all Violation related methods from the StyleGuide to our Violation class.
* Rename methods on the new DecisionEngineIan Cordasco2017-06-031-6/+7
| | | | | Rename `decision_for` to `more_specific_decision_for` and `should_report_error` to `decision_for`.
* Move unit tests for StyleGuide decision logicIan Cordasco2017-06-022-176/+178
| | | | | Convert it to test the DecisionEngine class directly and put them in their own file.
* Refactor decision logic into its own objectIan Cordasco2017-06-011-9/+3
| | | | | | | | | In dealing with the decision logic in the StyleGuide recently I recognized that the logic really doesn't belong strictly on the StyleGuide. A separate object makes perfect sense especially from the perspective of testability. This is a minor refactor intended solely to facilitate further testing and perhaps making the logic easier to understand for others.
* Add debugging utility for FileCheckerIan Cordasco2017-06-011-0/+9
|
* Merge branch 'bug/318' into 'master'Ian Cordasco2017-05-281-1/+20
|\ | | | | | | | | | | | | Further improve our handling of --select and --ignore Closes #318 See merge request !187
| * Simplify conditoinal in decision logicIan Cordasco2017-05-271-0/+2
| | | | | | | | | | Add test to cover branch of decision logic we were not previously exercising
| * Add extra test cases for violation decisionsIan Cordasco2017-05-271-0/+14
| |
| * Further refine our logic handling selectionIan Cordasco2017-05-271-1/+4
| | | | | | | | | | | | | | | | | | There was a *very* subtle bug in how we handle blanket select statements with error codes that are in our DEFAULT_IGNORE. In the specific case, users were specifying ``--select E`` and E126 was not being properly reported. This unveiled further logic bugs as we refined this. Closes #318
* | Prefer iter(dict) instead of dict.keys()Jon Dufresne2017-05-271-1/+1
|/ | | | | | | | | | They are equivalent for iterating so remove the additional function call. Pattern identified as outdated by Lennart Regebro's PyCon 2017 talk "Prehistoric Patterns in Python" https://www.youtube.com/watch?v=V5-JH23Vk0I
* Support spaces as error/ignore code separatorsIan Cordasco2017-05-251-0/+5
| | | | Closes #329
* Filter out empty ignore/select codesIan Cordasco2017-05-201-0/+5
| | | | | | | When we parse out our comma separated lists, we should ignore empty strings to avoid them breaking users' expectations. Closes #330
* Clean up some uses of set, list, and dictJon Dufresne2017-05-132-5/+5
| | | | | | * Use set literals instead of set([...]) * Avoid list(sorted(...)) as sorted returns a list * Replace dict() with dict literal
* Make formatting plugin logic easier to testIan Cordasco2017-05-131-20/+61
| | | | | | | | By splitting out the logic to retrieve and return the formatting class for an application, we can test it more easily and increase our test coverage of this critical logic. Refs #320