| 1 | [flake8] |
| 2 | # Suggested config from pytorch that we can adapt |
| 3 | select = B,C,E,F,N,P,T4,W,B9,TOR0,TOR1,TOR2 |
| 4 | max-line-length = 120 |
| 5 | # C408 ignored because we like the dict keyword argument syntax |
| 6 | # E501 is not flexible enough, we're using B950 instead |
| 7 | # N812 ignored because import torch.nn.functional as F is PyTorch convention |
| 8 | # N817 ignored because importing using acronyms is convention (DistributedDataParallel as DDP) |
| 9 | # E731 allow usage of assigning lambda expressions |
| 10 | # E701 let black auto-format statements on one line |
| 11 | # E704 let black auto-format statements on one line |
| 12 | ignore = |
| 13 | E203,E305,E402,E501,E721,E741,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,N812,N817,E731,E701,E704 |
| 14 | # shebang has extra meaning in fbcode lints, so I think it's not worth trying |
| 15 | # to line this up with executable bit |
| 16 | EXE001, |
| 17 | # random naming hints don't need |
| 18 | N802, |
| 19 | # these ignores are from flake8-bugbear; please fix! |
| 20 | B007,B008,B950 |
| 21 | optional-ascii-coding = True |
| 22 | exclude = |
| 23 | ./.git, |
| 24 | ./docs |
| 25 | ./build |
| 26 | ./scripts, |
| 27 | ./venv, |
| 28 | *.pyi |
| 29 | .pre-commit-config.yaml |
| 30 | *.md |
| 31 | .flake8 |