Skip to content

Commit 5c8844c

Browse files
authored
Update isort cfg. (#106)
* Update isort cfg. * Update pre-commit * Blacken
1 parent 4ccbfd2 commit 5c8844c

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ repos:
77

88
# isort should run before black as black sometimes tweaks the isort output
99
- repo: https://github.com/timothycrosley/isort
10-
rev: 5.0.9
10+
rev: 5.6.4
1111
hooks:
1212
- id: isort
1313
files: .+\.py$
1414

1515
# https://github.com/python/black#version-control-integration
1616
- repo: https://github.com/python/black
17-
rev: 19.10b0
17+
rev: 20.8b1
1818
hooks:
1919
- id: black
2020

2121
- repo: https://gitlab.com/pycqa/flake8
22-
rev: 3.8.3
22+
rev: 3.8.4
2323
hooks:
2424
- id: flake8
2525

2626
- repo: https://github.com/pre-commit/mirrors-mypy
27-
rev: v0.782 # Must match ci/requirements/*.yml
27+
rev: v0.790 # Must match ci/requirements/*.yml
2828
hooks:
2929
- id: mypy
3030

@@ -34,7 +34,7 @@ repos:
3434
- id: prenotebook
3535

3636
- repo: https://github.com/myint/rstcheck
37-
rev: master
37+
rev: 3f92957478422df87bd730abde66f089cc1ee19b
3838
hooks:
3939
- id: rstcheck
4040
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194

cf_xarray/tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def raises_regex(error, pattern):
1818

1919

2020
class CountingScheduler:
21-
""" Simple dask scheduler counting the number of computes.
21+
"""Simple dask scheduler counting the number of computes.
2222
23-
Reference: https://stackoverflow.com/questions/53289286/ """
23+
Reference: https://stackoverflow.com/questions/53289286/"""
2424

2525
def __init__(self, max_computes=0):
2626
self.total_computes = 0

cf_xarray/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def is_dict_like(value: Any) -> bool:
3333

3434
# copied from xarray
3535
class UncachedAccessor:
36-
""" Acts like a property, but on both classes and class instances
36+
"""Acts like a property, but on both classes and class instances
3737
This class is necessary because some tools (e.g. pydoc and sphinx)
3838
inspect classes for which property returns itself and not the
3939
accessor.

setup.cfg

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ exclude=
3636
doc
3737

3838
[isort]
39+
profile = black
40+
skip_gitignore = true
41+
force_to_top = true
3942
default_section = THIRDPARTY
4043
known_first_party = cf_xarray
41-
multi_line_output = 3
42-
include_trailing_comma = True
43-
force_grid_wrap = 0
44-
use_parentheses = True
45-
line_length = 88
4644
known_third_party = dask,matplotlib,numpy,pandas,pytest,setuptools,sphinx_autosummary_accessors,xarray
4745

4846
# Most of the numerical computing stack doesn't have type annotations yet.

0 commit comments

Comments
 (0)