Skip to content

Commit

Permalink
Resolve conflict between Black and Flake8 code styles
Browse files Browse the repository at this point in the history
The project uses the Arduino tooling standard target line length of 120.

Flake8's rule E501 uses this as a hard limit, erroring if any line in a Python file exceeds it.

Black uses 120 as a target length, but may format some lines longer than 120 when it considers complying with the limit
to be harmful.

So rule E501 must be disabled. The line length limit will still be enforced by the formatting check.
  • Loading branch information
per1234 committed Mar 25, 2023
1 parent 8866d4a commit 8356c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[flake8]
doctests = True
# W503 and W504 are mutually exclusive. PEP 8 recommends line break before.
ignore = W503
ignore = E501,W503
max-complexity = 10
max-line-length = 120
select = E,W,F,C,N

0 comments on commit 8356c72

Please sign in to comment.