Commit graph

379 commits

Author SHA1 Message Date
Anthony Sottile
f0f71fc179 remove unused parameter from make_formatter 2022-01-23 19:33:21 -05:00
Anthony Sottile
f9eb0fd6ea change keyword_arguments_for so it does not modify and return 2022-01-23 19:06:06 -05:00
Anthony Sottile
929cf5dfd3 remove log_token and EXTRA_VERBOSE
- flake8 spent 5% of execution in `log_token`
- `EXTRA_VERBOSE` was only used by `log_token`
- `python -m tokenize` provides better debug token output
2022-01-23 18:08:58 -05:00
Anthony Sottile
23a60dd902 use the actual line contents when processing physical lines 2022-01-22 15:27:53 -05:00
Anthony Sottile
d03b9c97cc add a --require-plugins option 2022-01-22 14:08:32 -05:00
Anthony Sottile
9d23faad6d always use UTF-8 encoding when reading configuration 2022-01-20 14:03:18 -05:00
Anthony Sottile
c194d6cc30 combine local_plugin_paths and parse_plugin_options 2022-01-18 20:57:09 -05:00
Anthony Sottile
1b58293ad3 refactor plugin loading options to prepare for --require-plugins 2022-01-10 20:06:26 -05:00
Anthony Sottile
ec57d5e67c use tokenize.TokenInfo instead of _Token alias 2022-01-05 15:37:25 -05:00
Anthony Sottile
fa4c31fb97 break type checking cycles 2022-01-05 13:40:16 -05:00
Anthony Sottile
3c885219b5 use typesafe NamedTuple 2022-01-05 13:02:38 -05:00
Anthony Sottile
78b2db4072 type the rest of the legacy api 2022-01-05 12:35:38 -05:00
Anthony Sottile
4cb1dc8c44 perform path normalization on '.' 2022-01-05 11:44:31 -05:00
Anthony Sottile
b62edd334a fix extended_default_select from plugin loading 2022-01-01 19:26:43 -05:00
Anthony Sottile
a8333e2bf2 move managing of off_by_default / enable_extensions to plugin loading 2022-01-01 18:33:07 -05:00
Anthony Sottile
50d69150c1 rework plugin loading 2021-12-31 15:09:54 -08:00
Ruairidh MacLeod
d948169292 add check for a missing specified config file 2021-12-24 23:40:31 +00:00
Ruairidh MacLeod
d478d92299 add failing test for missing config file 2021-12-24 23:40:31 +00:00
Anthony Sottile
a7be5e798b fix AttributeError when catatstrophic failure is triggered 2021-12-24 16:38:17 -05:00
Anthony Sottile
f98d52a398 have OptionManager take plugin versions directly 2021-12-08 15:49:17 -05:00
Anthony Sottile
1e4743d490 use plugin_name= instead of dicts in exceptions 2021-12-07 15:36:20 -08:00
Anthony Sottile
52fb518104 eliminate --bug-report double-parse quirk with store_true 2021-12-07 13:49:57 -08:00
Anthony Sottile
fa8ac82ee2 add integration test for off_by_default plugin 2021-12-07 12:25:24 -08:00
Anthony Sottile
77a054688b refactor run_checks to not take an Optional list of filenames 2021-11-25 15:45:01 -05:00
Anthony Sottile
65c893728e refactor and simplify configuration loading 2021-11-22 19:45:17 -05:00
Anthony Sottile
411ff24392 move from allowlist to blocklist for mypy 2021-11-14 21:48:17 -08:00
Anthony Sottile
3b7dbd6697 replace py2-kwonly shim with true kwonly args 2021-11-14 20:59:28 -08:00
Anthony Sottile
bbbe0d8048 improve integration tests 2021-11-14 20:39:45 -08:00
Anthony Sottile
66071563c2 split out file discovery and test it 2021-11-14 20:04:29 -08:00
Anthony Sottile
97c3de41bd fix test name after exit -> exit_code refactor 2021-11-14 16:38:39 -08:00
Anthony Sottile
81a4110338 have application return exit code for easier testing 2021-11-14 16:29:18 -08:00
Anthony Sottile
8d3afe40e1 use return value of parse_args directly 2021-11-14 15:39:14 -08:00
Anthony Sottile
0698366a20 add a __repr__ for JobsArgument 2021-11-14 14:42:48 -08:00
Anthony Sottile
bb3c8d2607 improve coverage a bit 2021-11-14 09:39:33 -08:00
Anthony Sottile
3af47b7df5 remove some unused test fixture files 2021-11-14 08:54:57 -08:00
Anthony Sottile
17822984a5
Merge pull request #1454 from asottile/unused-example-code
remove unused example-code test fixtures
2021-11-14 11:45:25 -05:00
Anthony Sottile
b3c6364f0e remove unused example-code test fixtures 2021-11-14 08:42:35 -08:00
Anthony Sottile
0c62569c4f remove dead code
detected using https://github.com/asottile/dead
2021-11-14 08:40:34 -08:00
Anthony Sottile
848003cc05 add --color option 2021-11-05 20:37:08 -04:00
Max R
dd6d61c9a6 Fix tests 2021-10-17 22:13:11 -04:00
Ian Stapleton Cordasco
807904aebc
Drop support for Home and XDG config files
This has been a huge support burden for us. I seriously considered doing
this in 3.0 but caved to a vocal minority and the desire to keep as much
backwards compatibility as possible. At this point, however, I'm done
witnessing the abuse Anthony has to suffer over this and I'm done with
the undue hostility that people who don't bother to read the docs
display. Hopefully, this eases that a bit.
2021-10-10 19:18:51 -05:00
Anthony Sottile
a46b61901e fix test name after refactor 2021-09-08 18:49:11 -04:00
Anthony Sottile
7a353d2e23 write directly to sys.stdout.buffer to avoid windows io encoding 2021-09-08 17:10:04 -04:00
Anthony Sottile
d34581b83f test using python3.10 2021-08-15 19:00:43 -04:00
Ian Stapleton Cordasco
85c2be3b52 Handle new SyntaxError tuple on 3.10
Closes #1372
2021-08-15 18:26:27 -04:00
Jouke Witteveen
efc15cf4f1 Automatically create output directories 2021-05-10 16:41:01 +02:00
Anthony Sottile
456e98486e short circuit on ast error before tokenization error 2021-04-18 10:08:11 -07:00
Anthony Sottile
af1668bf04 extend black formatting to tests as well 2021-04-18 09:23:48 -07:00
Ian Stapleton Cordasco
2bb0308363
Fix bug for plugins using extend_default_ignore
Since Flake8 3.0 we've had the ability for plugins to use
`extend_default_ignore` to register codes they want disabled by default.
This, however, was a permanent disabling unfortunately. Our code didn't
have a way of understanding that this new set of `ignore` codes was
actually the 'default' set for that run. Much like the
extended_select_list, we now attach extended_ignore_list to be able to
confidently determine if the ignore we get in the DecisionEngine is
actually the Default Ignore list and what plugins what us to ignore by
default.

Refs https://github.com/PyCQA/pep8-naming/pull/157
2021-04-15 13:26:08 -05:00
Frank Winklmeier
f98afbf7d9 Add --extend-select command line argument
Implement `--extend-select` command line argument following what was
done for `--extend-ignore` in !233. This option can be used to
selectively add individual codes without overriding the default list
entirely.

Addresses the remaining item of issue #1061.
2021-04-11 20:40:53 +02:00