From: Nizamudeen A Date: Mon, 31 Jul 2023 09:20:57 +0000 (+0530) Subject: mgr: fix some flake8 complaints X-Git-Tag: v17.2.7~232^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=baf9e388be3809033c0b1cafd052af45d70b8c82;p=ceph.git mgr: fix some flake8 complaints Signed-off-by: Nizamudeen A (cherry picked from commit d199782fb5f3c22f1cd5fda6ddf1d64f40a92726) --- diff --git a/src/pybind/mgr/cephadm/tests/fixtures.py b/src/pybind/mgr/cephadm/tests/fixtures.py index c9939ce431d05..23c4fe7913044 100644 --- a/src/pybind/mgr/cephadm/tests/fixtures.py +++ b/src/pybind/mgr/cephadm/tests/fixtures.py @@ -90,9 +90,9 @@ def with_cephadm_module(module_options=None, store=None): :param module_options: Set opts as if they were set before module.__init__ is called :param store: Set the store before module.__init__ is called """ - with mock.patch("cephadm.module.CephadmOrchestrator.get_ceph_option", get_ceph_option),\ + with mock.patch("cephadm.module.CephadmOrchestrator.get_ceph_option", get_ceph_option), \ mock.patch("cephadm.services.osd.RemoveUtil._run_mon_cmd"), \ - mock.patch('cephadm.module.CephadmOrchestrator.get_module_option_ex', get_module_option_ex),\ + mock.patch('cephadm.module.CephadmOrchestrator.get_module_option_ex', get_module_option_ex), \ mock.patch("cephadm.module.CephadmOrchestrator.get_osdmap"), \ mock.patch("cephadm.module.CephadmOrchestrator.remote"), \ mock.patch("cephadm.agent.CephadmAgentHelpers._request_agent_acks"), \ diff --git a/src/pybind/mgr/cephadm/tests/test_upgrade.py b/src/pybind/mgr/cephadm/tests/test_upgrade.py index 393fc37aaff06..7aa46f9027695 100644 --- a/src/pybind/mgr/cephadm/tests/test_upgrade.py +++ b/src/pybind/mgr/cephadm/tests/test_upgrade.py @@ -92,11 +92,11 @@ def test_upgrade_run(use_repo_digest, cephadm_module: CephadmOrchestrator): cephadm_module.set_container_image('global', 'from_image') cephadm_module.use_repo_digest = use_repo_digest with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(host_pattern='*', count=2)), - CephadmOrchestrator.apply_mgr, '', status_running=True),\ + CephadmOrchestrator.apply_mgr, '', status_running=True), \ mock.patch("cephadm.module.CephadmOrchestrator.lookup_release_name", - return_value='foo'),\ + return_value='foo'), \ mock.patch("cephadm.module.CephadmOrchestrator.version", - new_callable=mock.PropertyMock) as version_mock,\ + new_callable=mock.PropertyMock) as version_mock, \ mock.patch("cephadm.module.CephadmOrchestrator.get", return_value={ # capture fields in both mon and osd maps diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index 739555e627042..e9f78c8151408 100644 --- a/src/pybind/mgr/crash/module.py +++ b/src/pybind/mgr/crash/module.py @@ -9,7 +9,7 @@ from collections import defaultdict from prettytable import PrettyTable import re from threading import Event, Lock -from typing import cast, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Tuple, TypeVar,\ +from typing import cast, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Tuple, TypeVar, \ Union, TYPE_CHECKING