diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-12-17 12:07:28 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-12-17 12:18:43 +0300 |
commit | 48bd5f88777f4dc94fd41a7dd22808ed639b985d (patch) | |
tree | 6a899d7cc8bd632073408198260a93d76f99ef32 /contrib/python/Twisted/py3/twisted/internet/protocol.py | |
parent | 3e05dc5f5c47aa8d220db7b5508cfbd4a0d8919f (diff) | |
download | ydb-48bd5f88777f4dc94fd41a7dd22808ed639b985d.tar.gz |
Intermediate changes
commit_hash:3786c4fc65af12274eea45a3ef9de6050e262ac0
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/internet/protocol.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/internet/protocol.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/python/Twisted/py3/twisted/internet/protocol.py b/contrib/python/Twisted/py3/twisted/internet/protocol.py index 4fcf0e1038..bd1e647302 100644 --- a/contrib/python/Twisted/py3/twisted/internet/protocol.py +++ b/contrib/python/Twisted/py3/twisted/internet/protocol.py @@ -8,7 +8,7 @@ Standard implementations of Twisted protocol-related interfaces. Start here if you are looking to write a new protocol implementation for Twisted. The Protocol class contains some introductory material. """ - +from __future__ import annotations import random from typing import Any, Callable, Optional @@ -16,7 +16,12 @@ from typing import Any, Callable, Optional from zope.interface import implementer from twisted.internet import defer, error, interfaces -from twisted.internet.interfaces import IAddress, ITransport +from twisted.internet.interfaces import ( + IAddress, + IMulticastTransport, + ITransport, + IUDPTransport, +) from twisted.logger import _loggerFor from twisted.python import components, failure, log @@ -686,7 +691,7 @@ class AbstractDatagramProtocol: UDP. """ - transport = None + transport: IUDPTransport | IMulticastTransport | None = None numPorts = 0 noisy = True @@ -735,7 +740,7 @@ class AbstractDatagramProtocol: Will only be called once, after all ports are disconnected. """ - def makeConnection(self, transport): + def makeConnection(self, transport: IUDPTransport) -> None: """ Make a connection to a transport and a server. |