From d46cd5d956d1c03b863bf90d0fd0ff4870448183 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Thu, 17 Mar 2016 19:38:53 +0100 Subject: [PATCH] Pylint: enable reimported check Fixes current reimports and enables pylint check for them Reviewed-By: Petr Spacek Reviewed-By: Lukas Slebodnik --- ipalib/session.py | 2 +- ipalib/x509.py | 1 - ipaserver/install/ipa_backup.py | 1 - ipaserver/install/opendnssecinstance.py | 3 +-- ipaserver/plugins/dogtag.py | 3 +-- ipatests/test_ipalib/test_x509.py | 2 -- ipatests/test_ipapython/test_ipautil.py | 2 -- pylintrc | 1 - 8 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ipalib/session.py b/ipalib/session.py index 44c29fe51..e84a355d7 100644 --- a/ipalib/session.py +++ b/ipalib/session.py @@ -27,7 +27,7 @@ from six.moves.urllib.parse import urlparse from ipalib import errors from ipalib.text import _ from ipapython.ipa_log_manager import root_logger, log_mgr -from ipalib import api, errors +from ipalib import api from ipaplatform.paths import paths from ipalib.krb_utils import ( krb5_parse_ccache, diff --git a/ipalib/x509.py b/ipalib/x509.py index 2edd3fef2..7903441c5 100644 --- a/ipalib/x509.py +++ b/ipalib/x509.py @@ -404,7 +404,6 @@ if __name__ == '__main__': # this can be run with: # python ipalib/x509.py < /etc/ipa/ca.crt - from ipalib import api api.bootstrap() api.finalize() diff --git a/ipaserver/install/ipa_backup.py b/ipaserver/install/ipa_backup.py index ae387ad8d..3e765b9ae 100644 --- a/ipaserver/install/ipa_backup.py +++ b/ipaserver/install/ipa_backup.py @@ -38,7 +38,6 @@ from ipaserver.install import installutils from ipapython import ipaldap from ipalib.session import ISO8601_DATETIME_FMT from ipalib.constants import CACERT -from six.moves.configparser import SafeConfigParser from ipaplatform.tasks import tasks """ diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py index c7a796e8e..05b2013c8 100644 --- a/ipaserver/install/opendnssecinstance.py +++ b/ipaserver/install/opendnssecinstance.py @@ -9,7 +9,6 @@ import stat import shutil from subprocess import CalledProcessError -from ipapython import p11helper as _ipap11helper from ipaserver.install import service from ipaserver.install import installutils from ipapython.ipa_log_manager import root_logger @@ -245,7 +244,7 @@ class OpenDNSSECInstance(service.Service): pin = f.read() os.environ["SOFTHSM2_CONF"] = paths.DNSSEC_SOFTHSM2_CONF - p11 = _ipap11helper.P11_Helper(softhsm_slot, pin, paths.LIBSOFTHSM2_SO) + p11 = p11helper.P11_Helper(softhsm_slot, pin, paths.LIBSOFTHSM2_SO) try: # generate master key root_logger.debug("Creating master key") diff --git a/ipaserver/plugins/dogtag.py b/ipaserver/plugins/dogtag.py index e920987cb..5e358d231 100644 --- a/ipaserver/plugins/dogtag.py +++ b/ipaserver/plugins/dogtag.py @@ -253,7 +253,7 @@ from six.moves import urllib from ipalib import Backend from ipapython.dn import DN import ipapython.cookie -import ipapython.dogtag +from ipapython import dogtag from ipapython import ipautil if six.PY3: @@ -1276,7 +1276,6 @@ import os, random from ipaserver.plugins import rabase from ipalib.constants import TYPE_ERROR from ipalib.util import cachedproperty -from ipapython import dogtag from ipalib import _ from ipaplatform.paths import paths diff --git a/ipatests/test_ipalib/test_x509.py b/ipatests/test_ipalib/test_x509.py index 28745ffd8..32d0e8561 100644 --- a/ipatests/test_ipalib/test_x509.py +++ b/ipatests/test_ipalib/test_x509.py @@ -29,8 +29,6 @@ from nss.error import NSPRError from ipalib import x509 from ipapython.dn import DN -import pytest - pytestmark = pytest.mark.tier0 # certutil - diff --git a/ipatests/test_ipapython/test_ipautil.py b/ipatests/test_ipapython/test_ipautil.py index dee82d627..8c0b9c434 100644 --- a/ipatests/test_ipapython/test_ipautil.py +++ b/ipatests/test_ipapython/test_ipautil.py @@ -28,8 +28,6 @@ import six from ipapython import ipautil -import pytest - pytestmark = pytest.mark.tier0 diff --git a/pylintrc b/pylintrc index e3fafa331..e469128f4 100644 --- a/pylintrc +++ b/pylintrc @@ -40,7 +40,6 @@ disable= redefine-in-handler, redefined-builtin, redefined-outer-name, - reimported, relative-import, super-init-not-called, undefined-loop-variable,