mirror of https://github.com/jtesta/ssh-audit.git
Upgrade to Mypy 0.470. Add colorama stub. Fix identation.
This commit is contained in:
parent
c9443e6e06
commit
54b0960502
|
@ -1267,6 +1267,7 @@ class SSH(object): # pylint: disable=too-few-public-methods
|
||||||
def maxlen(self):
|
def maxlen(self):
|
||||||
# type: () -> int
|
# type: () -> int
|
||||||
ml, maxlen = lambda l: max(len(i) for i in l), 0
|
ml, maxlen = lambda l: max(len(i) for i in l), 0
|
||||||
|
# type: Callable[[Sequence[text_type]], int], int
|
||||||
if self.ssh1kex is not None:
|
if self.ssh1kex is not None:
|
||||||
maxlen = max(ml(self.ssh1kex.supported_ciphers),
|
maxlen = max(ml(self.ssh1kex.supported_ciphers),
|
||||||
ml(self.ssh1kex.supported_authentications),
|
ml(self.ssh1kex.supported_authentications),
|
||||||
|
|
|
@ -7,4 +7,4 @@ if [ $? -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
_htmldir="${_cdir}/../html/mypy-py2"
|
_htmldir="${_cdir}/../html/mypy-py2"
|
||||||
mkdir -p "${_htmldir}"
|
mkdir -p "${_htmldir}"
|
||||||
mypy --python-version 2.7 --strict-optional --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
env MYPYPATH="${_cdir}/stubs/" mypy --python-version 2.7 --strict-optional --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
||||||
|
|
|
@ -7,4 +7,4 @@ if [ $? -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
_htmldir="${_cdir}/../html/mypy-py3"
|
_htmldir="${_cdir}/../html/mypy-py3"
|
||||||
mkdir -p "${_htmldir}"
|
mkdir -p "${_htmldir}"
|
||||||
mypy --python-version 3.5 --strict-optional --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
env MYPYPATH="${_cdir}/stubs/" mypy --python-version 3.5 --strict-optional --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[mypy]
|
[mypy]
|
||||||
silent_imports = True
|
ignore_missing_imports = False
|
||||||
|
follow_imports = error
|
||||||
disallow_untyped_calls = True
|
disallow_untyped_calls = True
|
||||||
disallow_untyped_defs = True
|
disallow_untyped_defs = True
|
||||||
check_untyped_defs = True
|
check_untyped_defs = True
|
||||||
disallow-subclassing-any = True
|
disallow-subclassing-any = True
|
||||||
warn-incomplete-stub = True
|
warn-incomplete-stub = True
|
||||||
warn-redundant-casts = True
|
warn-redundant-casts = True
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
def init(autoreset: bool = False, convert: Optional[bool] = None, strip: Optional[bool] = None, wrap: bool = True) -> None: ...
|
||||||
|
|
Loading…
Reference in New Issue