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

Remove flake8 W503 from docs as it is ignored by default #1661

Merged
merged 1 commit into from
Aug 31, 2020
Merged

Remove flake8 W503 from docs as it is ignored by default #1661

merged 1 commit into from
Aug 31, 2020

Conversation

jdufresne
Copy link
Contributor

Fixes #1660

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM! Will let our more stringent documentation overlords find something tho :D

Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a few things, they aren't related to your PR but hey @cooperlees I still found something! 😅

Other than that, looks good to me. Thanks! 🎉

.flake8 Outdated
@@ -1,5 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503
extend-ignore = E203, E266, E501
# line length is intentionally set to 80 here because black uses Bugbear
# See https://github.com/psf/black/blob/master/README.md#line-length for more details
Copy link
Collaborator

@ichard26 ichard26 Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link doesn't make sense anymore since the docs were refactored.

Suggested change
# See https://github.com/psf/black/blob/master/README.md#line-length for more details
# See https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length for more details

Copy link
Collaborator

@ichard26 ichard26 Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the link at line 35 of docs/compatible_configs.md to https://github.com/psf/black/blob/master/docs/the_black_code_style.md#how-black-wraps-lines. (you can't comment on non modified code using the PR review UI 🙁)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I applied the suggested changes.

@ichard26 ichard26 added the T: documentation Improvements to the docs (e.g. new topic, correction, etc) label Aug 31, 2020
@cooperlees cooperlees merged commit 573b8de into psf:master Aug 31, 2020
@jdufresne jdufresne deleted the w503 branch August 31, 2020 22:38
@fredrikaverpil
Copy link

fredrikaverpil commented Nov 17, 2020

Is it possible that you forgot to remove W503 from the official docs?
https://black.readthedocs.io/en/stable/compatible_configs.html#id1

@ichard26
Copy link
Collaborator

Maybe have a look at the master documentation. The changes will go live on the stable (and default) branch on a new release.
https://black.readthedocs.io/en/latest/compatible_configs.html#id1

@scottfurry
Copy link

Suspect regression. Using v 4.0.1 (Gentoo X86_64). Having just installed black (v22.1.0), reformatting produced multiple W503 messages. Attempted to utilize extended-ignore and reloaded/rescanned project. Warnings persisted. I ensured no W503/W504 ignores were present in code or configuration. Only after adding explicitly W503 to extended-ignore would flake8 be satisfied.

@fredrikaverpil
Copy link

fredrikaverpil commented Mar 14, 2022

I'm on black 22.1.0, Python 3.10 (macOS M1 ARM) and I can't remove the W503 ignore from my .flake8 config file, or I'll get a bunch of:

$ poetry run flake8 src tests
[redacted].py:835:17: W503 line break before binary operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update docs to remove flake8 ignore of W503, which is ignored by default
5 participants