Skip to content

Commit e79bffc

Browse files
mroeschketopper-123
authored andcommitted
STY: Enable Ruff specific checks (pandas-dev#53510)
1 parent 3ad16c9 commit e79bffc

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

pandas/_config/config.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666
)
6767
import warnings
6868

69-
from pandas._typing import F # noqa: TCH001
70-
from pandas._typing import T # noqa: TCH001
69+
from pandas._typing import (
70+
F,
71+
T,
72+
)
7173
from pandas.util._exceptions import find_stack_level
7274

7375

pandas/_libs/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Below imports needs to happen first to ensure pandas top level
1414
# module gets monkeypatched with the pandas_datetime_CAPI
1515
# see pandas_datetime_exec in pd_datetime.c
16-
import pandas._libs.pandas_parser # noqa: F401,E501 # isort: skip # type: ignore[reportUnusedImport]
16+
import pandas._libs.pandas_parser # noqa: E501 # isort: skip # type: ignore[reportUnusedImport]
1717
import pandas._libs.pandas_datetime # noqa: F401,E501 # isort: skip # type: ignore[reportUnusedImport]
1818
from pandas._libs.interval import Interval
1919
from pandas._libs.tslibs import (

pandas/api/types/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pandas._libs.lib import infer_dtype
66

7-
from pandas.core.dtypes.api import * # noqa: F401, F403
7+
from pandas.core.dtypes.api import * # noqa: F403
88
from pandas.core.dtypes.concat import union_categoricals
99
from pandas.core.dtypes.dtypes import (
1010
CategoricalDtype,

pandas/core/dtypes/dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ class ArrowDtype(StorageExtensionDtype):
19921992
timestamp[s, tz=America/New_York][pyarrow]
19931993
>>> pd.ArrowDtype(pa.list_(pa.int64()))
19941994
list<item: int64>[pyarrow]
1995-
""" # noqa: E501
1995+
"""
19961996

19971997
_metadata = ("storage", "pyarrow_dtype") # type: ignore[assignment]
19981998

pyproject.toml

+15-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ select = [
236236
# comprehensions
237237
"C4",
238238
# pygrep-hooks
239-
"PGH"
239+
"PGH",
240+
# Ruff-specific rules
241+
"RUF",
240242
]
241243

242244
ignore = [
@@ -308,6 +310,18 @@ ignore = [
308310
"PLR2004",
309311
# Consider `elif` instead of `else` then `if` to remove indentation level
310312
"PLR5501",
313+
# ambiguous-unicode-character-string
314+
"RUF001",
315+
# ambiguous-unicode-character-docstring
316+
"RUF002",
317+
# ambiguous-unicode-character-comment
318+
"RUF003",
319+
# collection-literal-concatenation
320+
"RUF005",
321+
# pairwise-over-zipped (>=PY310 only)
322+
"RUF007",
323+
# explicit-f-string-type-conversion
324+
"RUF010"
311325
]
312326

313327
exclude = [

0 commit comments

Comments
 (0)