Skip to content

Commit 8167ac0

Browse files
committed
Add *Base aliases in module
1 parent 9f617fb commit 8167ac0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

commands2/__init__.py

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

0 commit comments

Comments
 (0)