Skip to content

Commit 5c8cea5

Browse files
committed
refactor: Remove AbstractMethod exception
I think its existence was a historical artifact of starting this project before the @AbstractMethod decorator was available.
1 parent 511c1a0 commit 5c8cea5

File tree

6 files changed

+1
-53
lines changed

6 files changed

+1
-53
lines changed

doc/source/abstract_method.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ shell-logger
88

99
shell_logger
1010
shell
11-
abstract_method
1211
stats_collector
1312
trace_collector
1413
html_utilities

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ line-length = 79
6868
extend-select = [
6969
"A",
7070
"AIR",
71-
# "ANN",
71+
"ANN",
7272
"ARG",
7373
"ASYNC",
7474
"B",

shell_logger/abstract_method.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

shell_logger/stats_collector.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
from time import sleep, time
1616
from typing import TYPE_CHECKING
1717

18-
from .abstract_method import AbstractMethod
19-
2018
if TYPE_CHECKING:
2119
from multiprocessing.managers import SyncManager
2220

@@ -117,11 +115,7 @@ def collect(self):
117115
Instantaneously collect a statistic.
118116
119117
This is meant to be called repeatedly after some time interval.
120-
121-
Raises:
122-
AbstractMethod: This must be overridden by subclasses.
123118
"""
124-
raise AbstractMethod
125119

126120
@abstractmethod
127121
def unproxied_stats(self):
@@ -130,11 +124,7 @@ def unproxied_stats(self):
130124
131125
Convert from Python's Manager's data structures to base Python
132126
data structures.
133-
134-
Raises:
135-
AbstractMethod: This must be overridden by subclasses.
136127
"""
137-
raise AbstractMethod
138128

139129
def finish(self):
140130
"""

shell_logger/trace_collector.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from abc import abstractmethod
1212
from pathlib import Path
1313

14-
from .abstract_method import AbstractMethod
15-
1614

1715
def trace_collector(**kwargs) -> TraceCollector:
1816
"""
@@ -87,11 +85,7 @@ def trace_args(self) -> str:
8785
8886
The trace command and the arguments you pass to it, but not the
8987
command you're tracing. E.g., return `strace -f -c -e "open"`.
90-
91-
Raises:
92-
AbstractMethod: This needs to be overridden by subclasses.
9388
"""
94-
raise AbstractMethod
9589

9690
def command(self, command: str):
9791
"""

0 commit comments

Comments
 (0)