Start adding ANN ruff rules
This commit is contained in:
parent
154f063ab3
commit
24233412af
19 changed files with 123 additions and 46 deletions
|
|
@ -9,6 +9,7 @@ See repository root for licensing information.
|
|||
from __future__ import annotations
|
||||
import logging
|
||||
from typing import Literal, Optional
|
||||
from types import TracebackType
|
||||
from threading import Thread
|
||||
import time
|
||||
|
||||
|
|
@ -212,7 +213,12 @@ class SimulatedCamera(BaseCamera):
|
|||
self.start_streaming()
|
||||
return self
|
||||
|
||||
def __exit__(self, _exc_type, _exc_value, _traceback):
|
||||
def __exit__(
|
||||
self,
|
||||
_exc_type: type[BaseException],
|
||||
_exc_value: Optional[BaseException],
|
||||
_traceback: Optional[TracebackType],
|
||||
):
|
||||
"""Close the capture thread when the Thing context manager is closed."""
|
||||
if self.stream_active:
|
||||
self._capture_enabled = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue