Skip to content

Commit 327a29e

Browse files
committed
Add *Base aliases in module
1 parent 1d7b499 commit 327a29e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

commands2/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,19 @@
9191
# "deadline",
9292
"Trigger", # was here in 2023
9393
]
94+
95+
96+
def __getattr__(attr):
97+
if attr == "SubsystemBase":
98+
import warnings
99+
100+
warnings.warn("SubsystemBase is deprecated", DeprecationWarning, stacklevel=2)
101+
return Subsystem
102+
103+
if attr == "CommandBase":
104+
import warnings
105+
106+
warnings.warn("CommandBase is deprecated", DeprecationWarning, stacklevel=2)
107+
return Command
108+
109+
raise AttributeError("module {!r} has no attribute " "{!r}".format(__name__, attr))

0 commit comments

Comments
 (0)