Cleanup Tox multiple imports per line

This unsuppresses the flake8 check
 H301 more than one import per line

This has no functional change.
It just enables the check and fixes the imports

Story: 2004515
Task: 29377
Change-Id: I15e13703949c5dfe27ff6f68be5dfcf467ffbe80
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-02-06 10:51:39 -06:00
parent 574032c4fb
commit db68a25ea7
7 changed files with 40 additions and 17 deletions

View File

@ -6,7 +6,8 @@ SPDX-License-Identifier: Apache-2.0
"""
import os
from pecan import expose, request
from pecan import expose
from pecan import request
import cgi
import glob

View File

@ -21,14 +21,18 @@ import shutil
from rpmUtils.miscutils import stringToVersion # pylint: disable=import-error
from cgcs_patch.patch_functions import (configure_logging, LOG)
from cgcs_patch.patch_functions import configure_logging
from cgcs_patch.patch_functions import LOG
import cgcs_patch.config as cfg
from cgcs_patch.base import PatchService
import cgcs_patch.utils as utils
import cgcs_patch.messages as messages
import cgcs_patch.constants as constants
from tsconfig.tsconfig import (SW_VERSION, subfunctions, install_uuid, http_port)
from tsconfig.tsconfig import http_port
from tsconfig.tsconfig import install_uuid
from tsconfig.tsconfig import subfunctions
from tsconfig.tsconfig import SW_VERSION
pidfile_path = "/var/run/patch_agent.pid"
node_is_patched_file = "/var/run/node_is_patched"

View File

@ -20,15 +20,27 @@ from rpmUtils.miscutils import stringToVersion # pylint: disable=import-error
from wsgiref import simple_server
from cgcs_patch.api import app
from cgcs_patch.authapi import app as auth_app
from cgcs_patch.patch_functions import \
configure_logging, BasePackageData, \
avail_dir, applied_dir, committed_dir, \
PatchFile, parse_rpm_filename, \
package_dir, repo_dir, SW_VERSION, root_package_dir
from cgcs_patch.exceptions import MetadataFail, RpmFail, PatchError, PatchFail, PatchValidationFailure, PatchMismatchFailure
from cgcs_patch.patch_functions import configure_logging
from cgcs_patch.patch_functions import BasePackageData
from cgcs_patch.patch_functions import avail_dir
from cgcs_patch.patch_functions import applied_dir
from cgcs_patch.patch_functions import committed_dir
from cgcs_patch.patch_functions import PatchFile
from cgcs_patch.patch_functions import parse_rpm_filename
from cgcs_patch.patch_functions import package_dir
from cgcs_patch.patch_functions import repo_dir
from cgcs_patch.patch_functions import SW_VERSION
from cgcs_patch.patch_functions import root_package_dir
from cgcs_patch.exceptions import MetadataFail
from cgcs_patch.exceptions import RpmFail
from cgcs_patch.exceptions import PatchError
from cgcs_patch.exceptions import PatchFail
from cgcs_patch.exceptions import PatchValidationFailure
from cgcs_patch.exceptions import PatchMismatchFailure
from cgcs_patch.patch_functions import LOG
from cgcs_patch.patch_functions import audit_log_info
from cgcs_patch.patch_functions import patch_dir, repo_root_dir
from cgcs_patch.patch_functions import patch_dir
from cgcs_patch.patch_functions import repo_root_dir
from cgcs_patch.patch_functions import PatchData
from cgcs_patch.base import PatchService

View File

@ -20,9 +20,13 @@ import tempfile
import xml.etree.ElementTree as ElementTree
from xml.dom import minidom
from cgcs_patch.patch_verify import verify_files, cert_type_all
from cgcs_patch.patch_verify import verify_files
from cgcs_patch.patch_verify import cert_type_all
from cgcs_patch.patch_signing import sign_files
from cgcs_patch.exceptions import MetadataFail, PatchFail, PatchValidationFailure, PatchMismatchFailure
from cgcs_patch.exceptions import MetadataFail
from cgcs_patch.exceptions import PatchFail
from cgcs_patch.exceptions import PatchValidationFailure
from cgcs_patch.exceptions import PatchMismatchFailure
import cgcs_patch.constants as constants
import rpm

View File

@ -11,7 +11,9 @@ from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA # pylint: disable=unused-import
from Crypto.Util.asn1 import DerSequence # pylint: disable=unused-import
from binascii import a2b_base64 # pylint: disable=unused-import
from cgcs_patch.patch_verify import read_RSA_key, cert_type_formal_str, cert_type_dev_str
from cgcs_patch.patch_verify import read_RSA_key
from cgcs_patch.patch_verify import cert_type_formal_str
from cgcs_patch.patch_verify import cert_type_dev_str
# To save memory, read and hash 1M of files at a time
default_blocksize = 1 * 1024 * 1024

View File

@ -15,7 +15,8 @@ from Crypto.PublicKey import RSA
from Crypto.Util.asn1 import DerSequence
from binascii import a2b_base64
from cgcs_patch.certificates import dev_certificate, formal_certificate
from cgcs_patch.certificates import dev_certificate
from cgcs_patch.certificates import formal_certificate
# To save memory, read and hash 1M of files at a time
default_blocksize = 1 * 1024 * 1024

View File

@ -56,17 +56,16 @@ commands =
# H105 Don't use author tags
# H237 module posixfile is removed in Python 3
# H238 old style class declaration
# H301 one import per line
# H306 imports not in alphabetical order
# H401 docstring should not start with a space
# H404 multi line docstring should start without a leading new line
# H405 multi line docstring summary not separated with an empty line
# E501 skipped because some of the code files include templates
# E501 line too long. skipped because some of the code files include templates
# that end up quite wide
# F401 'XXXXX' imported but unused
# F841 local variable 'XXXXXX' is assigned to but never used
show-source = True
ignore = H101,H102,H105,H237,H238,H301,H306,H401,H404,H405,E501,F401,F841
ignore = H101,H102,H105,H237,H238,H306,H401,H404,H405,E501,F401,F841
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
# TODO: H106 Dont put vim configuration in source files (off by default).
# H203 Use assertIs(Not)None to check for None (off by default).