-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
stubs: false positiveType checkers report false errorsType checkers report false errors
Description
I use container.attach(stdout=True, stderr=True, stream=True, logs=True) and I get a <class 'docker.types.daemon.CancellableStream'>, and when iterating over it I get each line as a bytes object which I .decode("utf-8"). My code works correctly
In mypy 1.19.1 I get
code.py:492: error: Item "str" of "str | tuple[str | None, str | None] | None" has no attribute "decode" [union-attr]
code.py:492: error: Item "None" of "str | tuple[str | None, str | None] | None" has no attribute "decode" [union-attr]
code.py:492: error: Item "tuple[str | None, ...]" of "str | tuple[str | None, str | None] | None" has no attribute "decode" [union-attr]
I think the stubs are wrong on this line
| def attach( |
Thank you!
Metadata
Metadata
Assignees
Labels
stubs: false positiveType checkers report false errorsType checkers report false errors