Skip to content

Commit

Permalink
Use typing.NamedTuple (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
q0w committed Nov 17, 2021
1 parent be17ad3 commit 2c26346
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiodocker/stream.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import socket
import struct
import warnings
from collections import namedtuple
from types import TracebackType
from typing import TYPE_CHECKING, Awaitable, Callable, Optional, Tuple, Type
from typing import TYPE_CHECKING, Awaitable, Callable, NamedTuple, Optional, Tuple, Type

import aiohttp
from yarl import URL
Expand All @@ -14,7 +13,10 @@
if TYPE_CHECKING:
from .docker import Docker

Message = namedtuple("Message", "stream data")

class Message(NamedTuple):
stream: int
data: bytes


class Stream:
Expand Down

0 comments on commit 2c26346

Please sign in to comment.