Skip to content

Commit 581a561

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent abf7984 commit 581a561

File tree

83 files changed

+147
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+147
-242
lines changed

asv_bench/benchmarks/io/style.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Render:
1313
def setup(self, cols, rows):
1414
self.df = DataFrame(
1515
np.random.randn(rows, cols),
16-
columns=[f"float_{i+1}" for i in range(cols)],
17-
index=[f"row_{i+1}" for i in range(rows)],
16+
columns=[f"float_{i + 1}" for i in range(cols)],
17+
index=[f"row_{i + 1}" for i in range(rows)],
1818
)
1919

2020
def time_apply_render(self, cols, rows):

doc/make.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ def latex(self, force=False):
260260
for i in range(3):
261261
self._run_os("pdflatex", "-interaction=nonstopmode", "pandas.tex")
262262
raise SystemExit(
263-
"You should check the file "
264-
'"build/latex/pandas.pdf" for problems.'
263+
'You should check the file "build/latex/pandas.pdf" for problems.'
265264
)
266265
self._run_os("make")
267266
return ret_code
@@ -343,8 +342,7 @@ def main():
343342
dest="verbosity",
344343
default=0,
345344
help=(
346-
"increase verbosity (can be repeated), "
347-
"passed to the sphinx build command"
345+
"increase verbosity (can be repeated), passed to the sphinx build command"
348346
),
349347
)
350348
argparser.add_argument(

doc/source/user_guide/style.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@
12881288
"outputs": [],
12891289
"source": [
12901290
"df2.loc[:4].style.highlight_max(\n",
1291-
" axis=1, props=(\"color:white; \" \"font-weight:bold; \" \"background-color:darkblue;\")\n",
1291+
" axis=1, props=(\"color:white; font-weight:bold; background-color:darkblue;\")\n",
12921292
")"
12931293
]
12941294
},

pandas/core/apply.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,8 +1645,7 @@ def reconstruct_func(
16451645
# GH 28426 will raise error if duplicated function names are used and
16461646
# there is no reassigned name
16471647
raise SpecificationError(
1648-
"Function names must be unique if there is no new column names "
1649-
"assigned"
1648+
"Function names must be unique if there is no new column names assigned"
16501649
)
16511650
if func is None:
16521651
# nicer error message

pandas/core/arrays/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,9 @@ def take(self, indices, allow_fill=False, fill_value=None):
17911791
# type for the array, to the physical storage type for
17921792
# the data, before passing to take.
17931793
1794-
result = take(data, indices, fill_value=fill_value, allow_fill=allow_fill)
1794+
result = take(
1795+
data, indices, fill_value=fill_value, allow_fill=allow_fill
1796+
)
17951797
return self._from_sequence(result, dtype=self.dtype)
17961798
""" # noqa: E501
17971799
# Implementer note: The `fill_value` parameter should be a user-facing

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,8 +2707,7 @@ def _maybe_infer_tz(tz: tzinfo | None, inferred_tz: tzinfo | None) -> tzinfo | N
27072707
pass
27082708
elif not timezones.tz_compare(tz, inferred_tz):
27092709
raise TypeError(
2710-
f"data is already tz-aware {inferred_tz}, unable to "
2711-
f"set specified tz: {tz}"
2710+
f"data is already tz-aware {inferred_tz}, unable to set specified tz: {tz}"
27122711
)
27132712
return tz
27142713

pandas/core/computation/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def visit_Call(self, node, side=None, **kwargs):
698698
if not isinstance(key, ast.keyword):
699699
# error: "expr" has no attribute "id"
700700
raise ValueError(
701-
"keyword error in function call " f"'{node.func.id}'" # type: ignore[attr-defined]
701+
f"keyword error in function call '{node.func.id}'" # type: ignore[attr-defined]
702702
)
703703

704704
if key.arg:

pandas/core/computation/ops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,7 @@ def __init__(self, op: Literal["+", "-", "~", "not"], operand) -> None:
512512
self.func = _unary_ops_dict[op]
513513
except KeyError as err:
514514
raise ValueError(
515-
f"Invalid unary operator {op!r}, "
516-
f"valid operators are {UNARY_OPS_SYMS}"
515+
f"Invalid unary operator {op!r}, valid operators are {UNARY_OPS_SYMS}"
517516
) from err
518517

519518
def __call__(self, env) -> MathCall:

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ def maybe_cast_to_integer_array(arr: list | np.ndarray, dtype: np.dtype) -> np.n
16511651
# (test_constructor_coercion_signed_to_unsigned) so safe to ignore.
16521652
warnings.filterwarnings(
16531653
"ignore",
1654-
"NumPy will stop allowing conversion of " "out-of-bound Python int",
1654+
"NumPy will stop allowing conversion of out-of-bound Python int",
16551655
DeprecationWarning,
16561656
)
16571657
casted = np.asarray(arr, dtype=dtype)

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,7 @@ def update_dtype(self, dtype: str_type | CategoricalDtype) -> CategoricalDtype:
605605
return self
606606
elif not self.is_dtype(dtype):
607607
raise ValueError(
608-
f"a CategoricalDtype must be passed to perform an update, "
609-
f"got {dtype!r}"
608+
f"a CategoricalDtype must be passed to perform an update, got {dtype!r}"
610609
)
611610
else:
612611
# from here on, dtype is a CategoricalDtype

0 commit comments

Comments
 (0)