Skip to content

STYLE enable ruff TCH on pandas/core/arrays #51786

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

Merged
merged 10 commits into from
Mar 11, 2023
Merged

STYLE enable ruff TCH on pandas/core/arrays #51786

merged 10 commits into from
Mar 11, 2023

Conversation

t0uch9r455
Copy link

  • 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.

@t0uch9r455
Copy link
Author

Are there any updates with this PR?

@MarcoGorelli MarcoGorelli changed the title added changes to array with pre-commit run STYLE enable ruff TCH on pandas/core/arrays Mar 6, 2023
Comment on lines 111 to 112
elif (
pa.types.is_binary(pa_type)
or pa.types.is_fixed_size_binary(pa_type)
or pa.types.is_large_binary(pa_type)
):
elif pa.types.is_binary(pa_type):
Copy link
Member

Choose a reason for hiding this comment

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

you've still got unrelated changes, please check through them

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Mar 6, 2023
Comment on lines 15 to 21
from pandas._typing import (
Dtype,
Scalar,
npt,
)

# from pandas._typing import (
# Dtype,
# Scalar,
# npt,
# )
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't look right

@MarcoGorelli
Copy link
Member

can you run pre-commit run --all-files please?

@MarcoGorelli
Copy link
Member

can you run pre-commit run --all-files please?

can you run pre-commit run --all-files please?

@t0uch9r455
Copy link
Author

can you run pre-commit run --all-files please?

can you run pre-commit run --all-files please?

Working on it now

@t0uch9r455
Copy link
Author

For some reason I'm getting
(pandas-dev) gitpod > /workspace/pandas $ pre-commit run --all-files
An unexpected error has occurred: PermissionError: [Errno 13] Permission denied: '/home/gitpod/.cache/pre-commit'
on the gitpod. I'm gonna try it on docker and see

@t0uch9r455
Copy link
Author

t0uch9r455 commented Mar 10, 2023

It worked.
pre-commit run --all-files
black...................................................................................................Passed
ruff....................................................................................................Passed
vulture.................................................................................................Passed
codespell...............................................................................................Passed
cython-lint.............................................................................................Passed
double-quote Cython strings.............................................................................Passed
debug statements (python)...............................................................................Passed
fix end of files........................................................................................Passed
trim trailing whitespace................................................................................Passed
cpplint.................................................................................................Passed
isort...................................................................................................Passed
pyupgrade...............................................................................................Passed
rst code is two backticks...........................................................................Passed
rst directives end with two colons......................................................................Passed
rst inline code next to normal text.................................................................Passed
Sphinx lint.............................................................................................Passed
Check for inconsistent use of pandas namespace..........................................................Passed
Check code for instances of os.remove...................................................................Passed
Unwanted patterns.......................................................................................Passed
Check Cython casting is <type>obj, not <type> obj...................................................Passed
Check for backticks incorrectly rendering because of missing spaces.....................................Passed
Check for unnecessary random seeds in asv benchmarks....................................................Passed
Check for usage of numpy testing or array_equal.........................................................Passed
Check for invalid EA testing............................................................................Passed
Unwanted patterns in tests..............................................................................Passed
Unwanted patterns in EA tests...........................................................................Passed
Unwanted patterns in Cython code........................................................................Passed
Generate pip dependency from conda......................................................................Passed
Validate correct capitalization among titles in documentation...........................................Passed
Check for use of bare pytest raises.....................................................................Passed
Check for use of private functions across modules.......................................................Passed
Check for import of private attributes across modules...................................................Passed
Check for strings with misplaced spaces.................................................................Passed
Import pandas.array as pd_array in core.................................................................Passed
Use pandas.io.common.urlopen instead of urllib.request.urlopen..........................................Passed
Use bool_t instead of bool in pandas/core/generic.py....................................................Passed
Use raise instead of return for exceptions..............................................................Passed
Ensure pandas errors are documented in doc/source/reference/testing.rst.................................Passed
Check for pg8000 not installed on CI for test_pg8000_sqlalchemy_passthrough_error.......................Passed
Check minimum version of dependencies are aligned.......................................................Passed
Validate errors locations...............................................................................Passed
flake8-pyi..............................................................................................Passed
import annotations from future......................................................................Passed
check that test names start with 'test'.................................................................Passed
sort whatsnew entries by issue number...................................................................Passed

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Mar 11, 2023
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 @clarkwiththew

@MarcoGorelli MarcoGorelli merged commit 52c653b into pandas-dev:main Mar 11, 2023
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