diff --git a/wlauto/commands/show.py b/wlauto/commands/show.py index 12515b73..e173fc08 100644 --- a/wlauto/commands/show.py +++ b/wlauto/commands/show.py @@ -18,11 +18,11 @@ import sys import subprocess from cStringIO import StringIO -from terminalsize import get_terminal_size # pylint: disable=import-error from wlauto import Command, ExtensionLoader, settings from wlauto.utils.doc import (get_summary, get_description, get_type_name, format_column, format_body, format_paragraph, indent, strip_inlined_text) from wlauto.utils.misc import get_pager +from wlauto.utils.terminalsize import get_terminal_size class ShowCommand(Command): @@ -39,6 +39,7 @@ class ShowCommand(Command): be shown.''') def execute(self, args): + # pylint: disable=unpacking-non-sequence ext_loader = ExtensionLoader(packages=settings.extension_packages, paths=settings.extension_paths) extension = ext_loader.get_extension_class(args.name) out = StringIO() diff --git a/wlauto/external/terminalsize.py b/wlauto/utils/terminalsize.py similarity index 93% rename from wlauto/external/terminalsize.py rename to wlauto/utils/terminalsize.py index 32231020..c9fc430f 100644 --- a/wlauto/external/terminalsize.py +++ b/wlauto/utils/terminalsize.py @@ -1,5 +1,6 @@ -# Taken from +# Adapted from # https://gist.github.com/jtriley/1108174 +# pylint: disable=bare-except,unpacking-non-sequence import os import shlex import struct @@ -30,6 +31,7 @@ def get_terminal_size(): def _get_terminal_size_windows(): + # pylint: disable=unused-variable,redefined-outer-name,too-many-locals try: from ctypes import windll, create_string_buffer # stdin handle is -10 @@ -88,5 +90,5 @@ def _get_terminal_size_linux(): if __name__ == "__main__": sizex, sizey = get_terminal_size() - print 'width =', sizex, 'height =', sizey + print 'width =', sizex, 'height =', sizey