Skip to content

CLN: enable pylint's redefined-outer-name in pandas/core/resample.py #49724

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

Conversation

calhockemeyer
Copy link
Contributor

@calhockemeyer calhockemeyer commented Nov 16, 2022

@calhockemeyer calhockemeyer changed the title 49656 pylint redefined outer name resample CLN: enable pylint's redefined-outer-name in pandas/core/resample.py Nov 16, 2022
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Thanks @calhockemeyer for working on this

_add_downsample_kernel(method, ())
for method in ["nunique"]:
_add_downsample_kernel(method, (), SeriesGroupBy)
for mthd in ["sum", "prod", "min", "max", "first", "last"]:
Copy link
Member

Choose a reason for hiding this comment

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

would _method work? as it's just used in the loop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that makes sense. Changed mthd to _method

@MarcoGorelli MarcoGorelli added the Code Style Code style, linting, code_checks label Nov 16, 2022
@MarcoGorelli MarcoGorelli added this to the 2.0 milestone Nov 16, 2022
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

@MarcoGorelli MarcoGorelli merged commit 25f8968 into pandas-dev:main Nov 17, 2022
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
…andas-dev#49724)

* Rename "method" to "mthd" in outer scope

* Change mthd to _method
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
…andas-dev#49724)

* Rename "method" to "mthd" in outer scope

* Change mthd to _method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants