mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-28 21:36:58 +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:
|
||||
import StringIO as _StringIO
|
||||
StringIO = BytesIO = _StringIO.StringIO
|
||||
text_type = unicode
|
||||
text_type = unicode # pylint: disable=undefined-variable
|
||||
binary_type = str
|
||||
try:
|
||||
# pylint: disable=unused-import
|
||||
from typing import List, Tuple, Optional, Callable, Union, Any
|
||||
except:
|
||||
pass
|
||||
@ -175,7 +176,8 @@ class Output(object):
|
||||
if not self.batch:
|
||||
print()
|
||||
|
||||
def _colorized(self, color):
|
||||
@staticmethod
|
||||
def _colorized(color):
|
||||
# type: (str) -> Callable[[text_type], None]
|
||||
return lambda x: print(u'{0}{1}\033[0m'.format(color, x))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user