STYLE enable ruff TCH on pandas/core/arrays
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) 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.


Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
Are there any updates with this PR?
can you run `pre-commit run --all-files` please?
> can you run `pre-commit run --all-files` please?

can you run `pre-commit run --all-files` please?
> > can you run `pre-commit run --all-files` please?
> 
> can you run `pre-commit run --all-files` please?

Working on it now
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
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