]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: disable pylint's --py3k flag 30078/head
authorErnesto Puerta <epuertat@redhat.com>
Mon, 2 Sep 2019 17:40:10 +0000 (19:40 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Mon, 2 Sep 2019 17:40:10 +0000 (19:40 +0200)
This flag, instead of just improving Python 2 to 3 compatibility checks,
disables a few other checks.

Fixes: https://tracker.ceph.com/issues/41602
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/pybind/mgr/dashboard/services/sso.py
src/pybind/mgr/dashboard/tox.ini

index 7cfe4e3f1da6d578e7b323d56378912e0a5e397d..387aa3888c3d9fd51f84ce6eb142b703c2b9e42f 100644 (file)
@@ -9,11 +9,14 @@ import threading
 import warnings
 
 import six
-if six.PY2:
-    FileNotFoundError = IOError
-
 from six.moves.urllib import parse
 
+from .. import mgr, logger
+from ..tools import prepare_url_prefix
+
+if six.PY2:
+    FileNotFoundError = IOError  # pylint: disable=redefined-builtin
+
 try:
     from onelogin.saml2.settings import OneLogin_Saml2_Settings as Saml2Settings
     from onelogin.saml2.errors import OneLogin_Saml2_Error as Saml2Error
@@ -24,10 +27,6 @@ except ImportError:
     python_saml_imported = False
 
 
-from .. import mgr, logger
-from ..tools import prepare_url_prefix
-
-
 class Saml2(object):
     def __init__(self, onelogin_settings):
         self.onelogin_settings = onelogin_settings
index 6342704c588b5d36e0c4b1b0bbaf3c9fc17a339c..f760d79f889856321d5508a667d6addfd5aab7d0 100644 (file)
@@ -61,8 +61,6 @@ addopts =
     -rn
     --rcfile=.pylintrc
     --jobs={[pylint]jobs}
-# Detect Python 2-3 migration issues
-    --py3k
 
 [rstlint]
 dirs =
@@ -72,6 +70,8 @@ dirs =
 [testenv:lint]
 basepython=python3
 deps =
+    -rrequirements.txt
+    -cconstraints.txt
     -rrequirements-lint.txt
 commands =
     lint: flake8 {posargs}