Fix flake8 reported issues.

This commit is contained in:
Andris Raugulis 2017-03-25 08:44:37 +02:00
parent cfae0d020a
commit 29d9e4270d

View File

@ -1270,10 +1270,10 @@ class SSH(object): # pylint: disable=too-few-public-methods
@property
def maxlen(self):
# type: () -> int
maxlen = 0
def ml(items):
# type: (Sequence[text_type]) -> int
return max(len(i) for i in items)
maxlen = 0
if self.ssh1kex is not None:
maxlen = max(ml(self.ssh1kex.supported_ciphers),
ml(self.ssh1kex.supported_authentications),
@ -1785,7 +1785,6 @@ class KexGroup14(KexDH): # pragma: nocover
super(KexGroup14, self).__init__('sha1', 2, p)
def output_algorithms(title, alg_db, alg_type, algorithms, maxlen=0):
# type: (str, Dict[str, Dict[str, List[List[Optional[str]]]]], str, List[text_type], int) -> None
with OutputBuffer() as obuf: