Skip to content

Commit e6bb373

Browse files
committed
Type annotations in rprof module
1 parent fb81129 commit e6bb373

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

stagpy/rprof.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
"""Plot radial profiles."""
2+
3+
from __future__ import annotations
4+
import typing
5+
26
import matplotlib.pyplot as plt
37

48
from . import conf, _helpers
59
from .stagyydata import StagyyData
610

11+
if typing.TYPE_CHECKING:
12+
from ._step import Step, _Rprofs
13+
714

8-
def plot_rprofs(rprofs, names):
15+
def plot_rprofs(rprofs: _Rprofs, names: str):
916
"""Plot requested radial profiles.
1017
1118
Args:
12-
rprofs (:class:`~stagpy._step._Rprofs`): a radial profile viewer
13-
such as :attr:`Step.rprofs` and :attr:`_StepsView.rprofs_averaged`.
14-
names (str): profile names separated by ``-`` (figures), ``.``
15-
(subplots) and ``,`` (same subplot).
19+
rprofs: a radial profile collection, such as :attr:`Step.rprofs` or
20+
:attr:`_StepsView.rprofs_averaged`.
21+
names: profile names separated by ``-`` (figures), ``.`` (subplots) and
22+
``,`` (same subplot).
1623
"""
1724
try:
1825
stepstr = rprofs.steps.stepstr
@@ -59,7 +66,7 @@ def plot_rprofs(rprofs, names):
5966
_helpers.saveplot(fig, fname + stepstr)
6067

6168

62-
def plot_grid(step):
69+
def plot_grid(step: Step):
6370
"""Plot cell position and thickness.
6471
6572
The figure is call grid_N.pdf where N is replace by the step index.

0 commit comments

Comments
 (0)