-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
Flake8 line limit is inconsistent with Black #2975
Comments
As noted on beeware/briefcase#2064, adopting Ruff would also resolve the inconsistency. That's a separate decision to be made; but resolving outstanding > 89 character lines will be at least a co-requisite. |
👋 I'm helping @nitschkek on this one. Thought about asking whether you'd take Ruff but yeah thought that'd best be left for a subsequent change. |
@garthk Looks like we've had a collision on the committer highway - @marcbradshaw has just submitted a PR that implements a fix for this... |
No worries. I’ll stop working on it. Many thanks to Garth for all his help today. It was my first attempt to contribute to an open source project and he helped me enormously. Sorry Garth I was so slow.KymSent from my iPhoneOn 25 Nov 2024, at 5:17 pm, Russell Keith-Magee ***@***.***> wrote:
@garthk Looks like we've had a collision on the committer highway - @marcbradshaw has just submitted a PR that implements a fix for this...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
What is the problem or limitation you are having?
Toga's flake8 configuration (set in tox.ini because of... reasons) enforces a line length of 119. However, Black format enforces an 88 character limit. So - our code is being formatted to 88 character lines, but that won't format some comments and strings, which can lead to PRs that don't auto-flag a formatting issue.
Describe the solution you'd like
Toga's flake8 configuration should set an 88 characters limit (to match Black).
Existing code that exceeds the 88 character limit should be reformatted.
Describe alternatives you've considered
None.
Additional context
After changing the tox.ini configuration,
pre-commit run --all
will highlight all the problem lines.Some of the lines are long for historical reasons - Rubicon didn't historically [have a way to deal with ObjC methods with duplicated argument names (see beeware/rubicon-objc#148). However, this was fixed in Rubicon 0.4.9, and some code has already been updated to use the new syntax (see #2682). That syntax can now be used everywhere to avoid long lines.
The text was updated successfully, but these errors were encountered: