mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
mgr/dashboard/qa: add isort check
Add isort check to the QA test files and fix issues. Fixes: https://tracker.ceph.com/issues/47757 Signed-off-by: Tatjana Dehler <tdehler@suse.com>
This commit is contained in:
parent
bc3d1997bd
commit
1474259b65
@ -4,14 +4,12 @@ from __future__ import absolute_import
|
||||
|
||||
import json
|
||||
import logging
|
||||
from collections import namedtuple
|
||||
import time
|
||||
from collections import namedtuple
|
||||
|
||||
import requests
|
||||
from teuthology.exceptions import CommandFailedError
|
||||
|
||||
from tasks.mgr.mgr_test_case import MgrTestCase
|
||||
|
||||
from teuthology.exceptions import CommandFailedError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import time
|
||||
|
||||
import jwt
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JLeaf
|
||||
from .helper import DashboardTestCase, JLeaf, JObj
|
||||
|
||||
|
||||
class AuthTest(DashboardTestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from contextlib import contextmanager
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JList, JLeaf
|
||||
from .helper import DashboardTestCase, JLeaf, JList, JObj
|
||||
|
||||
|
||||
class CephfsTest(DashboardTestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JList
|
||||
from .helper import DashboardTestCase, JList, JObj
|
||||
|
||||
|
||||
class CrushRuleTest(DashboardTestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JList
|
||||
from .helper import DashboardTestCase, JList, JObj
|
||||
|
||||
|
||||
class ECPTest(DashboardTestCase):
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
from .helper import DashboardTestCase, JList, JObj
|
||||
|
||||
|
||||
|
@ -2,9 +2,10 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
import requests
|
||||
|
||||
from .helper import DashboardTestCase, JAny, JObj, JList, JLeaf
|
||||
from .helper import DashboardTestCase, JAny, JLeaf, JList, JObj
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
|
||||
import json
|
||||
|
||||
from .helper import DashboardTestCase
|
||||
|
||||
|
||||
test_data = {
|
||||
'inventory': [
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ from __future__ import absolute_import
|
||||
|
||||
import json
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JAny, JList, JLeaf, JTuple
|
||||
from .helper import DashboardTestCase, JAny, JLeaf, JList, JObj, JTuple
|
||||
|
||||
|
||||
class OsdTest(DashboardTestCase):
|
||||
|
@ -5,7 +5,7 @@ from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JLeaf, JList
|
||||
from .helper import DashboardTestCase, JLeaf, JList, JObj
|
||||
|
||||
|
||||
class RbdTest(DashboardTestCase):
|
||||
|
@ -4,14 +4,13 @@ from __future__ import absolute_import
|
||||
import base64
|
||||
import logging
|
||||
import time
|
||||
|
||||
from urllib import parse
|
||||
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.twofactor.totp import TOTP
|
||||
from cryptography.hazmat.primitives.hashes import SHA1
|
||||
from cryptography.hazmat.primitives.twofactor.totp import TOTP
|
||||
|
||||
from .helper import DashboardTestCase, JObj, JList, JLeaf
|
||||
from .helper import DashboardTestCase, JLeaf, JList, JObj
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .helper import DashboardTestCase, JList, JObj, JAny
|
||||
from .helper import DashboardTestCase, JAny, JList, JObj
|
||||
|
||||
|
||||
class SettingsTest(DashboardTestCase):
|
||||
|
@ -3,7 +3,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from .helper import DashboardTestCase
|
||||
|
@ -107,6 +107,7 @@ commands =
|
||||
flake8
|
||||
flake8 --config=tox.ini ../../../../qa/tasks/mgr/dashboard
|
||||
isort . --check
|
||||
isort ../../../../qa/tasks/mgr/dashboard --check
|
||||
{[base-pylint]commands}
|
||||
{[base-rst]commands}
|
||||
|
||||
@ -148,6 +149,7 @@ commands =
|
||||
python --version
|
||||
autopep8 {[autopep8]addopts} {posargs:.}
|
||||
isort .
|
||||
isort ../../../../qa/tasks/mgr/dashboard
|
||||
|
||||
[testenv:check]
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user