Browse Source

fix __exit__ return type hint

Fabian Peter Hammerle 3 years ago
parent
commit
ea787234b9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cc1101/__init__.py

+ 1 - 1
cc1101/__init__.py

@@ -319,7 +319,7 @@ class CC1101:
             raise ValueError("expected marcstate idle (actual: {})".format(marcstate))
         return self
 
-    def __exit__(self, exc_type, exc_value, traceback) -> bool:
+    def __exit__(self, exc_type, exc_value, traceback) -> typing.Literal[False]:
         # https://docs.python.org/3/reference/datamodel.html#object.__exit__
         self._spi.close()
         return False