From 5e84a5dbf4ba08b34f94e7845eed908d7741feee Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Sat, 7 Mar 2015 20:50:07 +0900 Subject: [PATCH] enables flake8 E401: multiple imports on one line --- setup.cfg | 4 ++-- sphinx/pycode/__init__.py | 3 ++- sphinx/util/console.py | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index a6a0015d1..7961b2151 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,5 +25,5 @@ universal = 1 [flake8] max-line-length=90 -ignore=W503,E111,E114,E115,E116,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E202,E203,E205,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E266,E271,E301,E302,E303,E401,E402,E625,E701,E703,E704,E711,E712,E713,E721,E731,E901,E902,F401,F402,F403,F812,F821,F841 -exclude=utils/*,tests/*,build/*,sphinx/search/* +ignore=W503,E111,E114,E115,E116,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E202,E203,E205,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E266,E271,E301,E302,E303,E402,E625,E701,E703,E704,E711,E712,E713,E721,E731,E901,E902,F401,F402,F403,F812,F821,F841 +exclude=utils/*,tests/*,build/*,sphinx/search/*,sphinx/pycode/pgen2/* diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 3e7228b3f..8553c8781 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -332,7 +332,8 @@ class ModuleAnalyzer(object): if __name__ == '__main__': - import time, pprint + import time + import pprint x0 = time.time() #ma = ModuleAnalyzer.for_file(__file__.rstrip('c'), 'sphinx.builders.html') ma = ModuleAnalyzer.for_file('sphinx/environment.py', diff --git a/sphinx/util/console.py b/sphinx/util/console.py index a9b7ee55d..24d3e4568 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -25,7 +25,9 @@ codes = {} def get_terminal_width(): """Borrowed from the py lib.""" try: - import termios, fcntl, struct + import termios + import fcntl + import struct call = fcntl.ioctl(0, termios.TIOCGWINSZ, struct.pack('hhhh', 0, 0, 0, 0)) height, width = struct.unpack('hhhh', call)[:2]