Skip to content

Commit

Permalink
Add py39 target in Black's configuration, bump Black to 21.5b2 (panda…
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli authored Jun 9, 2021
1 parent ce3bac9 commit eccfe90
Show file tree
Hide file tree
Showing 84 changed files with 637 additions and 927 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: absolufy-imports
files: ^pandas/
- repo: https://github.com/python/black
rev: 20.8b1
rev: 21.5b2
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
Expand Down
2 changes: 1 addition & 1 deletion doc/source/development/contributing_codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ submitting code to run the check yourself::
to auto-format your code. Additionally, many editors have plugins that will
apply ``black`` as you edit files.

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

One caveat about ``git diff upstream/master -u -- "*.py" | flake8 --diff``: this
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- cython>=0.29.21

# code checks
- black=20.8b1
- black=21.5b2
- cpplint
- flake8=3.9.2
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
Expand Down
8 changes: 4 additions & 4 deletions pandas/_config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_default_val(pat: str):


class DictWrapper:
""" provide attribute-style access to a nested dict"""
"""provide attribute-style access to a nested dict"""

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


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

Expand Down Expand Up @@ -643,7 +643,7 @@ def _warn_if_deprecated(key: str) -> bool:


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

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


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

Expand Down
Loading

0 comments on commit eccfe90

Please sign in to comment.