From 86faa96702fca94e16b4ab8600eb8d2e5cab8ecf Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 24 May 2021 11:51:09 +0800 Subject: [PATCH] pybind/mgr/dashboard: drop "from __future__ import absolute_import" since we've migrated to python3, there is no need to import absolute_import for accessing absolute import anymore. Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/__init__.py | 1 - src/pybind/mgr/dashboard/api/__init__.py | 1 - src/pybind/mgr/dashboard/controllers/__init__.py | 1 - src/pybind/mgr/dashboard/controllers/auth.py | 1 - src/pybind/mgr/dashboard/controllers/cluster_configuration.py | 1 - src/pybind/mgr/dashboard/controllers/crush_rule.py | 1 - src/pybind/mgr/dashboard/controllers/docs.py | 2 -- src/pybind/mgr/dashboard/controllers/erasure_code_profile.py | 1 - src/pybind/mgr/dashboard/controllers/frontend_logging.py | 2 -- src/pybind/mgr/dashboard/controllers/grafana.py | 2 -- src/pybind/mgr/dashboard/controllers/health.py | 1 - src/pybind/mgr/dashboard/controllers/home.py | 1 - src/pybind/mgr/dashboard/controllers/host.py | 1 - src/pybind/mgr/dashboard/controllers/iscsi.py | 1 - src/pybind/mgr/dashboard/controllers/logs.py | 1 - src/pybind/mgr/dashboard/controllers/mgr_modules.py | 1 - src/pybind/mgr/dashboard/controllers/monitor.py | 1 - src/pybind/mgr/dashboard/controllers/nfsganesha.py | 1 - src/pybind/mgr/dashboard/controllers/orchestrator.py | 1 - src/pybind/mgr/dashboard/controllers/osd.py | 1 - src/pybind/mgr/dashboard/controllers/perf_counters.py | 1 - src/pybind/mgr/dashboard/controllers/pool.py | 1 - src/pybind/mgr/dashboard/controllers/prometheus.py | 1 - src/pybind/mgr/dashboard/controllers/rbd.py | 1 - src/pybind/mgr/dashboard/controllers/rbd_mirroring.py | 1 - src/pybind/mgr/dashboard/controllers/rgw.py | 1 - src/pybind/mgr/dashboard/controllers/role.py | 1 - src/pybind/mgr/dashboard/controllers/saml2.py | 1 - src/pybind/mgr/dashboard/controllers/settings.py | 2 -- src/pybind/mgr/dashboard/controllers/summary.py | 1 - src/pybind/mgr/dashboard/controllers/task.py | 1 - src/pybind/mgr/dashboard/controllers/telemetry.py | 1 - src/pybind/mgr/dashboard/controllers/user.py | 1 - src/pybind/mgr/dashboard/exceptions.py | 1 - src/pybind/mgr/dashboard/grafana.py | 1 - src/pybind/mgr/dashboard/module.py | 2 -- src/pybind/mgr/dashboard/plugins/__init__.py | 1 - src/pybind/mgr/dashboard/plugins/debug.py | 1 - src/pybind/mgr/dashboard/plugins/feature_toggles.py | 1 - src/pybind/mgr/dashboard/plugins/interfaces.py | 1 - src/pybind/mgr/dashboard/plugins/lru_cache.py | 1 - src/pybind/mgr/dashboard/plugins/ttl_cache.py | 1 - src/pybind/mgr/dashboard/rest_client.py | 1 - src/pybind/mgr/dashboard/security.py | 1 - src/pybind/mgr/dashboard/services/__init__.py | 1 - src/pybind/mgr/dashboard/services/access_control.py | 1 - src/pybind/mgr/dashboard/services/auth.py | 1 - src/pybind/mgr/dashboard/services/ceph_service.py | 1 - src/pybind/mgr/dashboard/services/cephfs.py | 1 - src/pybind/mgr/dashboard/services/cephx.py | 1 - src/pybind/mgr/dashboard/services/exception.py | 1 - src/pybind/mgr/dashboard/services/ganesha.py | 1 - src/pybind/mgr/dashboard/services/iscsi_cli.py | 1 - src/pybind/mgr/dashboard/services/iscsi_client.py | 1 - src/pybind/mgr/dashboard/services/iscsi_config.py | 1 - src/pybind/mgr/dashboard/services/orchestrator.py | 1 - src/pybind/mgr/dashboard/services/progress.py | 1 - src/pybind/mgr/dashboard/services/rbd.py | 1 - src/pybind/mgr/dashboard/services/rgw_client.py | 1 - src/pybind/mgr/dashboard/services/sso.py | 1 - src/pybind/mgr/dashboard/settings.py | 2 -- src/pybind/mgr/dashboard/tests/__init__.py | 1 - src/pybind/mgr/dashboard/tests/helper.py | 1 - src/pybind/mgr/dashboard/tests/test_access_control.py | 1 - src/pybind/mgr/dashboard/tests/test_api_auditing.py | 1 - src/pybind/mgr/dashboard/tests/test_ceph_service.py | 1 - src/pybind/mgr/dashboard/tests/test_controllers.py | 1 - src/pybind/mgr/dashboard/tests/test_docs.py | 1 - src/pybind/mgr/dashboard/tests/test_exceptions.py | 1 - src/pybind/mgr/dashboard/tests/test_feature_toggles.py | 1 - src/pybind/mgr/dashboard/tests/test_ganesha.py | 1 - src/pybind/mgr/dashboard/tests/test_home.py | 1 - src/pybind/mgr/dashboard/tests/test_notification.py | 1 - src/pybind/mgr/dashboard/tests/test_plugin_debug.py | 1 - src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py | 1 - src/pybind/mgr/dashboard/tests/test_rbd_service.py | 1 - src/pybind/mgr/dashboard/tests/test_settings.py | 1 - src/pybind/mgr/dashboard/tests/test_sso.py | 1 - src/pybind/mgr/dashboard/tests/test_task.py | 1 - src/pybind/mgr/dashboard/tests/test_tools.py | 1 - src/pybind/mgr/dashboard/tests/test_versioning.py | 1 - src/pybind/mgr/dashboard/tools.py | 1 - src/pybind/mgr/orchestrator/tests/test_orchestrator.py | 1 - src/pybind/mgr/restful/decorators.py | 1 - src/pybind/mgr/restful/hooks.py | 1 - src/pybind/mgr/restful/module.py | 1 - src/pybind/mgr/tests/__init__.py | 1 - 87 files changed, 93 deletions(-) diff --git a/src/pybind/mgr/dashboard/__init__.py b/src/pybind/mgr/dashboard/__init__.py index 34485327e35..cd36ecafa7c 100644 --- a/src/pybind/mgr/dashboard/__init__.py +++ b/src/pybind/mgr/dashboard/__init__.py @@ -3,7 +3,6 @@ """ ceph dashboard module """ -from __future__ import absolute_import import os diff --git a/src/pybind/mgr/dashboard/api/__init__.py b/src/pybind/mgr/dashboard/api/__init__.py index c3961685ab8..e69de29bb2d 100644 --- a/src/pybind/mgr/dashboard/api/__init__.py +++ b/src/pybind/mgr/dashboard/api/__init__.py @@ -1 +0,0 @@ -from __future__ import absolute_import diff --git a/src/pybind/mgr/dashboard/controllers/__init__.py b/src/pybind/mgr/dashboard/controllers/__init__.py index ee8d3bd7bb4..2b1e9afdb13 100755 --- a/src/pybind/mgr/dashboard/controllers/__init__.py +++ b/src/pybind/mgr/dashboard/controllers/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=protected-access,too-many-branches,too-many-lines -from __future__ import absolute_import import collections import importlib diff --git a/src/pybind/mgr/dashboard/controllers/auth.py b/src/pybind/mgr/dashboard/controllers/auth.py index 2e45b7c92e1..ed219dc72b0 100644 --- a/src/pybind/mgr/dashboard/controllers/auth.py +++ b/src/pybind/mgr/dashboard/controllers/auth.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import http.cookies import logging diff --git a/src/pybind/mgr/dashboard/controllers/cluster_configuration.py b/src/pybind/mgr/dashboard/controllers/cluster_configuration.py index 8b0829b8402..871b629ee4c 100644 --- a/src/pybind/mgr/dashboard/controllers/cluster_configuration.py +++ b/src/pybind/mgr/dashboard/controllers/cluster_configuration.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/crush_rule.py b/src/pybind/mgr/dashboard/controllers/crush_rule.py index ea5096cca0f..7b0c17fde07 100644 --- a/src/pybind/mgr/dashboard/controllers/crush_rule.py +++ b/src/pybind/mgr/dashboard/controllers/crush_rule.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from cherrypy import NotFound diff --git a/src/pybind/mgr/dashboard/controllers/docs.py b/src/pybind/mgr/dashboard/controllers/docs.py index e7ed9742ab9..77dc6f4dafe 100644 --- a/src/pybind/mgr/dashboard/controllers/docs.py +++ b/src/pybind/mgr/dashboard/controllers/docs.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import logging from typing import Any, Dict, List, Union diff --git a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py index 4b8264ef0bd..a62f60c1a90 100644 --- a/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py +++ b/src/pybind/mgr/dashboard/controllers/erasure_code_profile.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from cherrypy import NotFound diff --git a/src/pybind/mgr/dashboard/controllers/frontend_logging.py b/src/pybind/mgr/dashboard/controllers/frontend_logging.py index 421e36c02e7..1d3e3cdd625 100644 --- a/src/pybind/mgr/dashboard/controllers/frontend_logging.py +++ b/src/pybind/mgr/dashboard/controllers/frontend_logging.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import logging from . import BaseController, Endpoint, UiApiController diff --git a/src/pybind/mgr/dashboard/controllers/grafana.py b/src/pybind/mgr/dashboard/controllers/grafana.py index 94fe53d0f97..a92a390adee 100644 --- a/src/pybind/mgr/dashboard/controllers/grafana.py +++ b/src/pybind/mgr/dashboard/controllers/grafana.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - from .. import mgr from ..exceptions import DashboardException from ..grafana import GrafanaRestClient, push_local_dashboards diff --git a/src/pybind/mgr/dashboard/controllers/health.py b/src/pybind/mgr/dashboard/controllers/health.py index 0ae0a5bf08b..4e402ee65bd 100644 --- a/src/pybind/mgr/dashboard/controllers/health.py +++ b/src/pybind/mgr/dashboard/controllers/health.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/home.py b/src/pybind/mgr/dashboard/controllers/home.py index 793b241dd75..5f9454c85cf 100644 --- a/src/pybind/mgr/dashboard/controllers/home.py +++ b/src/pybind/mgr/dashboard/controllers/home.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/host.py b/src/pybind/mgr/dashboard/controllers/host.py index 590925ca58b..a40890602b9 100644 --- a/src/pybind/mgr/dashboard/controllers/host.py +++ b/src/pybind/mgr/dashboard/controllers/host.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import copy import os diff --git a/src/pybind/mgr/dashboard/controllers/iscsi.py b/src/pybind/mgr/dashboard/controllers/iscsi.py index 9ee76d7a135..1c9cd378f70 100644 --- a/src/pybind/mgr/dashboard/controllers/iscsi.py +++ b/src/pybind/mgr/dashboard/controllers/iscsi.py @@ -2,7 +2,6 @@ # pylint: disable=C0302 # pylint: disable=too-many-branches # pylint: disable=too-many-lines -from __future__ import absolute_import import json import re diff --git a/src/pybind/mgr/dashboard/controllers/logs.py b/src/pybind/mgr/dashboard/controllers/logs.py index 97995110746..0efd37cfefc 100644 --- a/src/pybind/mgr/dashboard/controllers/logs.py +++ b/src/pybind/mgr/dashboard/controllers/logs.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import collections diff --git a/src/pybind/mgr/dashboard/controllers/mgr_modules.py b/src/pybind/mgr/dashboard/controllers/mgr_modules.py index b614612d0b7..e6095841ff9 100644 --- a/src/pybind/mgr/dashboard/controllers/mgr_modules.py +++ b/src/pybind/mgr/dashboard/controllers/mgr_modules.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .. import mgr from ..security import Scope diff --git a/src/pybind/mgr/dashboard/controllers/monitor.py b/src/pybind/mgr/dashboard/controllers/monitor.py index b61fcd4f393..986fddc7f73 100644 --- a/src/pybind/mgr/dashboard/controllers/monitor.py +++ b/src/pybind/mgr/dashboard/controllers/monitor.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/nfsganesha.py b/src/pybind/mgr/dashboard/controllers/nfsganesha.py index 91d079234e4..b2d9ae5505f 100644 --- a/src/pybind/mgr/dashboard/controllers/nfsganesha.py +++ b/src/pybind/mgr/dashboard/controllers/nfsganesha.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/controllers/orchestrator.py b/src/pybind/mgr/dashboard/controllers/orchestrator.py index 085870a0f4a..a0c1d171d54 100644 --- a/src/pybind/mgr/dashboard/controllers/orchestrator.py +++ b/src/pybind/mgr/dashboard/controllers/orchestrator.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from functools import wraps diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index 1c6b2d26aeb..ea5ccd0f809 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/perf_counters.py b/src/pybind/mgr/dashboard/controllers/perf_counters.py index fca8e294ef5..b9c215c000d 100644 --- a/src/pybind/mgr/dashboard/controllers/perf_counters.py +++ b/src/pybind/mgr/dashboard/controllers/perf_counters.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from typing import Any, Dict diff --git a/src/pybind/mgr/dashboard/controllers/pool.py b/src/pybind/mgr/dashboard/controllers/pool.py index 32ec6c198f8..4fef2b975d4 100644 --- a/src/pybind/mgr/dashboard/controllers/pool.py +++ b/src/pybind/mgr/dashboard/controllers/pool.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time from typing import Any, Dict, Iterable, List, Optional, Union, cast diff --git a/src/pybind/mgr/dashboard/controllers/prometheus.py b/src/pybind/mgr/dashboard/controllers/prometheus.py index 09aa4266317..05b4ffc5235 100644 --- a/src/pybind/mgr/dashboard/controllers/prometheus.py +++ b/src/pybind/mgr/dashboard/controllers/prometheus.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json from datetime import datetime diff --git a/src/pybind/mgr/dashboard/controllers/rbd.py b/src/pybind/mgr/dashboard/controllers/rbd.py index 57fe06a00a6..a1fa9be3bdb 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=unused-argument # pylint: disable=too-many-statements,too-many-branches -from __future__ import absolute_import import logging import math diff --git a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py index 832c97fda97..dffc513fdaa 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/rgw.py b/src/pybind/mgr/dashboard/controllers/rgw.py index bd395f47315..2dc301a406b 100644 --- a/src/pybind/mgr/dashboard/controllers/rgw.py +++ b/src/pybind/mgr/dashboard/controllers/rgw.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/controllers/role.py b/src/pybind/mgr/dashboard/controllers/role.py index 32404237c4a..44dcef75c76 100644 --- a/src/pybind/mgr/dashboard/controllers/role.py +++ b/src/pybind/mgr/dashboard/controllers/role.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/saml2.py b/src/pybind/mgr/dashboard/controllers/saml2.py index fb8278068b1..8939f682724 100644 --- a/src/pybind/mgr/dashboard/controllers/saml2.py +++ b/src/pybind/mgr/dashboard/controllers/saml2.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/settings.py b/src/pybind/mgr/dashboard/controllers/settings.py index 7d9ca9fb316..77d8eeb0ad7 100644 --- a/src/pybind/mgr/dashboard/controllers/settings.py +++ b/src/pybind/mgr/dashboard/controllers/settings.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - from contextlib import contextmanager import cherrypy diff --git a/src/pybind/mgr/dashboard/controllers/summary.py b/src/pybind/mgr/dashboard/controllers/summary.py index 4e240b9770b..becb91295f6 100644 --- a/src/pybind/mgr/dashboard/controllers/summary.py +++ b/src/pybind/mgr/dashboard/controllers/summary.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/controllers/task.py b/src/pybind/mgr/dashboard/controllers/task.py index 16c5017822e..9b477a659d2 100644 --- a/src/pybind/mgr/dashboard/controllers/task.py +++ b/src/pybind/mgr/dashboard/controllers/task.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from ..services import progress from ..tools import TaskManager diff --git a/src/pybind/mgr/dashboard/controllers/telemetry.py b/src/pybind/mgr/dashboard/controllers/telemetry.py index 0a2743d111e..37ab98f1a56 100644 --- a/src/pybind/mgr/dashboard/controllers/telemetry.py +++ b/src/pybind/mgr/dashboard/controllers/telemetry.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .. import mgr from ..exceptions import DashboardException diff --git a/src/pybind/mgr/dashboard/controllers/user.py b/src/pybind/mgr/dashboard/controllers/user.py index 8d340fedccb..dbd240f7c54 100644 --- a/src/pybind/mgr/dashboard/controllers/user.py +++ b/src/pybind/mgr/dashboard/controllers/user.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time from datetime import datetime diff --git a/src/pybind/mgr/dashboard/exceptions.py b/src/pybind/mgr/dashboard/exceptions.py index 8857c423cc4..96cbc523356 100644 --- a/src/pybind/mgr/dashboard/exceptions.py +++ b/src/pybind/mgr/dashboard/exceptions.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import class ViewCacheNoDataException(Exception): diff --git a/src/pybind/mgr/dashboard/grafana.py b/src/pybind/mgr/dashboard/grafana.py index 2ba28fbeb6f..6e3ae5a221b 100644 --- a/src/pybind/mgr/dashboard/grafana.py +++ b/src/pybind/mgr/dashboard/grafana.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index c8e5ba4020a..4fa6d8163d3 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -2,8 +2,6 @@ """ ceph dashboard mgr plugin (based on CherryPy) """ -from __future__ import absolute_import - import collections import errno import logging diff --git a/src/pybind/mgr/dashboard/plugins/__init__.py b/src/pybind/mgr/dashboard/plugins/__init__.py index 6cd03fa9538..edc0b65946b 100644 --- a/src/pybind/mgr/dashboard/plugins/__init__.py +++ b/src/pybind/mgr/dashboard/plugins/__init__.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import abc diff --git a/src/pybind/mgr/dashboard/plugins/debug.py b/src/pybind/mgr/dashboard/plugins/debug.py index 8eb2bb1e6da..da5a4fb9577 100644 --- a/src/pybind/mgr/dashboard/plugins/debug.py +++ b/src/pybind/mgr/dashboard/plugins/debug.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json from enum import Enum diff --git a/src/pybind/mgr/dashboard/plugins/feature_toggles.py b/src/pybind/mgr/dashboard/plugins/feature_toggles.py index ea50652346a..8dc865096a4 100644 --- a/src/pybind/mgr/dashboard/plugins/feature_toggles.py +++ b/src/pybind/mgr/dashboard/plugins/feature_toggles.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from enum import Enum from typing import List, Optional diff --git a/src/pybind/mgr/dashboard/plugins/interfaces.py b/src/pybind/mgr/dashboard/plugins/interfaces.py index 9c050074f7d..0c106d2617c 100644 --- a/src/pybind/mgr/dashboard/plugins/interfaces.py +++ b/src/pybind/mgr/dashboard/plugins/interfaces.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from . import PLUGIN_MANAGER as PM # pylint: disable=cyclic-import from . import Interface, Mixin diff --git a/src/pybind/mgr/dashboard/plugins/lru_cache.py b/src/pybind/mgr/dashboard/plugins/lru_cache.py index 9b29a601244..4d8fc27b34a 100644 --- a/src/pybind/mgr/dashboard/plugins/lru_cache.py +++ b/src/pybind/mgr/dashboard/plugins/lru_cache.py @@ -4,7 +4,6 @@ This is a minimal implementation of lru_cache function. Based on Python 3 functools and backports.functools_lru_cache. """ -from __future__ import absolute_import from collections import OrderedDict from functools import wraps diff --git a/src/pybind/mgr/dashboard/plugins/ttl_cache.py b/src/pybind/mgr/dashboard/plugins/ttl_cache.py index b316151e7e0..ad3c36d1198 100644 --- a/src/pybind/mgr/dashboard/plugins/ttl_cache.py +++ b/src/pybind/mgr/dashboard/plugins/ttl_cache.py @@ -3,7 +3,6 @@ This is a minimal implementation of TTL-ed lru_cache function. Based on Python 3 functools and backports.functools_lru_cache. """ -from __future__ import absolute_import from collections import OrderedDict from functools import wraps diff --git a/src/pybind/mgr/dashboard/rest_client.py b/src/pybind/mgr/dashboard/rest_client.py index 90cfd41ad77..e35ceb5474e 100644 --- a/src/pybind/mgr/dashboard/rest_client.py +++ b/src/pybind/mgr/dashboard/rest_client.py @@ -11,7 +11,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. """ -from __future__ import absolute_import import inspect import logging diff --git a/src/pybind/mgr/dashboard/security.py b/src/pybind/mgr/dashboard/security.py index cbeda6daec2..4c6e5c564af 100644 --- a/src/pybind/mgr/dashboard/security.py +++ b/src/pybind/mgr/dashboard/security.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import inspect diff --git a/src/pybind/mgr/dashboard/services/__init__.py b/src/pybind/mgr/dashboard/services/__init__.py index 139759b658c..40a96afc6ff 100644 --- a/src/pybind/mgr/dashboard/services/__init__.py +++ b/src/pybind/mgr/dashboard/services/__init__.py @@ -1,2 +1 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import diff --git a/src/pybind/mgr/dashboard/services/access_control.py b/src/pybind/mgr/dashboard/services/access_control.py index dd32712494f..08bee8ec429 100644 --- a/src/pybind/mgr/dashboard/services/access_control.py +++ b/src/pybind/mgr/dashboard/services/access_control.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-arguments,too-many-return-statements # pylint: disable=too-many-branches, too-many-locals, too-many-statements -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/services/auth.py b/src/pybind/mgr/dashboard/services/auth.py index 55436afb6ad..76ee740b1a7 100644 --- a/src/pybind/mgr/dashboard/services/auth.py +++ b/src/pybind/mgr/dashboard/services/auth.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py index 4cf82f06696..028368b7650 100644 --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/cephfs.py b/src/pybind/mgr/dashboard/services/cephfs.py index 604cf4a77fc..8e9a0736571 100644 --- a/src/pybind/mgr/dashboard/services/cephfs.py +++ b/src/pybind/mgr/dashboard/services/cephfs.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import datetime import logging diff --git a/src/pybind/mgr/dashboard/services/cephx.py b/src/pybind/mgr/dashboard/services/cephx.py index 60303ad85fd..514173e53be 100644 --- a/src/pybind/mgr/dashboard/services/cephx.py +++ b/src/pybind/mgr/dashboard/services/cephx.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from .ceph_service import CephService diff --git a/src/pybind/mgr/dashboard/services/exception.py b/src/pybind/mgr/dashboard/services/exception.py index 54aa8a7b4cc..f027ed300b9 100644 --- a/src/pybind/mgr/dashboard/services/exception.py +++ b/src/pybind/mgr/dashboard/services/exception.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/ganesha.py b/src/pybind/mgr/dashboard/services/ganesha.py index 9799f837a74..fdbb497853b 100644 --- a/src/pybind/mgr/dashboard/services/ganesha.py +++ b/src/pybind/mgr/dashboard/services/ganesha.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-lines -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/services/iscsi_cli.py b/src/pybind/mgr/dashboard/services/iscsi_cli.py index 93abbcd190a..e46924d8c35 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_cli.py +++ b/src/pybind/mgr/dashboard/services/iscsi_cli.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/services/iscsi_client.py b/src/pybind/mgr/dashboard/services/iscsi_client.py index 9cc2600e121..c222fbb0d75 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_client.py +++ b/src/pybind/mgr/dashboard/services/iscsi_client.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-public-methods -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/services/iscsi_config.py b/src/pybind/mgr/dashboard/services/iscsi_config.py index acc0c09362c..f1818c1986c 100644 --- a/src/pybind/mgr/dashboard/services/iscsi_config.py +++ b/src/pybind/mgr/dashboard/services/iscsi_config.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/dashboard/services/orchestrator.py b/src/pybind/mgr/dashboard/services/orchestrator.py index 7dfdfc2920f..45b0d323092 100644 --- a/src/pybind/mgr/dashboard/services/orchestrator.py +++ b/src/pybind/mgr/dashboard/services/orchestrator.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import logging from functools import wraps diff --git a/src/pybind/mgr/dashboard/services/progress.py b/src/pybind/mgr/dashboard/services/progress.py index 96272beff7c..d1afefbac0c 100644 --- a/src/pybind/mgr/dashboard/services/progress.py +++ b/src/pybind/mgr/dashboard/services/progress.py @@ -7,7 +7,6 @@ executing and completed tasks tacked by the progress mgr module using the same structure of dashboard tasks ''' -from __future__ import absolute_import import logging from datetime import datetime diff --git a/src/pybind/mgr/dashboard/services/rbd.py b/src/pybind/mgr/dashboard/services/rbd.py index 08363191557..0356de8f5f4 100644 --- a/src/pybind/mgr/dashboard/services/rbd.py +++ b/src/pybind/mgr/dashboard/services/rbd.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=unused-argument -from __future__ import absolute_import import cherrypy import rbd diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index 598d05ee39d..3d5d1cdf073 100644 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import ipaddress import logging diff --git a/src/pybind/mgr/dashboard/services/sso.py b/src/pybind/mgr/dashboard/services/sso.py index fdc9b862b79..74b1a3e52cf 100644 --- a/src/pybind/mgr/dashboard/services/sso.py +++ b/src/pybind/mgr/dashboard/services/sso.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-return-statements,too-many-branches -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/settings.py b/src/pybind/mgr/dashboard/settings.py index 6c1b90374fb..26b8d638a76 100644 --- a/src/pybind/mgr/dashboard/settings.py +++ b/src/pybind/mgr/dashboard/settings.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import - import errno import inspect from ast import literal_eval diff --git a/src/pybind/mgr/dashboard/tests/__init__.py b/src/pybind/mgr/dashboard/tests/__init__.py index 2c8d3c68a5b..64a71561ff8 100644 --- a/src/pybind/mgr/dashboard/tests/__init__.py +++ b/src/pybind/mgr/dashboard/tests/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-arguments -from __future__ import absolute_import import json import logging diff --git a/src/pybind/mgr/dashboard/tests/helper.py b/src/pybind/mgr/dashboard/tests/helper.py index e71133a108b..67dd09fdfe1 100644 --- a/src/pybind/mgr/dashboard/tests/helper.py +++ b/src/pybind/mgr/dashboard/tests/helper.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import try: from typing import Any, Dict diff --git a/src/pybind/mgr/dashboard/tests/test_access_control.py b/src/pybind/mgr/dashboard/tests/test_access_control.py index 9415d7e5706..f05490de52f 100644 --- a/src/pybind/mgr/dashboard/tests/test_access_control.py +++ b/src/pybind/mgr/dashboard/tests/test_access_control.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import errno import json diff --git a/src/pybind/mgr/dashboard/tests/test_api_auditing.py b/src/pybind/mgr/dashboard/tests/test_api_auditing.py index b2e83379efc..71121a06bca 100644 --- a/src/pybind/mgr/dashboard/tests/test_api_auditing.py +++ b/src/pybind/mgr/dashboard/tests/test_api_auditing.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import re diff --git a/src/pybind/mgr/dashboard/tests/test_ceph_service.py b/src/pybind/mgr/dashboard/tests/test_ceph_service.py index 9a8ca674c23..f3350337c74 100644 --- a/src/pybind/mgr/dashboard/tests/test_ceph_service.py +++ b/src/pybind/mgr/dashboard/tests/test_ceph_service.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import logging import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_controllers.py b/src/pybind/mgr/dashboard/tests/test_controllers.py index bacef3677d7..7bd0b1955a0 100644 --- a/src/pybind/mgr/dashboard/tests/test_controllers.py +++ b/src/pybind/mgr/dashboard/tests/test_controllers.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from ..controllers import ApiController, BaseController, Controller, Endpoint, RESTController from . import ControllerTestCase # pylint: disable=no-name-in-module diff --git a/src/pybind/mgr/dashboard/tests/test_docs.py b/src/pybind/mgr/dashboard/tests/test_docs.py index 84cfddd629e..b4210edff20 100644 --- a/src/pybind/mgr/dashboard/tests/test_docs.py +++ b/src/pybind/mgr/dashboard/tests/test_docs.py @@ -1,5 +1,4 @@ # # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_exceptions.py b/src/pybind/mgr/dashboard/tests/test_exceptions.py index bbf90909572..f28e2cd55d4 100644 --- a/src/pybind/mgr/dashboard/tests/test_exceptions.py +++ b/src/pybind/mgr/dashboard/tests/test_exceptions.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import time diff --git a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py index 571b8c286c8..7a36269d87b 100644 --- a/src/pybind/mgr/dashboard/tests/test_feature_toggles.py +++ b/src/pybind/mgr/dashboard/tests/test_feature_toggles.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_ganesha.py b/src/pybind/mgr/dashboard/tests/test_ganesha.py index f9cc44aa273..2d1136d2333 100644 --- a/src/pybind/mgr/dashboard/tests/test_ganesha.py +++ b/src/pybind/mgr/dashboard/tests/test_ganesha.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=too-many-lines -from __future__ import absolute_import import unittest from unittest.mock import MagicMock, Mock, patch diff --git a/src/pybind/mgr/dashboard/tests/test_home.py b/src/pybind/mgr/dashboard/tests/test_home.py index 37e09b4b2af..dc73a6d2ead 100644 --- a/src/pybind/mgr/dashboard/tests/test_home.py +++ b/src/pybind/mgr/dashboard/tests/test_home.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import logging import os diff --git a/src/pybind/mgr/dashboard/tests/test_notification.py b/src/pybind/mgr/dashboard/tests/test_notification.py index df303e45563..0abca989c22 100644 --- a/src/pybind/mgr/dashboard/tests/test_notification.py +++ b/src/pybind/mgr/dashboard/tests/test_notification.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import random import time diff --git a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py index cb4d1afc218..5010d9768ff 100644 --- a/src/pybind/mgr/dashboard/tests/test_plugin_debug.py +++ b/src/pybind/mgr/dashboard/tests/test_plugin_debug.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import from . import CLICommandTestMixin, ControllerTestCase # pylint: disable=no-name-in-module diff --git a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py index acb8336de7e..490a8a6e299 100644 --- a/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/tests/test_rbd_mirroring.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import json import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_rbd_service.py b/src/pybind/mgr/dashboard/tests/test_rbd_service.py index 99cf27d8214..1772ac8cf1c 100644 --- a/src/pybind/mgr/dashboard/tests/test_rbd_service.py +++ b/src/pybind/mgr/dashboard/tests/test_rbd_service.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_settings.py b/src/pybind/mgr/dashboard/tests/test_settings.py index e92b580e3a6..0644ecb8833 100644 --- a/src/pybind/mgr/dashboard/tests/test_settings.py +++ b/src/pybind/mgr/dashboard/tests/test_settings.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import errno import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_sso.py b/src/pybind/mgr/dashboard/tests/test_sso.py index c347f542008..0aaa0e87478 100644 --- a/src/pybind/mgr/dashboard/tests/test_sso.py +++ b/src/pybind/mgr/dashboard/tests/test_sso.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=dangerous-default-value,too-many-public-methods -from __future__ import absolute_import import errno import tempfile diff --git a/src/pybind/mgr/dashboard/tests/test_task.py b/src/pybind/mgr/dashboard/tests/test_task.py index 0d51e2d3f88..2506c3913c2 100644 --- a/src/pybind/mgr/dashboard/tests/test_task.py +++ b/src/pybind/mgr/dashboard/tests/test_task.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import json import threading diff --git a/src/pybind/mgr/dashboard/tests/test_tools.py b/src/pybind/mgr/dashboard/tests/test_tools.py index c9cd11bafc8..dbd87552e0b 100644 --- a/src/pybind/mgr/dashboard/tests/test_tools.py +++ b/src/pybind/mgr/dashboard/tests/test_tools.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tests/test_versioning.py b/src/pybind/mgr/dashboard/tests/test_versioning.py index d051e0550a4..bf166e40dc4 100644 --- a/src/pybind/mgr/dashboard/tests/test_versioning.py +++ b/src/pybind/mgr/dashboard/tests/test_versioning.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import unittest diff --git a/src/pybind/mgr/dashboard/tools.py b/src/pybind/mgr/dashboard/tools.py index a6f14e82d00..a882a30cc00 100644 --- a/src/pybind/mgr/dashboard/tools.py +++ b/src/pybind/mgr/dashboard/tools.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import import collections import fnmatch diff --git a/src/pybind/mgr/orchestrator/tests/test_orchestrator.py b/src/pybind/mgr/orchestrator/tests/test_orchestrator.py index 35f4b64b878..35154270449 100644 --- a/src/pybind/mgr/orchestrator/tests/test_orchestrator.py +++ b/src/pybind/mgr/orchestrator/tests/test_orchestrator.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import json diff --git a/src/pybind/mgr/restful/decorators.py b/src/pybind/mgr/restful/decorators.py index d1d3fbcd517..11840a9913a 100644 --- a/src/pybind/mgr/restful/decorators.py +++ b/src/pybind/mgr/restful/decorators.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from pecan import request, response from base64 import b64decode diff --git a/src/pybind/mgr/restful/hooks.py b/src/pybind/mgr/restful/hooks.py index d677dcc2a15..c57cbcd404d 100644 --- a/src/pybind/mgr/restful/hooks.py +++ b/src/pybind/mgr/restful/hooks.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import from pecan.hooks import PecanHook diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index b5f9d6f0af9..d259a85e5a6 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -1,7 +1,6 @@ """ A RESTful API for Ceph """ -from __future__ import absolute_import import os import json diff --git a/src/pybind/mgr/tests/__init__.py b/src/pybind/mgr/tests/__init__.py index 9d5e2dcabea..2725e4d643a 100644 --- a/src/pybind/mgr/tests/__init__.py +++ b/src/pybind/mgr/tests/__init__.py @@ -1,5 +1,4 @@ # type: ignore -from __future__ import absolute_import import json import logging -- 2.39.5