|
| 1 | +repos: |
| 2 | + # The warnings/errors we check for here are: |
| 3 | + # E101 - mix of tabs and spaces |
| 4 | + # E11 - Fix indentation. |
| 5 | + # E111 - 4 spaces per indentation level |
| 6 | + # E112 - 4 spaces per indentation level |
| 7 | + # E113 - 4 spaces per indentation level |
| 8 | + # E121 - Fix indentation to be a multiple of four. |
| 9 | + # E122 - Add absent indentation for hanging indentation. |
| 10 | + # E123 - Align closing bracket to match opening bracket. |
| 11 | + # E124 - Align closing bracket to match visual indentation. |
| 12 | + # E125 - Indent to distinguish line from next logical line. |
| 13 | + # E126 - Fix over-indented hanging indentation. |
| 14 | + # E127 - Fix visual indentation. |
| 15 | + # E128 - Fix visual indentation. |
| 16 | + # E129 - Fix visual indentation. |
| 17 | + # E131 - Fix hanging indent for unaligned continuation line. |
| 18 | + # E133 - Fix missing indentation for closing bracket. |
| 19 | + # E20 - Remove extraneous whitespace. |
| 20 | + # E211 - Remove extraneous whitespace. |
| 21 | + # E231 - Add missing whitespace. |
| 22 | + # E241 - Fix extraneous whitespace around keywords. |
| 23 | + # E242 - Remove extraneous whitespace around operator. |
| 24 | + # E251 - Remove whitespace around parameter '=' sign. |
| 25 | + # E252 - Missing whitespace around parameter equals. |
| 26 | + # E26 - Fix spacing after comment hash for inline comments. |
| 27 | + # E265 - Fix spacing after comment hash for block comments. |
| 28 | + # E266 - Fix too many leading '#' for block comments. |
| 29 | + # E27 - Fix extraneous whitespace around keywords. |
| 30 | + # E301 - Add missing blank line. |
| 31 | + # E302 - Add missing 2 blank lines. |
| 32 | + # E303 - Remove extra blank lines. |
| 33 | + # E304 - Remove blank line following function decorator. |
| 34 | + # E305 - expected 2 blank lines after class or function definition |
| 35 | + # E305 - Expected 2 blank lines after end of function or class. |
| 36 | + # E306 - expected 1 blank line before a nested definition |
| 37 | + # E306 - Expected 1 blank line before a nested definition. |
| 38 | + # E401 - Put imports on separate lines. |
| 39 | + # E402 - Fix module level import not at top of file |
| 40 | + # E502 - Remove extraneous escape of newline. |
| 41 | + # E701 - Put colon-separated compound statement on separate lines. |
| 42 | + # E711 - Fix comparison with None. |
| 43 | + # E712 - Fix comparison with boolean. |
| 44 | + # E713 - Use 'not in' for test for membership. |
| 45 | + # E714 - Use 'is not' test for object identity. |
| 46 | + # E722 - Fix bare except. |
| 47 | + # E731 - Use a def when use do not assign a lambda expression. |
| 48 | + # E901 - SyntaxError or IndentationError |
| 49 | + # E902 - IOError |
| 50 | + # F822 - undefined name in __all__ |
| 51 | + # F823 - local variable name referenced before assignment |
| 52 | + # W291 - Remove trailing whitespace. |
| 53 | + # W292 - Add a single newline at the end of the file. |
| 54 | + # W293 - Remove trailing whitespace on blank line. |
| 55 | + # W391 - Remove trailing blank lines. |
| 56 | + # W601 - Use "in" rather than "has_key()". |
| 57 | + # W602 - Fix deprecated form of raising exception. |
| 58 | + # W603 - Use "!=" instead of "<>" |
| 59 | + # W604 - Use "repr()" instead of backticks. |
| 60 | + # W605 - Fix invalid escape sequence 'x'. |
| 61 | + # W690 - Fix various deprecated code (via lib2to3). |
| 62 | + - repo: https://github.com/PyCQA/flake8 |
| 63 | + rev: 4.0.1 |
| 64 | + hooks: |
| 65 | + - id: flake8 |
| 66 | + args: |
| 67 | + [ |
| 68 | + "--count", |
| 69 | + "--select", |
| 70 | + "E101,E11,E111,E112,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,E401,E402,E502,E701,E711,E712,E713,E714,E722,E731,E901,E902,F822,F823,W191,W291,W292,W293,W391,W601,W602,W603,W604,W605,W690", |
| 71 | + ] |
| 72 | + - repo: https://github.com/PyCQA/isort |
| 73 | + rev: 5.10.1 |
| 74 | + hooks: |
| 75 | + - id: isort |
| 76 | + args: ["--sp", "setup.cfg"] |
| 77 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 78 | + rev: v4.0.1 |
| 79 | + hooks: |
| 80 | + - id: check-ast |
| 81 | + - id: check-case-conflict |
| 82 | + - id: trailing-whitespace |
| 83 | + - id: check-yaml |
| 84 | + - id: debug-statements |
| 85 | + - id: check-added-large-files |
| 86 | + - id: end-of-file-fixer |
| 87 | + - id: mixed-line-ending |
| 88 | + |
| 89 | +ci: |
| 90 | + autofix_prs: false |
0 commit comments