Commit graph

26 commits

Author SHA1 Message Date
Max R
5fab0d1887 Update hooks and use autopep8 + add-trailing-comma instead of black 2025-07-20 19:13:24 -04:00
Anthony Sottile
e94fb10940 require python>=3.7 2022-08-05 19:51:08 -04:00
Anthony Sottile
fa4c31fb97 break type checking cycles 2022-01-05 13:40:16 -05:00
Anthony Sottile
848003cc05 add --color option 2021-11-05 20:37:08 -04: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
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
Eric N. Vander Weele
b42e758ac7 linters: Add flake8-bugbear for finding bugs and design problems
Also, make appropriate changes to satisfy issues flagged by
`flake8-bugbear`.
2019-10-25 17:11:30 -04:00
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
Anthony Sottile
fb7e9338cd mypy now passes 2019-05-19 17:31:04 -07:00
Anthony Sottile
dd9a3f421b Fix linters 2019-01-27 17:19:04 -08:00
Ian Stapleton Cordasco
49f0fbcf1e
Respect a formatter's newline setting when printing
In working on flake8-json, I noticed that setting newline was only
helpful for writing to an ouput-file but not to standard-out. It makes
sense for this setting to apply to both branches otherwise plugins need
to override the method to get the behaviour they expect.
2017-12-31 18:50:59 -06:00
Ian Cordasco
92c367dee4
Rename style_guide.Error to style_guide.Violation
Move all Violation related methods from the StyleGuide to our Violation
class.
2017-06-04 07:57:28 -05:00
Ian Cordasco
a9e15afbf5 Merge branch 'master' into 'master'
Add --tee option to split report output stream.

The `--tee` option allows the linter report to be written to stdout, even
though it is being redirected to a file with the` --output-file` option.
This is useful if I want to store the report in a separate file for later
analysis but also be able to print the output on screen (e.g when running
in a CI environment).

See merge request !90
2016-10-25 21:34:43 +00:00
Ian Cordasco
e93aad6043
Open our output file in append mode always
This avoid overwriting portions of our log output when using Flake8
in verbose mode.

Closes #193
2016-07-29 18:14:14 -05:00
Ian Cordasco
6eca38f2f2
Fix zero-indexed column numbering
We accidentally changed column numbering from one-indexed to
zero-indexed.
2016-07-26 19:45:05 -05:00
Martin Domke
9bfdc867cd Patch print function instead of sys.stdout 2016-07-26 17:27:15 +02:00
Martin Domke
c782060a06 Add --tee option to split report output stream.
The --tee option allows the linter report to be written to stdout, even
though it is being redirected to a file with the --output-file option.
This is useful if I want to store the report in a separate file for later
analysis but also be able to print the output on screen (e.g when running
in a CI environment).
2016-07-26 15:57:13 +02:00
Ian Cordasco
e977c6671a
Update tests for errors with no physical line 2016-07-09 20:26:08 -05:00
Ian Cordasco
8bc76f79de
Configure flake8-import-order to use Google Style
This relies on two things:

1. Properly configuring flake8-import-order to use that style
2. Properly configuring flake8-import-order to know that flake8 is our
   application name.
2016-06-17 10:26:36 -05:00
Ian Cordasco
9ecca93a9b
Add more BaseFormatter subclass tests 2016-06-04 13:02:29 -05:00
Ian Cordasco
d477715064
Fix linting issues 2016-06-04 13:02:09 -05:00
Ian Cordasco
9c2e747528
Add tests around BaseFormatter#after_init 2016-06-04 12:39:11 -05:00
Ian Cordasco
ba2d94888c Add tests for BaseFormatter 2016-06-01 16:56:17 -05:00