Skip to content

Commit 6df9971

Browse files
committed
Add type hint for DCMotor.__exit__() traceback argument
1 parent 0c9849f commit 6df9971

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_motor/motor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
try:
2424
from typing import Optional, Type
25+
from types import TracebackType
2526
from pwmio import PWMOut
2627
except ImportError:
2728
pass
@@ -115,5 +116,5 @@ def decay_mode(self, mode: int = FAST_DECAY):
115116
def __enter__(self):
116117
return self
117118

118-
def __exit__(self, exception_type: Optional[Type[type]], exception_value: Optional[BaseException], traceback): # TODO: Add traceback typing
119+
def __exit__(self, exception_type: Optional[Type[type]], exception_value: Optional[BaseException], traceback: Optional[TracebackType]):
119120
self.throttle = None

0 commit comments

Comments
 (0)