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

wemake profile inconsistency: 80 vs 79 line length #2182

Closed
skatromb opened this issue Oct 17, 2023 · 5 comments
Closed

wemake profile inconsistency: 80 vs 79 line length #2182

skatromb opened this issue Oct 17, 2023 · 5 comments

Comments

@skatromb
Copy link
Contributor

I am using wemake-python-styleguide linter, which states "80" line length. However, its real limit is 79, after which isort should proceeding with newline for long import. I found that with the following line of code:

from typing import Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union

It passes isort with wemake profile, but wemake throws error:
python_file.py:1:80: E501 line too long (80 > 79 characters)
Need to fix profile config and add test (will be done)

@skatromb
Copy link
Contributor Author

Made PR

@staticdev
Copy link
Collaborator

Merged.

@sobolevn
Copy link
Member

This actually cause a regression in almost all of my projects :)
I've spent multiple hours digging into it.

The real value is max-line-length = 80
Here's the proof: https://github.com/wemake-services/wemake-python-styleguide/actions/runs/8076865527/job/22066047320?pr=2864

I will send a PR to revert this change.
Please, ping me if you want to change this next time :)

@skatromb
Copy link
Contributor Author

skatromb commented Feb 28, 2024

Ah, my bad and apologies. That was my misconfiguration of wps with ruff and isort. I'll be more thorough next time.

@sobolevn
Copy link
Member

No worries :)
Very cool bug to remember! 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants