Commit graph

30 commits

Author SHA1 Message Date
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
Renamed from tests/unit/test_file_checker.py (Browse further)