diff options
author | shimizukawa <shimizukawa@gmail.com> | 2015-03-07 20:50:07 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2015-03-07 20:51:27 +0900 |
commit | 5e84a5dbf4ba08b34f94e7845eed908d7741feee (patch) | |
tree | 9d381de5476bbf684bd18f47e6691c56262e6ba9 | |
parent | 3b6524067ffd998b728fdcff1677baf227131bf3 (diff) | |
download | sphinx-git-5e84a5dbf4ba08b34f94e7845eed908d7741feee.tar.gz |
enables flake8 E401: multiple imports on one line
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | sphinx/pycode/__init__.py | 3 | ||||
-rw-r--r-- | sphinx/util/console.py | 4 |
3 files changed, 7 insertions, 4 deletions
@@ -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] |