Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore flake8 E701/704 because it conflicts with recent black #48

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading