Skip to content

Commit 3c0c6ff

Browse files
committed
reblacken
1 parent a929e7d commit 3c0c6ff

File tree

10 files changed

+35
-29
lines changed

10 files changed

+35
-29
lines changed

data_prototype/axes.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,28 @@ def scatter(
102102
pipeline.append(lambda x: np.ma.ravel(x))
103103
pipeline.append(lambda y: np.ma.ravel(y))
104104
pipeline.append(
105-
lambda s: np.ma.ravel(s)
106-
if s is not None
107-
else [20]
108-
if mpl.rcParams["_internal.classic_mode"]
109-
else [mpl.rcParams["lines.markersize"] ** 2.0]
105+
lambda s: (
106+
np.ma.ravel(s)
107+
if s is not None
108+
else (
109+
[20]
110+
if mpl.rcParams["_internal.classic_mode"]
111+
else [mpl.rcParams["lines.markersize"] ** 2.0]
112+
)
113+
)
110114
)
111115
# TODO plotnonfinite/mask combining
112116
pipeline.append(
113-
lambda marker: marker
114-
if marker is not None
115-
else mpl.rcParams["scatter.marker"]
117+
lambda marker: (
118+
marker if marker is not None else mpl.rcParams["scatter.marker"]
119+
)
116120
)
117121
pipeline.append(
118-
lambda marker: marker
119-
if isinstance(marker, mmarkers.MarkerStyle)
120-
else mmarkers.MarkerStyle(marker)
122+
lambda marker: (
123+
marker
124+
if isinstance(marker, mmarkers.MarkerStyle)
125+
else mmarkers.MarkerStyle(marker)
126+
)
121127
)
122128
pipeline.append(
123129
FunctionConversionNode.from_funcs(

data_prototype/containers.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@
2626

2727

2828
class _MatplotlibTransform(Protocol):
29-
def transform(self, verts):
30-
...
29+
def transform(self, verts): ...
3130

32-
def __sub__(self, other) -> "_MatplotlibTransform":
33-
...
31+
def __sub__(self, other) -> "_MatplotlibTransform": ...
3432

3533

3634
class DataContainer(Protocol):
@@ -80,18 +78,19 @@ def describe(self) -> Dict[str, Desc]:
8078
...
8179

8280

83-
class NoNewKeys(ValueError):
84-
...
81+
class NoNewKeys(ValueError): ...
8582

8683

8784
class ArrayContainer:
8885
def __init__(self, **data):
8986
self._data = data
9087
self._cache_key = str(uuid.uuid4())
9188
self._desc = {
92-
k: Desc(v.shape, v.dtype)
93-
if isinstance(v, np.ndarray)
94-
else Desc((), type(v))
89+
k: (
90+
Desc(v.shape, v.dtype)
91+
if isinstance(v, np.ndarray)
92+
else Desc((), type(v))
93+
)
9594
for k, v in data.items()
9695
}
9796

data_prototype/wrappers.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ class _BBox(Protocol):
3535

3636

3737
class _Axis(Protocol):
38-
def convert_units(self, Any) -> Any:
39-
...
38+
def convert_units(self, Any) -> Any: ...
4039

4140

4241
class _Axes(Protocol):
@@ -46,14 +45,11 @@ class _Axes(Protocol):
4645
transData: _MatplotlibTransform
4746
transAxes: _MatplotlibTransform
4847

49-
def get_xlim(self) -> Tuple[float, float]:
50-
...
48+
def get_xlim(self) -> Tuple[float, float]: ...
5149

52-
def get_ylim(self) -> Tuple[float, float]:
53-
...
50+
def get_ylim(self) -> Tuple[float, float]: ...
5451

55-
def get_window_extent(self, renderer) -> _BBox:
56-
...
52+
def get_window_extent(self, renderer) -> _BBox: ...
5753

5854

5955
class _Aritst(Protocol):

examples/animation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
:class:`.wrappers.LineWrapper`, and :class:`.wrappers.FormattedText`.
88
99
"""
10+
1011
import time
1112
from typing import Dict, Tuple, Any, Union
1213
from functools import partial

examples/lissajous.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
An animated scatter plot using a custom container and :class:`.wrappers.PathCollectionWrapper`
99
1010
"""
11+
1112
import time
1213
from typing import Dict, Tuple, Any, Union
1314
from functools import partial

examples/scatter_with_custom_axes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
implementation of container-based artist drawing.
1212
"""
1313

14-
1514
import data_prototype.axes # side-effect registers projection # noqa
1615

1716
import matplotlib.pyplot as plt

examples/simple_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:class:`.containers.ArrayContainer`.
99
1010
"""
11+
1112
import numpy as np
1213

1314
import matplotlib.pyplot as plt

examples/simple_scatter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
A quick scatter plot using :class:`.containers.ArrayContainer` and
77
:class:`.wrappers.PathCollectionWrapper`.
88
"""
9+
910
import numpy as np
1011

1112
import matplotlib.pyplot as plt

examples/units.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
Using third party units functionality in conjunction with Matplotlib Axes
77
"""
8+
89
import numpy as np
910

1011
import matplotlib.pyplot as plt

examples/widgets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
a sine wave.
88
99
"""
10+
1011
import inspect
1112

1213
import numpy as np

0 commit comments

Comments
 (0)