Quoting https://peps.python.org/pep-0008/#maximum-line-length
```
The preferred way of wrapping long lines is by using Python’s
implied line continuation inside parentheses, brackets and braces. Long
lines can be broken over multiple lines by wrapping expressions in
parentheses. These should be used in preference to using a backslash for
line continuation.
```
I also think it is much more readable and is similar to the style
applied by automated code formatting tools like `black`.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit
3d7b9342383ab5d4a2c7a346d6982aea09ebc6f8)
from ceph.deployment import inventory
from ceph.deployment.drive_group import DriveGroupSpec
-from ceph.deployment.service_spec import ServiceSpec, CustomContainerSpec, PlacementSpec, RGWSpec
+from ceph.deployment.service_spec import (
+ CustomContainerSpec,
+ PlacementSpec,
+ RGWSpec,
+ ServiceSpec,
+)
from ceph.utils import datetime_now
import orchestrator
from mgr_module import HandleCommandResult, MonCommandFailed
-from ceph.deployment.service_spec import ServiceSpec, RGWSpec, CephExporterSpec, MONSpec
+from ceph.deployment.service_spec import (
+ CephExporterSpec,
+ MONSpec,
+ RGWSpec,
+ ServiceSpec,
+)
from ceph.deployment.utils import is_ipv6, unwrap_ipv6
from mgr_util import build_url, merge_dicts
from orchestrator import OrchestratorError, DaemonDescription, DaemonDescriptionStatus
except ImportError:
pass
-from ceph.deployment.service_spec import ServiceSpec, PlacementSpec, RGWSpec, \
- NFSServiceSpec, IscsiServiceSpec, HostPlacementSpec, CustomContainerSpec, MDSSpec, \
- CustomConfig
+from ceph.deployment.service_spec import (
+ CustomConfig,
+ CustomContainerSpec,
+ HostPlacementSpec,
+ IscsiServiceSpec,
+ MDSSpec,
+ NFSServiceSpec,
+ PlacementSpec,
+ RGWSpec,
+ ServiceSpec,
+)
from ceph.deployment.drive_selection.selector import DriveSelection
from ceph.deployment.inventory import Devices, Device
from ceph.utils import datetime_to_str, datetime_now
import pytest
-from ceph.deployment.service_spec import HostPlacementSpec, PlacementSpec, \
- ServiceSpec, RGWSpec, NFSServiceSpec, IscsiServiceSpec, AlertManagerSpec, \
- CustomContainerSpec, GrafanaSpec, PrometheusSpec
+from ceph.deployment.service_spec import (
+ AlertManagerSpec,
+ CustomContainerSpec,
+ GrafanaSpec,
+ HostPlacementSpec,
+ IscsiServiceSpec,
+ NFSServiceSpec,
+ PlacementSpec,
+ PrometheusSpec,
+ RGWSpec,
+ ServiceSpec,
+)
from ceph.deployment.drive_group import DriveGroupSpec
from ceph.deployment.hostspec import SpecValidationError