From cbe7ad4ac34181b878bd3d2d6c217bbc51b46033 Mon Sep 17 00:00:00 2001 From: Andris Raugulis Date: Thu, 20 Oct 2016 17:06:23 +0300 Subject: [PATCH] Fix pylint reported no-self-use and disable checks in py2/3 compatibility code. --- ssh-audit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ssh-audit.py b/ssh-audit.py index 15183cf..af9c228 100755 --- a/ssh-audit.py +++ b/ssh-audit.py @@ -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))