Anthony Sottile
e94fb10940
require python>=3.7
2022-08-05 19:51:08 -04: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
ec57d5e67c
use tokenize.TokenInfo instead of _Token alias
2022-01-05 15:37:25 -05:00
Anthony Sottile
af1668bf04
extend black formatting to tests as well
2021-04-18 09:23:48 -07:00
Anthony Sottile
358ae85120
automatic: pyupgrade --py36-plus
2021-03-30 17:37:13 -07:00
Anthony Sottile
55f29c636f
introduce pyupgrade, run it in python2-compatible mode
2021-03-29 20:21:36 -07:00
Anthony Sottile
2fe70dda6b
fix a few small spelling issues
...
found via `pre-commit try-repo https://github.com/codespell-project/codespell --all-files`
2020-09-20 19:16:10 -07:00
Anthony Sottile
93a17a806d
instrument coverage on tests and require 100% coverage there
2020-03-23 12:15:29 -07:00
Anthony Sottile
28797a57d8
Allow noqa to apply to lines due to continuation
2020-03-17 22:12:56 -07:00
Anthony Sottile
32c7ebcd7b
split lines the same when read from stdin
2020-01-16 14:10:33 -08:00
Isac Yoo
3b80b2e05a
Remove redundant sample data
2019-11-13 11:58:49 +09:00
Byeonghoon Yoo
705c16a268
Fix codes
2019-11-06 00:28:09 +09:00
Byeonghoon Yoo
29d8b11209
Add unit test for dd411e95
2019-11-05 22:00:05 +09:00
Anthony Sottile
fdcec2803a
Don't reset indent_char when we encounter E101
2019-09-24 13:54:32 -07:00
Anthony Sottile
92fbdda253
Add type annotations for flake8.processor
2019-09-07 23:31:43 -07:00
Anthony Sottile
dcd37ec3d4
whitelist a bandit false positive and improve type annotation
2019-05-19 09:39:14 -07: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
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
Tomer Keren
8c9c462154
Add tests for noqa without a space
2018-12-27 18:14:20 +02: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
a42bfdf6d2
Fix inconsistent newlines read from a file in python3
2018-10-22 17:10:18 -07: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
Avraham Shukron
59218ca323
Report error when non-exiting path is passed to flake8
2018-02-21 18:19:59 +02:00
Anthony Sottile
109f5f8888
Simplify and speed up multiprocessing
2016-11-29 09:00:33 -08:00
Ian Cordasco
352a7250b7
Handle empty stdin-display-name values
...
Apparently, some folks pass an empty string to --stdin-display-name. To
avoid the errors this causes, we need to handle it appropriately.
Closes #235
2016-10-28 07:09:43 -05:00
FichteFoll
ca02a8c88d
Fix read_lines_splits_lines test for CRLF endings
2016-07-27 03:36:20 +02:00
Ian Cordasco
a1fdb5a2b5
Fix up merge request 78
...
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.
2016-07-20 19:28:13 -05:00
Leonardo Rochael Almeida
7934f8dce2
Propagate the stdin_display_name to checker and processor
...
This way plugins like flake8-putty can have access to the correct filename.
2016-07-20 18:45:01 -03:00
Ian Cordasco
2d3e277b1e
Handle optional parameters that were never supported
...
Previously, pycodestyle never introspected the argument names for
classes except to require that ``tree`` be an argument it could pass.
For Flake8 3.0, we lifted that restriction, but old plugins seem to
have cargo-culted their __init__ signature to be
def __init__(self, tree, builtins=None):
For some yet unknown reason. This was causing an AttributeError. By
updating flake8.utils.parameters_for to return a dictionary that
indicates whether the parameter is required or not, we can side-step
this by simply ignoring the parameter if it has a default value and
we cannot provide it.
Closes #151
2016-06-28 09:36:24 -05:00
Ian Cordasco
81eb3e41cc
Add more processor tests
2016-04-02 11:13:23 -05:00
Ian Cordasco
425f89eee9
Add more tests around the processor module
2016-03-29 08:07:15 -05:00
Ian Cordasco
4ea161ff9c
Add a few more unit tests around FileProcessor
2016-03-28 21:04:34 -05:00
Ian Cordasco
7de8a058dd
Add unit test for build_ast
2016-03-28 19:43:14 -05:00
Ian Cordasco
698af80514
Add test for FileProcessor#split_line
2016-03-27 14:32:21 -05:00
Ian Cordasco
82dd4f6d25
Add more FileProcessor tests
2016-03-26 08:51:58 -05:00
Ian Cordasco
a4cc9d6fa8
Add test for reading from stdin with the file processor
2016-03-21 10:23:27 -05:00
Ian Cordasco
0fd276d5ee
Add a test for FileProcessor.should_ignore_file
2016-03-17 15:16:15 -05:00
Ian Cordasco
5cde4bebae
Add docstring for our test helper
2016-03-17 15:16:00 -05:00
Ian Cordasco
48b995fa62
Remove unnecessary and outdated test runner
2016-03-17 14:55:57 -05:00
Ian Cordasco
09000762fb
Rename test file to mirror actual class it is testing
2016-03-17 09:15:52 -05:00