Skip to content

Conversation

Sai-Suraj-27
Copy link
Contributor

Ruff 0.0.285 has been released (https://github.com/astral-sh/ruff-pre-commit).

So, I have updated the ruff version in .pre-commit-config.yaml file, ran ruff . and corrected few files according to the errors it showed.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@Sai-Suraj-27
Copy link
Contributor Author

@mroeschke sir, can you please review the PR, Thank you.

# assure that they are of the base dict class and not of derived
# classes
data = [d if type(d) is dict else dict(d) for d in data]
data = [d if type(d) is dict else dict(d) for d in data] # noqa: E721
Copy link
Member

@twoertwein twoertwein Aug 19, 2023

Choose a reason for hiding this comment

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

Instead of ignoring the issue, maybe try [d if isinstance(d, dict) ...]?

edit: The comment suggests that it needs to be a dict and not a subclass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@twoertwein yes, sir. So, I guess there is nothing I need to change?

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Aug 21, 2023
@mroeschke mroeschke added this to the 2.2 milestone Aug 21, 2023
@mroeschke mroeschke merged commit ade0483 into pandas-dev:main Aug 21, 2023
@mroeschke
Copy link
Member

Thanks @Sai-Suraj-27

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