summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Match noqa for users with explanationsbug/178Ian Cordasco2016-07-284-1/+13
| | | | | | | | This makes the regular expression a bit more complex, and potentially slower, but it will fix the issue where users had noqa comments with colons followed by explanations. Closes #178
* Handle AttributeErrors during parameter aggregationIan Cordasco2016-07-272-5/+41
| | | | | | | | | Plugins do not have their parameters checked in advance, so when we try to aggregate parameters for a plugin, there's a chance it may request an attribute of the FileProcessor that simply does not exist. We catch this and re-raise it but we should also capture it in the checker manager and handle it appropriately there as well.
* Merge branch 'fix-mp-win-3.0' into 'master' Ian Cordasco2016-07-271-8/+11
|\ | | | | | | | | | | | | | | | | | | | | Fix multiprocessing on Windows *Related to:* #184 I'm still running into #179 with this fix but all processes start now at least. BTW the current design is pretty bad regarding memory footprint and bootstrap time as you have to pickle the manager object for *every* subprocess. So this does not only fix multiprocessing on Windows. It improves the multiprocessing design on other platforms, too. See merge request !97
| * Fix multiprocessing on Windowsschlamar2016-07-271-8/+11
| |
* | Merge branch 'read_lines_crlf' into 'master' Ian Cordasco2016-07-271-1/+2
|\ \ | | | | | | | | | | | | | | | | | | Fix read_lines_splits_lines test for CRLF endings This change makes the test pass for when files are saved with CRLF Windows-style line endings since those are included in various `.readlines()` methods by default. See merge request !96
| * | Fix read_lines_splits_lines test for CRLF endingsFichteFoll2016-07-271-1/+2
| | |
* | | Merge branch '_job_count_rettype' into 'master' Ian Cordasco2016-07-271-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | _job_count always returns an int Trivial change, but `_job_count` always returns an `int`. See merge request !95
| * | _job_count always returns an intFichteFoll2016-07-271-1/+1
| |/
* | Ensure we're only on Python 2.7Ian Cordasco2016-07-261-1/+1
| | | | | | | | | | As FichteFoll pointed out on IRC, this line could include Python 3s less than 3.2 as well.
* | Update version and release notes for 3.0.23.0.2Ian Cordasco2016-07-262-3/+3
| |
* | Make the documentation very obviousIan Cordasco2016-07-261-2/+17
| |
* | Merge branch 'entry-point' into 'master' Ian Cordasco2016-07-271-1/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify what the X in the entry points does *Description of changes* Previously the `X` wasn't further explained in the documentation on how to register a plugin. This plugs the hole at least for checking plugins. *Related to:* #183 See merge request !93
| * | Clarify what the X in the entry points doesFabian Neundorf2016-07-261-1/+5
| | | | | | | | | | | | | | | | | | | | | Previously the `X` wasn't further explained in the documentation on how to register a plugin. This plugs the hole at least for checking plugins. See also: #183
* | | Fix handling of logical lines with noqaIan Cordasco2016-07-265-24/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When attempting to centralize all inline NoQA handling in the StyleGuide we inadvertently broke plugins relying on it in combination with checker state. For example, the check for E402 relies both on NoQA and the state to determine if it has seen a non-import line. Placing NoQA on the sole line that is not an import is more elegant than placing it on each of the following import lines. Closes #186
* | | Fix zero-indexed column numberingIan Cordasco2016-07-265-4/+11
| |/ |/| | | | | | | We accidentally changed column numbering from one-indexed to zero-indexed.
* | Merge branch 'uncap-flake8' into 'master' Ian Cordasco2016-07-261-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update our flake8 testenv dependencies *Description of changes* Uncap Flake8 and add a lower bound to flake8-import-order *Related to:* N/A See merge request !94
| * | Update our flake8 testenv dependencies uncap-flake8Ian Cordasco2016-07-261-2/+2
|/ / | | | | | | We had capped Flake8 until flake8-import-order created a new release. We can now add a lower bound to flake8-import-order and uncap Flake8.
* | Move the unreleased note to the right versionIan Cordasco2016-07-262-4/+4
|/
* Merge branch 'bug/181' into 'master' Ian Cordasco2016-07-265-27/+22
|\ | | | | | | | | | | | | | | | | | | | | Fix project config file discovery *Description of changes* Keep searching past the current directory to find project config files. *Related to:* #181 See merge request !91
| * Fix project config file discoveryIan Cordasco2016-07-265-27/+22
|/ | | | | | | | | Flake8 3.0 was stopping once it found the current directory but the historical behaviour (that we didn't intend to break) searched past that (towards root) until it found one of the project/local config file names that could be read. Closes #181
* Update NOQA regular expressionIan Cordasco2016-07-262-1/+4
| | | | | | This allows for other text after `# noqa`. Related to #180
* Add release notes for 3.0.13.0.1Ian Cordasco2016-07-251-0/+9
|
* Merge branch 'bug/180' into 'master' Ian Cordasco2016-07-264-2/+36
|\ | | | | | | | | | | | | | | | | | | | | Handle repeated --quiet options again *Description of changes* Handle `-q`/`--quiet` again. *Related to:* #180 See merge request !89
| * Handle repeated --quiet options againIan Cordasco2016-07-254-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | Fundamentally on Flake8 2.x using -q altered the format of the errors (and the behaviour a little) so it makes the most sense to implement this logic with formatters rather than messy logic spread throughout the project. The FilenameOnly formatter will keep track of filenames already reported and only print the name once while Nothing will print nothing. Closes #180
* | Merge branch 'bug/180' into 'master' Ian Cordasco2016-07-253-0/+31
|\ \ | |/ | | | | | | | | | | | | | | | | | | Wire-up --statistics again *Description of changes* Make `--statistics` work again *Related to:* #180 See merge request !87
| * Wire-up --statistics againbug/180Ian Cordasco2016-07-253-0/+31
| | | | | | | | | | | | | | I'm not sure where this code went or when, but it disappeared. Let's add it back. Related #180
* | Merge branch 'bug/output-file' into 'master' Ian Cordasco2016-07-251-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set-up and stop our formatter *Description of changes* Make `--output-file` work consistently (especially without verbose logging) *Related to:* #180 See merge request !86
| * | Set-up and stop our formatterbug/output-fileIan Cordasco2016-07-251-0/+2
| |/ | | | | | | | | | | | | Without calling start and stop, our output file is not used by our Formatters and any formatting plugins. Related #180
* | Merge branch 'file-plugin-docs' into 'master' Ian Cordasco2016-07-251-4/+11
|\ \ | |/ |/| | | | | | | | | Update documentation to separate parameter types This is the documentation update separated from !80 which should be pretty uncontroversial. I already applied the comment on the documentation here. See merge request !83
| * Update documentation to separate parameter typesFabian Neundorf2016-07-251-4/+11
| | | | | | | | | | | | It updates the documentation to separate which parameters are static and which are changed on each line. Using the latter parameters on plugins which are only run once per file isn't very sensible.
* | Merge branch 'bug/177' into 'master' Ian Cordasco2016-07-254-6/+19
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Handle multiline strings with '# noqa' *Description of changes* I had overlooked a usecase of Flake8 where people use `# noqa` at the end of a multi-line string. This addresses that oversight *Related to:* #177 See merge request !85
| * Handle multiline strings with '# noqa'Ian Cordasco2016-07-254-6/+19
|/ | | | | | | | | In Flake8 2.x we allowed people to use # noqa at the end of a multiline string to ignore errors inside the string (e.g., E501). Being blissfully ignorant of this, I never accounted for it in Flake8 3. This fixes the oversight and allows multiline statements to have the # noqa at the end. Closes #177
* Merge branch 'unbreak-builds' into 'master' Ian Cordasco2016-07-251-1/+1
|\ | | | | | | | | | | | | | | | | Force flake8 test to below 3.x The current version (0.8) of `flake8-import-order` still uses `parser.config_options` and so all builds fail because it installs Flake8 3.x. Now the repository of that plugin already accounted for that but as long as it isn't released it'll cause all new builds to fail. Alternatively I can repurpose this merge request to actually enforce a newer version of `flake8-import-order` which supports Flake8 3.x. See merge request !84
| * Force flake8 test to below 3.xFabian Neundorf2016-07-251-1/+1
|/ | | | | Because flake8-import-order does not support Flake8 3.x yet, we need to force a Flake8 version that is supported.
* Update release notes and version string for 3.03.0.0Ian Cordasco2016-07-242-19/+7
|
* Merge branch 'run-functions'Ian Cordasco2016-07-242-5/+85
|\
| * Relocate integration style checker testsIan Cordasco2016-07-242-73/+79
| |
| * Support functions as file plugins tooFabian Neundorf2016-07-242-6/+80
|/ | | | | | | | | | | It is possible to write plugins which are only a function. At the moment they are called on each line manually. This allows the function also to be called on each file once. It works similar to creating the class and calling `run` on it immediately. The plugin function needs to return a generator. This is based on the original comment in the `FileChecker.run_ast_checks` method, but slightly modified as the original comment would've called the return of the function. But the function could return the reports directly.
* Merge branch 'windows-bugs' into 'master' Ian Cordasco2016-07-222-5/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for both os.path.sep and os.path.altsep *Description of changes* When normalizing paths, we want to handle the following cases: - Someone is using a Windows-style path on Windows - Someone is using a Unix style path on Unix - Someone is using a Unix style path on Windows os.path.sep will handle the native directory separator character while os.path.altsep (when set) will handle alternate separators. Further, os.path.abspath does the right thing on Windows when handed a Unix-style path. *Related to:* #175 See merge request !81
| * Check for alternate_separator only when truthyIan Cordasco2016-07-222-2/+3
| | | | | | | | | | | | | | In the case where alternate separator is None, we use '' which will always be in any string. We want to skip that case. Also we only run our tests on AppVeyor, not all of our testenvs.
| * Check for both os.path.sep and os.path.altsepIan Cordasco2016-07-221-4/+7
|/ | | | | | | | | | | | | | | When normalizing paths, we want to handle the following cases: - Someone is using a Windows-style path on Windows - Someone is using a Unix style path on Unix - Someone is using a Unix style path on Windows os.path.sep will handle the native directory separator character while os.path.altsep (when set) will handle alternate separators. Further, os.path.abspath does the right thing on Windows when handed a Unix-style path. Related to #175
* Add AppVeyor config fileIan Cordasco2016-07-221-0/+8
| | | | Closes #174
* Merge branch 'fix-typo-indect' into 'master' Ian Cordasco2016-07-212-2/+2
|\ | | | | | | | | | | | | Fix typo in documentation using `indect` Found this typo while working through the source code. See merge request !79
| * Fix typo in documentation using `indect`Fabian Neundorf2016-07-212-2/+2
|/ | | | | | The documentation for the `FileProcessor` class used `indect_char` while the class itself uses the more sensible name `indent_char`. This updates both the docstring as well as the documentation.
* Merge branch 'pr/78'Ian Cordasco2016-07-207-65/+119
|\ | | | | | | Closes #78
| * Fix up merge request 78Ian Cordasco2016-07-205-45/+54
| | | | | | | | | | | | | | | | This simplifies the changes, reduces the scope of refactors apparently for refactoring's sake and ensures that the internals are reasonable. It also airs on the side of preserving information rather than discarding or overwriting it.
| * Propagate the stdin_display_name to checker and processorLeonardo Rochael Almeida2016-07-205-15/+21
| | | | | | | | This way plugins like flake8-putty can have access to the correct filename.
| * Allow stdin and directly named files to be excluded from checkLeonardo Rochael Almeida2016-07-202-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For the sake of IDEs, check filename for exclusion even if the file is directly named in the command line. Also, if the filename is "-" (stdin) check the provided display name for exclusion. Also, avoid calling path checking functions on the "-" filename: * fnmatch.fnmatch() * os.path.isdir() * os.path.exists()
| * Merge branch 'document-polyfill' into 'master' Ian Cordasco2016-07-202-46/+78
| |\ |/ / | | | | | | | | | | | | | | | | | | | | | | Document flake8-polyfill in compatibility section *Description of changes* Document the existence and usage of the flake8-polyfill section. Closes: #158 Closes: #161 Closes: #167 See merge request !77
| * Trim trailing whitespace in compat docsIan Cordasco2016-07-201-1/+1
| |