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

try setting black on 120 length #422

Closed
wants to merge 1 commit into from
Closed

try setting black on 120 length #422

wants to merge 1 commit into from

Conversation

ArtemIsmagilov
Copy link
Contributor

the main thing here is setting up pyproject.toml. what do you think about the new string length?
is it comfortable for writing and reading code?

...
# pyproject.toml
[tool.black]
line-length = 120

@tobixen
Copy link
Member

tobixen commented Jun 14, 2024

https://stackoverflow.com/questions/88942/why-does-pep-8-specify-a-maximum-line-length-of-79-characters is an interesting read.

Personally I think the 79 character lmiit is stupid, for one thing, sometimes it makes it difficult to use tools like grep on the code, and it's quite silly when there is a long list in the code with one element pr line, and then the black-plugin goes in and convert one of the lines to a multiline. Another argument is that the 79-character limit often makes me stop up in the middle of the coding just to spend efforts considering how to wrap the lines (at least that argument is moot since black does it for me now). At he other hand, I see no reason why the caldav-project should deviate from the standard given in pep8. I also think it's stupid to first format the code with a 79 character line limit, and then reformat it to 120 lines later.

@tobixen tobixen closed this Jun 14, 2024
@ArtemIsmagilov ArtemIsmagilov deleted the set-config-black-line-length-120-or-other branch June 14, 2024 21:02
@ArtemIsmagilov
Copy link
Contributor Author

Pep8 my favourite rules)

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

Successfully merging this pull request may close these issues.

2 participants