Skip to content

Commit 193a46e

Browse files
jschendeljorisvandenbossche
authored andcommitted
STYLE: Specify target-version with black (#29607)
1 parent 0511754 commit 193a46e

38 files changed

+150
-130
lines changed

ci/code_checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
5656
black --version
5757

5858
MSG='Checking black formatting' ; echo $MSG
59-
black . --check --exclude '(asv_bench/env|\.egg|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist|setup.py)'
59+
black . --check
6060
RET=$(($RET + $?)) ; echo $MSG "DONE"
6161

6262
# `setup.cfg` contains the list of error codes that are being ignored in flake8

pandas/core/frame.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,7 @@ def to_stata(
20822082
data_label=data_label,
20832083
write_index=write_index,
20842084
variable_labels=variable_labels,
2085-
**kwargs
2085+
**kwargs,
20862086
)
20872087
writer.write_file()
20882088

@@ -2106,7 +2106,7 @@ def to_parquet(
21062106
compression="snappy",
21072107
index=None,
21082108
partition_cols=None,
2109-
**kwargs
2109+
**kwargs,
21102110
):
21112111
"""
21122112
Write a DataFrame to the binary parquet format.
@@ -2186,7 +2186,7 @@ def to_parquet(
21862186
compression=compression,
21872187
index=index,
21882188
partition_cols=partition_cols,
2189-
**kwargs
2189+
**kwargs,
21902190
)
21912191

21922192
@Substitution(
@@ -4110,7 +4110,7 @@ def fillna(
41104110
inplace=False,
41114111
limit=None,
41124112
downcast=None,
4113-
**kwargs
4113+
**kwargs,
41144114
):
41154115
return super().fillna(
41164116
value=value,
@@ -4119,7 +4119,7 @@ def fillna(
41194119
inplace=inplace,
41204120
limit=limit,
41214121
downcast=downcast,
4122-
**kwargs
4122+
**kwargs,
41234123
)
41244124

41254125
@Appender(_shared_docs["replace"] % _shared_doc_kwargs)
@@ -6566,7 +6566,7 @@ def _gotitem(
65666566
see_also=_agg_summary_and_see_also_doc,
65676567
examples=_agg_examples_doc,
65686568
versionadded="\n.. versionadded:: 0.20.0\n",
6569-
**_shared_doc_kwargs
6569+
**_shared_doc_kwargs,
65706570
)
65716571
@Appender(_shared_docs["aggregate"])
65726572
def aggregate(self, func, axis=0, *args, **kwargs):

pandas/core/generic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ def __getstate__(self):
20552055
_typ=self._typ,
20562056
_metadata=self._metadata,
20572057
attrs=self.attrs,
2058-
**meta
2058+
**meta,
20592059
)
20602060

20612061
def __setstate__(self, state):
@@ -7050,7 +7050,7 @@ def interpolate(
70507050
limit_direction="forward",
70517051
limit_area=None,
70527052
downcast=None,
7053-
**kwargs
7053+
**kwargs,
70547054
):
70557055
"""
70567056
Interpolate values according to different methods.
@@ -7124,7 +7124,7 @@ def interpolate(
71247124
limit_area=limit_area,
71257125
inplace=inplace,
71267126
downcast=downcast,
7127-
**kwargs
7127+
**kwargs,
71287128
)
71297129

71307130
if inplace:
@@ -11572,7 +11572,7 @@ def stat_func(
1157211572
level=None,
1157311573
numeric_only=None,
1157411574
min_count=0,
11575-
**kwargs
11575+
**kwargs,
1157611576
):
1157711577
if name == "sum":
1157811578
nv.validate_sum(tuple(), kwargs)

pandas/core/groupby/groupby.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ def median(self, **kwargs):
12141214
return self._cython_agg_general(
12151215
"median",
12161216
alt=lambda x, axis: Series(x).median(axis=axis, **kwargs),
1217-
**kwargs
1217+
**kwargs,
12181218
)
12191219

12201220
@Substitution(name="groupby")
@@ -2181,7 +2181,7 @@ def _get_cythonized_result(
21812181
result_is_index: bool = False,
21822182
pre_processing=None,
21832183
post_processing=None,
2184-
**kwargs
2184+
**kwargs,
21852185
):
21862186
"""
21872187
Get result for Cythonized functions.

pandas/core/indexes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def __new__(
265265
name=None,
266266
fastpath=None,
267267
tupleize_cols=True,
268-
**kwargs
268+
**kwargs,
269269
) -> "Index":
270270

271271
from .range import RangeIndex

pandas/core/indexes/datetimes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ def date_range(
14281428
normalize=False,
14291429
name=None,
14301430
closed=None,
1431-
**kwargs
1431+
**kwargs,
14321432
):
14331433
"""
14341434
Return a fixed frequency DatetimeIndex.
@@ -1578,7 +1578,7 @@ def date_range(
15781578
tz=tz,
15791579
normalize=normalize,
15801580
closed=closed,
1581-
**kwargs
1581+
**kwargs,
15821582
)
15831583
return DatetimeIndex._simple_new(dtarr, tz=dtarr.tz, freq=dtarr.freq, name=name)
15841584

@@ -1594,7 +1594,7 @@ def bdate_range(
15941594
weekmask=None,
15951595
holidays=None,
15961596
closed=None,
1597-
**kwargs
1597+
**kwargs,
15981598
):
15991599
"""
16001600
Return a fixed frequency DatetimeIndex, with business day as the default
@@ -1687,7 +1687,7 @@ def bdate_range(
16871687
normalize=normalize,
16881688
name=name,
16891689
closed=closed,
1690-
**kwargs
1690+
**kwargs,
16911691
)
16921692

16931693

pandas/core/indexes/interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ def get_loc(
935935
None is specified as these are not yet implemented.
936936
"""
937937
)
938-
}
938+
},
939939
)
940940
)
941941
@Appender(_index_shared_docs["get_indexer"])

