Skip to content

Commit

Permalink
Ignore flake8 E701/704 because it conflicts with recent black (#48)
Browse files Browse the repository at this point in the history
* Ignore flake8 E701/704 because it conflicts with recent black

* Shorter comments

* fix a typo
  • Loading branch information
ktns committed Mar 21, 2024
1 parent 70b2010 commit 81cb5ad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pysen/ext/flake8_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ def to_black_compatible(self) -> "Flake8Setting":
"# E501: black may exceed the line-length to follow other style rules"
)

if not _contains(new.ignore, "E701"):
new.ignore.append("E701")
new._comments.append(
"# E701: black will collapse ... only functions etc. to a single line"
)

if not _contains(new.ignore, "E704"):
new.ignore.append("E704")
new._comments.append(
"# E704: black will collapse ... only functions etc. to a single line"
)

W503_or_504_enabled = _contains(new.ignore, "W503") or _contains(
new.ignore, "W504"
)
Expand Down

0 comments on commit 81cb5ad

Please sign in to comment.