mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-23 14:35:23 +01:00
Fix pylint reported no-self-use and disable checks in py2/3 compatibility code.
This commit is contained in:
parent
dfb8c302bf
commit
cbe7ad4ac3
@ -35,9 +35,10 @@ if sys.version_info >= (3,):
|
|||||||
else:
|
else:
|
||||||
import StringIO as _StringIO
|
import StringIO as _StringIO
|
||||||
StringIO = BytesIO = _StringIO.StringIO
|
StringIO = BytesIO = _StringIO.StringIO
|
||||||
text_type = unicode
|
text_type = unicode # pylint: disable=undefined-variable
|
||||||
binary_type = str
|
binary_type = str
|
||||||
try:
|
try:
|
||||||
|
# pylint: disable=unused-import
|
||||||
from typing import List, Tuple, Optional, Callable, Union, Any
|
from typing import List, Tuple, Optional, Callable, Union, Any
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -175,7 +176,8 @@ class Output(object):
|
|||||||
if not self.batch:
|
if not self.batch:
|
||||||
print()
|
print()
|
||||||
|
|
||||||
def _colorized(self, color):
|
@staticmethod
|
||||||
|
def _colorized(color):
|
||||||
# type: (str) -> Callable[[text_type], None]
|
# type: (str) -> Callable[[text_type], None]
|
||||||
return lambda x: print(u'{0}{1}\033[0m'.format(color, x))
|
return lambda x: print(u'{0}{1}\033[0m'.format(color, x))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user