Skip to content

Commit

Permalink
Fix pylint issue with stream component c-extension (home-assistant#52847
Browse files Browse the repository at this point in the history
)

* Rename 'extension-pkg-whitelist' setting to 'extension-pkg-allow-list'
* Add 'av.stream' and 'av.audio.stream'
* Replace 'Any' type hint
  • Loading branch information
cdce8p authored Jul 10, 2021
1 parent dd648f5 commit b5cec35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/stream/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __init__(
self._memory_file: BytesIO = cast(BytesIO, None)
self._av_output: av.container.OutputContainer = None
self._input_video_stream: av.video.VideoStream = None
self._input_audio_stream: Any | None = None # av.audio.AudioStream | None
self._input_audio_stream: av.audio.stream.AudioStream | None = None
self._output_video_stream: av.video.VideoStream = None
self._output_audio_stream: Any | None = None # av.audio.AudioStream | None
self._output_audio_stream: av.audio.stream.AudioStream | None = None
self._segment: Segment | None = None
# the following 3 member variables are used for Part formation
self._memory_file_pos: int = cast(int, None)
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ load-plugins = [
"hass_logger",
]
persistent = false
extension-pkg-whitelist = [
extension-pkg-allow-list = [
"av.audio.stream",
"av.stream",
"ciso8601",
"cv2",
]
Expand Down

0 comments on commit b5cec35

Please sign in to comment.