aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/conch/interfaces.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-08-25 12:54:32 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-08-25 13:03:33 +0300
commit4a64a813e1d34e732f35d8a65147974f76395a6f (patch)
treea8da0dede5213f85e45b95047cfbdcf5427cf0b7 /contrib/python/Twisted/py3/twisted/conch/interfaces.py
parente9bbee265681b79a9ef9795bdc84cf6996f9cfec (diff)
downloadydb-4a64a813e1d34e732f35d8a65147974f76395a6f.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/conch/interfaces.py')
-rw-r--r--contrib/python/Twisted/py3/twisted/conch/interfaces.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/contrib/python/Twisted/py3/twisted/conch/interfaces.py b/contrib/python/Twisted/py3/twisted/conch/interfaces.py
index 749fad2f96d..965519b0ea5 100644
--- a/contrib/python/Twisted/py3/twisted/conch/interfaces.py
+++ b/contrib/python/Twisted/py3/twisted/conch/interfaces.py
@@ -5,8 +5,15 @@
This module contains interfaces defined for the L{twisted.conch} package.
"""
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
from zope.interface import Attribute, Interface
+if TYPE_CHECKING:
+ from twisted.conch.ssh.keys import Key
+
class IConchUser(Interface):
"""
@@ -363,16 +370,15 @@ class IKnownHostEntry(Interface):
@since: 8.2
"""
- def matchesKey(key):
+ def matchesKey(key: Key) -> bool:
"""
Return True if this entry matches the given Key object, False
otherwise.
@param key: The key object to match against.
- @type key: L{twisted.conch.ssh.keys.Key}
"""
- def matchesHost(hostname):
+ def matchesHost(hostname: bytes) -> bool:
"""
Return True if this entry matches the given hostname, False otherwise.
@@ -381,16 +387,12 @@ class IKnownHostEntry(Interface):
quad string.
@param hostname: The hostname to match against.
- @type hostname: L{str}
"""
- def toString():
+ def toString() -> bytes:
"""
-
@return: a serialized string representation of this entry, suitable for
- inclusion in a known_hosts file. (Newline not included.)
-
- @rtype: L{str}
+ inclusion in a known_hosts file. (Newline not included.)
"""