Skip to content

Commit 9b6d66e

Browse files
authored
CI: Update version of 'black' (#36493)
1 parent 16df8a4 commit 9b6d66e

File tree

25 files changed

+56
-76
lines changed

25 files changed

+56
-76
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/python/black
3-
rev: 19.10b0
3+
rev: 20.8b1
44
hooks:
55
- id: black
66
language_version: python3

asv_bench/benchmarks/arithmetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def setup(self, op):
125125
arr1 = np.random.randn(n_rows, int(n_cols / 2)).astype("f8")
126126
arr2 = np.random.randn(n_rows, int(n_cols / 2)).astype("f4")
127127
df = pd.concat(
128-
[pd.DataFrame(arr1), pd.DataFrame(arr2)], axis=1, ignore_index=True,
128+
[pd.DataFrame(arr1), pd.DataFrame(arr2)], axis=1, ignore_index=True
129129
)
130130
# should already be the case, but just to be sure
131131
df._consolidate_inplace()

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def main():
286286

287287
joined = ",".join(cmds)
288288
argparser = argparse.ArgumentParser(
289-
description="pandas documentation builder", epilog=f"Commands: {joined}",
289+
description="pandas documentation builder", epilog=f"Commands: {joined}"
290290
)
291291

292292
joined = ", ".join(cmds)

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308

309309
for method in methods:
310310
# ... and each of its public methods
311-
moved_api_pages.append((f"{old}.{method}", f"{new}.{method}",))
311+
moved_api_pages.append((f"{old}.{method}", f"{new}.{method}"))
312312

313313
if pattern is None:
314314
html_additional_pages = {

doc/source/development/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ submitting code to run the check yourself::
720720
to auto-format your code. Additionally, many editors have plugins that will
721721
apply ``black`` as you edit files.
722722

723-
You should use a ``black`` version >= 19.10b0 as previous versions are not compatible
723+
You should use a ``black`` version 20.8b1 as previous versions are not compatible
724724
with the pandas codebase.
725725

726726
If you wish to run these checks automatically, we encourage you to use

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- cython>=0.29.21
1616

1717
# code checks
18-
- black=19.10b0
18+
- black=20.8b1
1919
- cpplint
2020
- flake8<3.8.0 # temporary pin, GH#34150
2121
- flake8-comprehensions>=3.1.0 # used by flake8, linting of unnecessary comprehensions

pandas/_vendored/typing_extensions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,8 +2116,7 @@ def __init_subclass__(cls, *args, **kwargs):
21162116
raise TypeError(f"Cannot subclass {cls.__module__}.Annotated")
21172117

21182118
def _strip_annotations(t):
2119-
"""Strips the annotations from a given type.
2120-
"""
2119+
"""Strips the annotations from a given type."""
21212120
if isinstance(t, _AnnotatedAlias):
21222121
return _strip_annotations(t.__origin__)
21232122
if isinstance(t, typing._GenericAlias):

pandas/core/aggregation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def validate_func_kwargs(
387387

388388

389389
def transform(
390-
obj: FrameOrSeries, func: AggFuncType, axis: Axis, *args, **kwargs,
390+
obj: FrameOrSeries, func: AggFuncType, axis: Axis, *args, **kwargs
391391
) -> FrameOrSeries:
392392
"""
393393
Transform a DataFrame or Series

pandas/core/algorithms.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,11 +1022,10 @@ def checked_add_with_arr(arr, b, arr_mask=None, b_mask=None):
10221022
to_raise = ((np.iinfo(np.int64).max - b2 < arr) & not_nan).any()
10231023
else:
10241024
to_raise = (
1025-
((np.iinfo(np.int64).max - b2[mask1] < arr[mask1]) & not_nan[mask1]).any()
1026-
or (
1027-
(np.iinfo(np.int64).min - b2[mask2] > arr[mask2]) & not_nan[mask2]
1028-
).any()
1029-
)
1025+
(np.iinfo(np.int64).max - b2[mask1] < arr[mask1]) & not_nan[mask1]
1026+
).any() or (
1027+
(np.iinfo(np.int64).min - b2[mask2] > arr[mask2]) & not_nan[mask2]
1028+
).any()
10301029

10311030
if to_raise:
10321031
raise OverflowError("Overflow in int64 addition")

pandas/core/array_algos/replace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def compare_or_regex_search(
20-
a: ArrayLike, b: Union[Scalar, Pattern], regex: bool, mask: ArrayLike,
20+
a: ArrayLike, b: Union[Scalar, Pattern], regex: bool, mask: ArrayLike
2121
) -> Union[ArrayLike, bool]:
2222
"""
2323
Compare two array_like inputs of the same shape or two scalar values

0 commit comments

Comments
 (0)