Skip to content

Commit 7550964

Browse files
fangchenliJulianWgs
authored andcommitted
Add py39 target in Black's configuration, bump Black to 21.5b2 (pandas-dev#38376)
1 parent 15d4548 commit 7550964

Some content is hidden

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

84 files changed

+637
-927
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: absolufy-imports
1010
files: ^pandas/
1111
- repo: https://github.com/python/black
12-
rev: 20.8b1
12+
rev: 21.5b2
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/codespell-project/codespell

doc/source/development/contributing_codebase.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ submitting code to run the check yourself::
169169
to auto-format your code. Additionally, many editors have plugins that will
170170
apply ``black`` as you edit files.
171171

172-
You should use a ``black`` version 20.8b1 as previous versions are not compatible
172+
You should use a ``black`` version 21.5b2 as previous versions are not compatible
173173
with the pandas codebase.
174174

175175
One caveat about ``git diff upstream/master -u -- "*.py" | flake8 --diff``: this

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
- cython>=0.29.21
1919

2020
# code checks
21-
- black=20.8b1
21+
- black=21.5b2
2222
- cpplint
2323
- flake8=3.9.2
2424
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs

pandas/_config/config.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def get_default_val(pat: str):
189189

190190

191191
class DictWrapper:
192-
""" provide attribute-style access to a nested dict"""
192+
"""provide attribute-style access to a nested dict"""
193193

194194
def __init__(self, d: dict[str, Any], prefix: str = ""):
195195
object.__setattr__(self, "d", d)
@@ -571,7 +571,7 @@ def _get_root(key: str) -> tuple[dict[str, Any], str]:
571571

572572

573573
def _is_deprecated(key: str) -> bool:
574-
""" Returns True if the given option has been deprecated """
574+
"""Returns True if the given option has been deprecated"""
575575
key = key.lower()
576576
return key in _deprecated_options
577577

@@ -643,7 +643,7 @@ def _warn_if_deprecated(key: str) -> bool:
643643

644644

645645
def _build_option_description(k: str) -> str:
646-
""" Builds a formatted description of a registered option and prints it """
646+
"""Builds a formatted description of a registered option and prints it"""
647647
o = _get_registered_option(k)
648648
d = _get_deprecated_option(k)
649649

@@ -667,7 +667,7 @@ def _build_option_description(k: str) -> str:
667667

668668

669669
def pp_options_list(keys: Iterable[str], width=80, _print: bool = False):
670-
""" Builds a concise listing of available options, grouped by prefix """
670+
"""Builds a concise listing of available options, grouped by prefix"""
671671
from itertools import groupby
672672
from textwrap import wrap
673673

0 commit comments

Comments
 (0)