Skip to content

Commit

Permalink
Fix method type and naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthepsy committed Apr 5, 2017
1 parent c132c62 commit 9bdac72
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ssh-audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def sep(self):
if not self.batch:
print()

@property
@staticmethod
def colors_supported(self):
# type: () -> bool
return 'colorama' in sys.modules or os.name == 'posix'
Expand Down Expand Up @@ -1270,19 +1270,19 @@ def values(self):
@property
def maxlen(self):
# type: () -> int
def ml(items):
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),
maxlen = max(_ml(self.ssh1kex.supported_ciphers),
_ml(self.ssh1kex.supported_authentications),
maxlen)
if self.ssh2kex is not None:
maxlen = max(ml(self.ssh2kex.kex_algorithms),
ml(self.ssh2kex.key_algorithms),
ml(self.ssh2kex.server.encryption),
ml(self.ssh2kex.server.mac),
maxlen = max(_ml(self.ssh2kex.kex_algorithms),
_ml(self.ssh2kex.key_algorithms),
_ml(self.ssh2kex.server.encryption),
_ml(self.ssh2kex.server.mac),
maxlen)
return maxlen

Expand Down

0 comments on commit 9bdac72

Please sign in to comment.