-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
a: apiRelated to exposed core API of the projectRelated to exposed core API of the projectt: enhancementImprovement to an existing featureImprovement to an existing feature
Description
mcstatus/mcstatus/protocol/connection.py
Lines 412 to 431 in baf514f
| class BaseConnection: | |
| """Base Connection class. Implements flush, receive, and remaining.""" | |
| __slots__ = () | |
| def __repr__(self) -> str: | |
| """Return representation of self.""" | |
| return f"<{self.__class__.__name__} Object>" | |
| def flush(self) -> bytearray: | |
| """Raise TypeError, unsupported.""" | |
| raise TypeError(f"{self.__class__.__name__} does not support flush()") | |
| def receive(self, data: BytesConvertable | bytearray) -> None: | |
| """Raise TypeError, unsupported.""" | |
| raise TypeError(f"{self.__class__.__name__} does not support receive()") | |
| def remaining(self) -> int: | |
| """Raise TypeError, unsupported.""" | |
| raise TypeError(f"{self.__class__.__name__} does not support remaining()") |
This class only adds methods, that just raise exception. We should use abstract class here.
Metadata
Metadata
Assignees
Labels
a: apiRelated to exposed core API of the projectRelated to exposed core API of the projectt: enhancementImprovement to an existing featureImprovement to an existing feature