File tree Expand file tree Collapse file tree 2 files changed +0
-24
lines changed Expand file tree Collapse file tree 2 files changed +0
-24
lines changed Original file line number Diff line number Diff line change 196196
197197
198198from .version import version as __version__
199-
200-
201- # backwards compat
202- # TODO: remove in 2024
203- def __getattr__ (name ):
204- if name != "sensors" :
205- from .sensors import __all__ as sensors_all
206-
207- if name in sensors_all :
208- import warnings
209- from . import sensors
210-
211- message = f"{ __name__ } .{ name } has moved to { __name__ } .sensors"
212- warnings .warn (message , FutureWarning , stacklevel = 2 )
213- return getattr (sensors , name )
214-
215- raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " )
Original file line number Diff line number Diff line change 66def test_cancoder ():
77 enc = phoenix5 .sensors .CANCoder (0 )
88 enc .getPosition ()
9-
10-
11- def test_deprecated_import ():
12- with pytest .warns (FutureWarning , match = "moved" ):
13- from phoenix5 import CANCoder
14-
15- assert CANCoder is phoenix5 .sensors .CANCoder
You can’t perform that action at this time.
0 commit comments