summaryrefslogtreecommitdiff
path: root/src/flake8/defaults.py
Commit message (Collapse)AuthorAgeFilesLines
* Add indent-size optionvalentin2021-03-141-0/+1
|
* fix a few small spelling issuesAnthony Sottile2020-09-201-1/+1
| | | | found via `pre-commit try-repo https://github.com/codespell-project/codespell --all-files`
* This PR addresses issue #549 (noqa does only work as intended with single ↵Markus Piotrowski2019-06-161-1/+1
| | | | | letter error codes). A single change in the regex `NOQA_INLINE_REGEXP` in `defaults.py` will allow to catch error codes which consist of more than one letter. This will close #549.
* Fix noqa example comment [ci skip]Anthony Sottile2018-12-271-1/+1
|
* Add link to regex101 for noqa regexTomer Keren2018-12-271-0/+1
| | | | This provides a step by step doc for the regular expression, and makes iterating on it much easier
* Update regex to allow no space noqaTomer Keren2018-12-271-1/+3
|
* Clearer docs, NOQA_INLINE_REGEXP comment - fixes #469Jesaja Everling2018-10-281-1/+1
|
* Use black to reformat Flake8Ian Stapleton Cordasco2018-10-201-30/+17
| | | | | Instead of just using Flake8 and pylint to keep Flake8 clean, let's also use black to make it less manual for clean-up.
* Fix "invalid escape sequence" when running with -WerrorAnthony Sottile2018-06-181-1/+1
| | | | | | | | | | | ``` $ python3.7 -Werror Python 3.7.0rc1 (default, Jun 16 2018, 03:32:08) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '# noqa(?:: (?P<codes>([A-Z][0-9]+(?:[,\s]+)?)+))?' File "<stdin>", line 1 SyntaxError: invalid escape sequence \s ```
* Allow spaces in # noqa listsIan Stapleton Cordasco2017-07-281-1/+1
| | | | | | | To match our new configuration file format and its allowance for spaces in the list Closes #356
* Clean up some uses of set, list, and dictJon Dufresne2017-05-131-1/+1
| | | | | | * Use set literals instead of set([...]) * Avoid list(sorted(...)) as sorted returns a list * Replace dict() with dict literal
* Fix subtle reporting bug for default on pluginsIan Cordasco2016-11-151-3/+22
| | | | | | | | | | | When we refactored our decision process to fix #239, we broke a subtle corner case where extensions that are not off-by-default are to be reported. This further refactors that logic and adds specific tests around it to ensure it works as expected and doesn't regress. Closes #257
* Match noqa for users with explanationsbug/178Ian Cordasco2016-07-281-1/+1
| | | | | | | | 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
* Fix handling of logical lines with noqaIan Cordasco2016-07-261-0/+17
| | | | | | | | | | | 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
* Update defaultsIan Cordasco2016-06-301-2/+2
| | | | McCabe reports C90* not C* and Flake8 2 used to exclude .eggs and *.egg
* Move flake8 into srcIan Cordasco2016-06-251-0/+17
This is an emerging best practice and there is little reason to not follow it