Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rustamali9183
Copy link
Contributor

What does this PR changes?

This PR cleans up a redundant nested isinstance(na_values, dict) check in test_na_values_scaler for the "pyarrow" engine.
The inner check was always true and the else branch was unreachable.

Behavior after this PR

  • When parser.engine == "pyarrow" and na_values is a dict:
    • ValueError is still expected.
  • When parser.engine == "pyarrow" and na_values is invalid (non-string types):
    • TypeError is still expected.

Issue reference

Closes #63119

Checklist

  • Tests pass locally (233 passed, 1 skipped, 18 xfailed)
  • Code cleanup only - no behavior changes
  • Follows pandas contribution guidelines

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

pre-commit is failing. If you haven't set this up locally, it might be a good idea: https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant type checks and dead code requiring refactoring

2 participants