-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
STYLE: fix line length check of flake8 #27307
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
STYLE: fix line length check of flake8 #27307
Conversation
But, this gives some interesting cases, it seems not always easy to reconcile both ... |
pandas/core/groupby/grouper.py
Outdated
@@ -284,7 +284,7 @@ def __init__( | |||
if self.name is None: | |||
self.name = index.names[level] | |||
|
|||
self.grouper, self._labels, self._group_index = index._get_grouper_for_level( | |||
self.grouper, self._labels, self._group_index = index._get_grouper_for_level( # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a case where black produces too long line lengths (the original code before black was using \
after =
for line continuation, but checked, and black always removes this when adding it back.
For now just adding # noqa
for this and similar cases (long term the code could be refactored a bit too avoid this, but now just fixing flake8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can you add # noqa: E501
to these? I suppose makes sense to only filter the line length error here
pandas/core/groupby/grouper.py
Outdated
@@ -284,7 +284,7 @@ def __init__( | |||
if self.name is None: | |||
self.name = index.names[level] | |||
|
|||
self.grouper, self._labels, self._group_index = index._get_grouper_for_level( | |||
self.grouper, self._labels, self._group_index = index._get_grouper_for_level( # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can you add # noqa: E501
to these? I suppose makes sense to only filter the line length error here
thanks @jorisvandenbossche |
I think I made a small mistake in #27076 in adding the E501 code (line length) to the ignore list, as setting the flake8 max line length to 88 should have been sufficient.
Black does not check or correct line length in comments or multiline strings (eg docstrings), so this still need to be catched by flake8