Fix pep8 E401 multiple imports on one line

pull/1083/head
Lee Clemens 2015-06-26 12:51:19 -04:00
parent f2d0230a67
commit 7667712909
21 changed files with 85 additions and 31 deletions

View File

@ -24,7 +24,8 @@ __author__ = 'Yaroslav Halhenko'
__copyright__ = 'Copyright (c) 2007 Yaroslav Halchenko'
__license__ = 'GPL'
import os, sys
import os
import sys
from ..helpers import getLogger
if sys.version_info >= (3,2): # pragma: no cover

View File

@ -24,7 +24,8 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import glob, os
import glob
import os
from ConfigParser import NoOptionError, NoSectionError
from .configparserinc import SafeConfigParserWithIncludes, logLevel

View File

@ -26,7 +26,8 @@ __license__ = "GPL"
#from cPickle import dumps, loads, HIGHEST_PROTOCOL
from pickle import dumps, loads, HIGHEST_PROTOCOL
import socket, sys
import socket
import sys
if sys.version_info >= (3,):
# b"" causes SyntaxError in python <= 2.5, so below implements equivalent

View File

@ -24,7 +24,8 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import os, shlex
import os
import shlex
from .configreader import DefinitionInitConfigReader
from ..server.action import CommandAction

View File

@ -24,8 +24,10 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import re, glob, os.path
import glob
import json
import os.path
import re
from .configreader import ConfigReaderUnshared, ConfigReader
from .filterreader import FilterReader

View File

@ -21,8 +21,14 @@ __author__ = "Cyril Jaquier and Fail2Ban Contributors"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2012 Yaroslav Halchenko"
__license__ = "GPL"
import logging, os, subprocess, time, signal, tempfile
import threading, re
import logging
import os
import re
import signal
import subprocess
import tempfile
import threading
import time
from abc import ABCMeta
from collections import MutableMapping

View File

@ -24,9 +24,10 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import time, logging
import logging
import os
import sys
import time
if sys.version_info >= (3, 3):
import importlib.machinery
else:

View File

@ -25,7 +25,13 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
from pickle import dumps, loads, HIGHEST_PROTOCOL
import asyncore, asynchat, socket, os, sys, traceback, fcntl
import asynchat
import asyncore
import fcntl
import os
import socket
import sys
import traceback
from ..helpers import getLogger,formatExceptionInfo

View File

@ -21,11 +21,12 @@ __author__ = "Steven Hiscocks"
__copyright__ = "Copyright (c) 2013 Steven Hiscocks"
__license__ = "GPL"
import sys
import shutil, time
import sqlite3
import json
import locale
import shutil
import sqlite3
import sys
import time
from functools import wraps
from threading import RLock

View File

@ -21,7 +21,9 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import re, sre_constants, sys
import re
import sre_constants
import sys
##
# Regular expression class.

View File

@ -21,7 +21,12 @@ __author__ = "Cyril Jaquier and Fail2Ban Contributors"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko"
__license__ = "GPL"
import re, os, fcntl, sys, locale, codecs
import codecs
import fcntl
import locale
import os
import re
import sys
from .failmanager import FailManagerEmpty, FailManager
from .ticket import FailTicket
@ -839,7 +844,8 @@ class JournalFilter(Filter): # pragma: systemd no cover
# This class contains only static methods used to handle DNS and IP
# addresses.
import socket, struct
import socket
import struct
class DNSUtils:

View File

@ -23,7 +23,8 @@ __author__ = "Cyril Jaquier, Yaroslav Halchenko"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2012 Yaroslav Halchenko"
__license__ = "GPL"
import time, fcntl
import fcntl
import time
import gamin

View File

@ -24,7 +24,8 @@ __author__ = "Cyril Jaquier, Yaroslav Halchenko"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier; 2012 Yaroslav Halchenko"
__license__ = "GPL"
import time, os
import os
import time
from .failmanager import FailManagerEmpty
from .filter import FileFilter

View File

@ -22,7 +22,8 @@ __author__ = "Steven Hiscocks"
__copyright__ = "Copyright (c) 2013 Steven Hiscocks"
__license__ = "GPL"
import datetime, time
import datetime
import time
from distutils.version import LooseVersion
from systemd import journal

View File

@ -23,7 +23,8 @@ __author__ = "Cyril Jaquier, Lee Clemens, Yaroslav Halchenko"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2012 Lee Clemens, 2012 Yaroslav Halchenko"
__license__ = "GPL"
import Queue, logging
import logging
import Queue
from .actions import Actions
from ..helpers import getLogger

View File

@ -21,7 +21,8 @@ __author__ = "Cyril Jaquier"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import time, datetime
import datetime
import time
##
# MyTime class.

View File

@ -25,7 +25,12 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
from threading import Lock, RLock
import logging, logging.handlers, sys, os, signal, stat
import logging
import logging.handlers
import os
import signal
import stat
import sys
from .jails import Jails
from .filter import FileFilter, JournalFilter

View File

@ -21,7 +21,13 @@ __author__ = "Cyril Jaquier, Yaroslav Halchenko"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2011-2013 Yaroslav Halchenko"
__license__ = "GPL"
import os, glob, shutil, tempfile, unittest, re, logging
import glob
import logging
import os
import re
import shutil
import tempfile
import unittest
from ..client.configreader import ConfigReaderUnshared
from ..client import configparserinc
from ..client.jailreader import JailReader

View File

@ -22,10 +22,15 @@
__copyright__ = "Copyright (c) 2013 Steven Hiscocks"
__license__ = "GPL"
import unittest, sys, os, fileinput, re, time, datetime, inspect
import datetime
import fileinput
import inspect
import json
import os
import re
import sys
import time
import unittest
from ..server.filter import Filter
from ..client.filterreader import FilterReader
from .utils import setUpMyTime, tearDownMyTime, CONFIG_DIR

View File

@ -24,7 +24,11 @@ __author__ = "Steven Hiscocks"
__copyright__ = "Copyright (c) 2013 Steven Hiscocks"
__license__ = "GPL"
import unittest, time, tempfile, os, threading
import os
import tempfile
import threading
import time
import unittest
from ..server.asyncserver import AsyncServer, AsyncServerException
from ..client.csocket import CSocket

View File

@ -40,7 +40,8 @@ except ImportError:
from distutils.command.build_scripts import build_scripts
import os
from os.path import isfile, join, isdir
import sys, warnings
import sys
import warnings
from glob import glob
if setuptools and "test" in sys.argv: