Skip to content

Commit fefaaee

Browse files
Codebase-wide linting: apply black ignoring docs/_downloads
1 parent 8ca220d commit fefaaee

22 files changed

+10276
-13
lines changed

cf/aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4912,7 +4912,7 @@ def _aggregate_2_fields(
49124912
"Deleted 'actual_range' attribute due to being "
49134913
"outside of 'valid_range' attribute limits."
49144914
)
4915-
4915+
49164916
except (TypeError, IndexError):
49174917
# valid_range is non-CF-compliant
49184918
pass

cf/data/collapse/dask_collapse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*aggregate* parameters of `dask.array.reduction`
55
66
"""
7+
78
from functools import reduce
89
from operator import mul
910

cf/data/creation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functions used during the creation of `Data` objects."""
2+
23
from functools import lru_cache
34

45
import dask.array as da

cf/data/dask_regrid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Regridding functions used within a dask graph."""
2+
23
import numpy as np
34

45

cf/data/dask_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
instance, as would be passed to `dask.array.map_blocks`.
55
66
"""
7+
78
from functools import partial
89

910
import dask.array as da

cf/data/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""General functions useful for `Data` functionality."""
2+
23
from functools import lru_cache, partial, reduce
34
from itertools import product
45
from operator import mul
@@ -1040,9 +1041,11 @@ def normalize_chunks(chunks, shape=None, dtype=None):
10401041
return normalize_chunks(chunks, shape=shape, dtype=dtype)
10411042

10421043
out = [
1043-
(nan,)
1044-
if isnan(size)
1045-
else normalize_chunks(chunk, shape=(size,), dtype=dtype)[0]
1044+
(
1045+
(nan,)
1046+
if isnan(size)
1047+
else normalize_chunks(chunk, shape=(size,), dtype=dtype)[0]
1048+
)
10461049
for chunk, size in zip(chunks, shape)
10471050
]
10481051
return tuple(out)

cf/docstring/docstring.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
.. versionadded:: 3.7.0
2121
2222
"""
23+
2324
_docstring_substitution_definitions = {
2425
# ----------------------------------------------------------------
2526
# General substitutions (not indent-dependent)

cf/functions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,9 +3046,11 @@ def _section(x, axes=None, stop=None, chunks=False, min_step=1):
30463046
axes = [i for i in range(ndim) if i not in axes]
30473047

30483048
indices = [
3049-
(slice(j, j + min_step) for j in range(0, n, min_step))
3050-
if i in axes
3051-
else [slice(None)]
3049+
(
3050+
(slice(j, j + min_step) for j in range(0, n, min_step))
3051+
if i in axes
3052+
else [slice(None)]
3053+
)
30523054
for i, n in enumerate(shape)
30533055
]
30543056

cf/mixin2/cfanetcdf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
situation.
55
66
"""
7+
78
from re import split
89

910
from cfdm.mixin import NetCDFMixin

cf/mixin2/container.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
situation.
55
66
"""
7+
78
from ..docstring import _docstring_substitution_definitions
89

910

0 commit comments

Comments
 (0)