Skip to content

Commit ffe992d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8a8515b commit ffe992d

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

WrightTools/artists/_base.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ class Axes(matplotlib.axes.Axes):
3737

3838
def _apply_labels(
3939
self,
40-
autolabel:Literal["both", "x", "y"]=None,
41-
xlabel:str=None,
42-
ylabel:str=None,
43-
data:Data=None,
44-
channel:Channel=None
40+
autolabel: Literal["both", "x", "y"] = None,
41+
xlabel: str = None,
42+
ylabel: str = None,
43+
data: Data = None,
44+
channel: Channel = None,
4545
):
46-
"""Apply x and y labels to axes.
47-
Autolabels are ignored if xlabel or ylabel are provided.
46+
"""Apply x and y labels to axes.
47+
Autolabels are ignored if xlabel or ylabel are provided.
4848
4949
NOTE: if autolabel is requested, data is required!
5050
5151
NOTE: if autolabel is requested and data is 1D, channel is required!
52-
52+
5353
Parameters
5454
----------
5555
autolabel : {'both', 'x', 'y'} (optional)
@@ -59,7 +59,7 @@ def _apply_labels(
5959
ylabel : string (optional)
6060
y label. Default is None. if a string, autolabel is overwritten with ylabel
6161
data : WrightTools.data.Data object (optional)
62-
data to autolabel from. Default is None.
62+
data to autolabel from. Default is None.
6363
channel_index : integer (optional)
6464
Channel index. Default is 0.
6565
"""
@@ -77,7 +77,9 @@ def _apply_labels(
7777
if ylabel:
7878
self.set_ylabel(ylabel)
7979

80-
def _parse_limits(self, zi=None, data:Data=None, channel:Channel=None, dynamic_range=False, **kwargs):
80+
def _parse_limits(
81+
self, zi=None, data: Data = None, channel: Channel = None, dynamic_range=False, **kwargs
82+
):
8183
if "norm" in kwargs:
8284
return kwargs
8385
if zi is not None:
@@ -115,7 +117,7 @@ def _parse_plot_args(self, *args, **kwargs):
115117
dynamic_range = kwargs.pop("dynamic_range", False)
116118
if isinstance(args[0], Data):
117119
data = args.pop(0)
118-
channel_:Channel = data.get_channel(kwargs.pop("channel", 0))
120+
channel_: Channel = data.get_channel(kwargs.pop("channel", 0))
119121
squeeze = np.array(channel_.shape) == 1
120122
xa = data.axes[0]
121123
ya = data.axes[1]

WrightTools/data/_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ def get_zenith(self, channel=0) -> tuple:
12861286
Coordinates in units for each axis.
12871287
"""
12881288
# get channel
1289-
channel:Channel = self.get_channel(channel)
1289+
channel: Channel = self.get_channel(channel)
12901290
# get indicies
12911291
idx = channel.argmax()
12921292
# finish

0 commit comments

Comments
 (0)