Skip to content

Commit

Permalink
Make flake8 to be more opinionated (#217)
Browse files Browse the repository at this point in the history
Currently it is spitting out too many failures.

It is consistent with ExecuTorch linter
  • Loading branch information
mergennachin authored Apr 16, 2024
1 parent d6f557c commit 1af660a
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[flake8]
select = B,C,E,F,P,W,B9,TOR0,TOR1,TOR2
max-line-length = 120
ignore =
# Black conflicts and overlaps.
B950,
E111,
E115,
E117,
E121,
E122,
E123,
E124,
E125,
E126,
E127,
E128,
E129,
E131,
E201,
E202,
E203,
E221,
E222,
E225,
E226,
E227,
E231,
E241,
E251,
E252,
E261,
E262,
E265,
E271,
E272,
E301,
E302,
E303,
E305,
E306,
E501,
E502,
E701,
E702,
E703,
E704,
W291,
W292,
W293,
W391,
W504,

# Too opinionated.
E265,
E266,
E402,
E722,
B001,
P207,
B003,
P208,
C403,
W503,

# Bugbear has opinions: https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
B904,
B905,
B906,
B907,
exclude =
./.git,
*.pyi

max-complexity = 12

0 comments on commit 1af660a

Please sign in to comment.