Anthony Sottile
b66ebd7034
move from optparse to argparse
2019-08-17 20:09:45 -07:00
Anthony Sottile
e8c79dcd33
Fix --show-source when indented with tabs
2019-08-10 11:37:01 -07:00
Eric N. Vander Weele
1757bce321
utils: Tighten parse_comma_separated_list() contract further
...
Now that callers are ensuring that `value` is not `None`, we can further
tighten the contract and remove the conditional to account when `None`
is passed-in for `value`.
Additionally, add a new test vector to account for when an empty string
is passed in, which would fail `if no value`.
2019-07-28 10:43:06 -04:00
Eric N. Vander Weele
1ba56b9056
utils: Change normalize_paths() contract
...
The `normalize_paths()` utility was doing too much — parsing
unstructured configuration path data and dispatching the scrubbed paths
to be normalized.
Towards moving the parsing of unstructured configuration path data
closer towards were configuration occurs, have the utility accept only
structured input for normalizing paths.
2019-07-28 10:43:06 -04:00
Eric N. Vander Weele
9283f2f03f
utils: Change parse_comma_separated_list() contract
...
This is the initial incision point to only accept `str` (or `None`) for
parsing out comma/whitespace/regexp separated values.
2019-07-28 10:43:02 -04:00
Anthony Sottile
d4b0073167
Fix / improve recently merged patches + CI
2019-07-08 14:22:51 -07:00
Thomas Grainger
9ba6677c4a
support extend-exclude Fixes #535
2019-07-08 20:12:47 +00:00
Anthony Sottile
0d7247082e
Merge branch 'master' into 'master'
...
Remove filter by filename in utils.filenames_from
Closes #382
See merge request pycqa/flake8!311
2019-07-08 20:11:25 +00:00
Markus Piotrowski
37964dbd84
Update test_violation.py
...
Added tests to check if long error codes are correctly identified.
2019-06-16 17:02:54 +00:00
Anthony Sottile
fb7e9338cd
mypy now passes
2019-05-19 17:31:04 -07:00
Anthony Sottile
dcd37ec3d4
whitelist a bandit false positive and improve type annotation
2019-05-19 09:39:14 -07:00
Yevhen Amelin
6fb49b2e80
Remove filter by filename in utils.filenames_from
2019-03-19 09:59:12 +02:00
Charles Frye
e9b9ebb58e
makes prelim_args test more explicit
2019-03-11 14:05:34 -07:00
Charles Frye
16ca17388a
Fixes handling of empty lists by Application
...
`Application.parse_preliminary_options_and_args` was previously, against
expectations, treating empty lists passed as the `argv` argument the
same way it treated `None`s.
This has been addressed and the correct behavior tested for in a unit
test of the `Application` class.
See issue #518 for details.
2019-03-07 20:27:59 -08:00
Anthony Sottile
e8de066f94
Ensure exceptions are pickleable
2019-02-19 08:38:37 -08:00
Anthony Sottile
e8f43e1243
Speed up flake8 when only 1 filename is passed
...
~40% improvement over status quo (perf measurements are best-of-5)
### before
```console
$ time flake8 /dev/null
real 0m0.337s
user 0m0.212s
sys 0m0.028s
```
### after
```console
$ time flake8 /dev/null
real 0m0.197s
user 0m0.182s
sys 0m0.012s
```
2019-02-17 00:15:00 -08:00
Илья Лебедев
8e99b531cf
FIX 507: allow multiple letters in codes
2019-02-11 17:00:34 +03:00
Anthony Sottile
8df38c92b9
Fix reporting of UndefinedLocal pyflakes error
2019-01-31 21:55:10 -08:00
Anthony Sottile
f955a98b71
Improve error message for malformed per-file-ignores
2019-01-30 19:33:54 -08:00
Anthony Sottile
b0ecf3d28f
Fix flake8 --statistics
2019-01-30 14:39:24 -08:00
Anthony Sottile
137b45ac2f
Fix legacy api invocation of make_notifier
2019-01-30 11:00:36 -08:00
Anthony Sottile
3579e4e198
Fix linters
2019-01-30 08:58:59 -08:00
Tomer Keren
a4f5447fc8
Refactor file processor tests to use fixture
2019-01-30 08:57:25 -08:00
Tomer Keren
92a037684f
Fix python2 unicode test error
...
I guess that if you don't have something python2 compliant to say. might as well say nothing at all
Also fix linter errors
2019-01-30 08:55:57 -08:00
Tomer Keren
bdf3ce9135
Fix dogfood
2019-01-30 08:55:57 -08:00
Tomer Keren
b64421c5e8
Write a test checking plugin failure exception handling
2019-01-30 08:55:57 -08:00
Anthony Sottile
0c470a65d7
Allow capitalized filenames in per-file-ignores
2019-01-29 23:17:45 -08:00
Anthony Sottile
50e7cc71b9
Latest pycodestyle
2019-01-29 08:58:10 -08:00
Anthony Sottile
dd9a3f421b
Fix linters
2019-01-27 17:19:04 -08:00
Ian Stapleton Cordasco
0f3f4ff9b4
Merge branch 'master' into 'master'
...
Add support for optparse's 'float' and 'complex' types.
Closes #452
See merge request pycqa/flake8!261
2019-01-17 13:50:50 +00:00
Anthony Sottile
9788b87c91
Support more syntaxes in per-file-ignores
2019-01-07 19:35:41 -08:00
ymdatta
cc20e35058
Fixed linting errors
2019-01-04 10:32:06 +05:30
Anthony Sottile
be88d26396
Remove unused and broken flake8.listen plugin type
2018-12-27 16:55:15 -08:00
Tomer Keren
8c9c462154
Add tests for noqa without a space
2018-12-27 18:14:20 +02:00
ymdatta
3b16130500
test_option:Modify the tests to check support for optparse's types.
2018-11-09 08:39:47 +05:30
Anthony Sottile
ff15ba0865
Replace setuptools with entrypoints
2018-11-05 11:08:37 -08:00
ymdatta
ccd9beb26d
Added tests for optparse's 'float' and 'complex' types
2018-10-28 22:16:03 +05:30
Ian Stapleton Cordasco
1433a008b3
Add tests for the expected behaviour of per-file-ignores
...
These show that there were some subtle bugs in how we were matching
things and that there are bugs that need to be fixed.
2018-10-27 08:01:14 -05:00
Anthony Sottile
1f1b86a2d1
Fixups after 3.6.0 release
2018-10-23 20:57:42 -07:00
Anthony Sottile
308a0bdb50
Be explicit about the bytes put into test files
2018-10-23 15:47:18 -07:00
Anthony Sottile
42590a68a5
Revert "Merge branch 'revert-63b91c95' into 'master'"
...
This reverts commit ba2fb9c53a , reversing
changes made to 63b91c95ea .
2018-10-23 15:06:49 -07:00
Anthony Sottile
fb1f257128
Revert "Merge branch 'match_newlines_py3' into 'master'"
...
This reverts merge request !253
2018-10-23 21:53:19 +00:00
Anthony Sottile
63b91c95ea
Merge branch 'match_newlines_py3' into 'master'
...
Fix inconsistent newlines read from a file in python3
Closes #457
See merge request pycqa/flake8!253
2018-10-23 21:44:22 +00:00
Jintao Zhang
5188a146c2
Fix collections ABCs deprecation warning.
...
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2018-10-23 11:52:48 +08:00
Anthony Sottile
a42bfdf6d2
Fix inconsistent newlines read from a file in python3
2018-10-22 17:10:18 -07:00
Ian Stapleton Cordasco
56b86ba9fe
Fix up test files for W504
2018-10-20 12:37:32 -05:00
Anthony Sottile
e73055432c
Only skip a file if # flake8: noqa is on a line by itself
2018-07-01 08:40:26 -07:00
Ian Stapleton Cordasco
d6ab32112f
Fix issue with pep8-naming
2018-05-20 10:46:13 -05:00
Ville Skyttä
e8e35ea0ae
Add some extend_ignores into decision engine test cases
2018-05-20 12:04:40 +02:00
Ville Skyttä
e520c2d936
Implement --extend-ignore
...
Refs #365
2018-05-16 08:50:26 +02:00