pandas/core/indexes/multi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def copy(
956956
codes=None,
957957
deep=False,
958958
_set_identity=False,
959-
**kwargs
959+
**kwargs,
960960
):
961961
"""
962962
Make a copy of this object. Names, dtype, levels and codes can be
@@ -1020,7 +1020,7 @@ def _shallow_copy_with_infer(self, values, **kwargs):
10201020
return MultiIndex(
10211021
levels=[[] for _ in range(self.nlevels)],
10221022
codes=[[] for _ in range(self.nlevels)],
1023-
**kwargs
1023+
**kwargs,
10241024
)
10251025
return self._shallow_copy(values, **kwargs)
10261026

pandas/core/indexes/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def __new__(
194194
dtype=None,
195195
copy=False,
196196
name=None,
197-
**fields
197+
**fields,
198198
):
199199

200200
valid_field_set = {

pandas/core/internals/blocks.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def interpolate(
10881088
fill_value=None,
10891089
coerce=False,
10901090
downcast=None,
1091-
**kwargs
1091+
**kwargs,
10921092
):
10931093

10941094
inplace = validate_bool_kwarg(inplace, "inplace")
@@ -1138,7 +1138,7 @@ def check_int_bool(self, inplace):
11381138
fill_value=fill_value,
11391139
inplace=inplace,
11401140
downcast=downcast,
1141-
**kwargs
1141+
**kwargs,
11421142
)
11431143

11441144
def _interpolate_with_fill(
@@ -1193,7 +1193,7 @@ def _interpolate(
11931193
limit_area=None,
11941194
inplace=False,
11951195
downcast=None,
1196-
**kwargs
1196+
**kwargs,
11971197
):
11981198
""" interpolate using scipy wrappers """
11991199

@@ -1231,7 +1231,7 @@ def func(x):
12311231
limit_area=limit_area,
12321232
fill_value=fill_value,
12331233
bounds_error=False,
1234-
**kwargs
1234+
**kwargs,
12351235
)
12361236

12371237
# interp each column independently
@@ -2016,7 +2016,7 @@ def to_native_types(
20162016
float_format=None,
20172017
decimal=".",
20182018
quoting=None,
2019-
**kwargs
2019+
**kwargs,
20202020
):
20212021
""" convert to our native types format, slicing if desired """
20222022

0 commit comments

Comments
 (0)