Skip to content

Commit 6263f03

Browse files
authored
Merge pull request #65 from ISISComputingGroup/be_nitpicky
Be nitpicky
2 parents d7e1269 + 7b4b9a0 commit 6263f03

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

doc/conf.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@
1616
author = "ISIS Experiment Controls"
1717
release = "0.1"
1818

19-
2019
# -- General configuration ---------------------------------------------------
2120
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2221

22+
nitpicky = True
23+
nitpick_ignore_regex = [
24+
("py:func", r"^(?!ibex_bluesky_core\.).*$"),
25+
("py:class", r"^(?!ibex_bluesky_core\.).*$"),
26+
("py:class", r"^.*\.T$"),
27+
("py:obj", r"^.*\.T$"),
28+
]
29+
2330
myst_enable_extensions = ["dollarmath"]
2431

2532
extensions = [

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,6 @@ reportUntypedClassDecorator = true
110110
reportUntypedFunctionDecorator = true
111111

112112
[tool.setuptools_scm]
113+
114+
[tool.build_sphinx]
115+

src/ibex_bluesky_core/devices/block.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
logger = logging.getLogger(__name__)
2323

24-
"""Block data type"""
24+
# Block data type
2525
T = TypeVar("T")
2626

2727

src/ibex_bluesky_core/devices/simpledae/waiters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
T = TypeVar("T", int, float)
2323

2424

25-
class _SimpleWaiter(Waiter, Generic[T], metaclass=ABCMeta):
25+
class SimpleWaiter(Waiter, Generic[T], metaclass=ABCMeta):
2626
"""Wait for a single DAE variable to be greater or equal to a specified numeric value."""
2727

2828
def __init__(self, value: T) -> None:
@@ -47,34 +47,34 @@ def additional_readable_signals(self, dae: "SimpleDae") -> list[Device]:
4747

4848
@abstractmethod
4949
def get_signal(self, dae: "SimpleDae") -> SignalR[T]:
50-
pass
50+
"""Get the numeric signal to wait for."""
5151

5252

53-
class PeriodGoodFramesWaiter(_SimpleWaiter[int]):
53+
class PeriodGoodFramesWaiter(SimpleWaiter[int]):
5454
"""Wait for period good frames to reach a user-specified value."""
5555

5656
def get_signal(self, dae: "SimpleDae") -> SignalR[int]:
5757
"""Wait for period good frames."""
5858
return dae.period.good_frames
5959

6060

61-
class GoodFramesWaiter(_SimpleWaiter[int]):
61+
class GoodFramesWaiter(SimpleWaiter[int]):
6262
"""Wait for good frames to reach a user-specified value."""
6363

6464
def get_signal(self, dae: "SimpleDae") -> SignalR[int]:
6565
"""Wait for good frames."""
6666
return dae.good_frames
6767

6868

69-
class GoodUahWaiter(_SimpleWaiter[float]):
69+
class GoodUahWaiter(SimpleWaiter[float]):
7070
"""Wait for good microamp-hours to reach a user-specified value."""
7171

7272
def get_signal(self, dae: "SimpleDae") -> SignalR[float]:
7373
"""Wait for good uah."""
7474
return dae.good_uah
7575

7676

77-
class MEventsWaiter(_SimpleWaiter[float]):
77+
class MEventsWaiter(SimpleWaiter[float]):
7878
"""Wait for a user-specified number of millions of events."""
7979

8080
def get_signal(self, dae: "SimpleDae") -> SignalR[float]:

0 commit comments

Comments
 (0)