Skip to content

STYLE: fix pylint redefined-oute-name warnings (pandas-dev#49656) #49668

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

Closed

Conversation

Dhrubajyoti-Giri
Copy link

Fixed warnings for the following files :-

  • pandas/core/internals/concat.py
  • pandas/core/reshape/merge.py
  • pandas/io/json/_json.py

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 for working on this!

@@ -1,6 +1,6 @@
from __future__ import annotations

import copy
import copy as _copy_
Copy link
Member

Choose a reason for hiding this comment

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

how about import copy as stdlib_copy?

Copy link
Author

Choose a reason for hiding this comment

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

right, i am working on that.

@@ -3,7 +3,7 @@
"""
from __future__ import annotations

import copy
import copy as _copy_
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above

def _get_object_parser(self, json) -> DataFrame | Series:
def _get_object_parser(self, json_object) -> DataFrame | Series:
Copy link
Member

Choose a reason for hiding this comment

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

if you're no longer import json, then can this argument stay the same?

json,
json_object,
Copy link
Member

Choose a reason for hiding this comment

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

same as above

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Nov 12, 2022

you'll need to run pre-commit checks (see the contributing guide for how to do that), but apart from that looks good

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label 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.

@giridhrubajyoti2002 can you run

pre-commit run --files pandas/core/internals/concat.py

(and similarly for the other files you've modified) please?

@MarcoGorelli
Copy link
Member

closing as stale, thanks anyway for your PR!

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.

3 participants