From 3303e7021625c478d3f314fb0ff8846242b8b2e0 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Mon, 31 Jul 2023 14:50:57 +0530 Subject: [PATCH] mgr: fix some flake8 complaints Signed-off-by: Nizamudeen A (cherry picked from commit d199782fb5f3c22f1cd5fda6ddf1d64f40a92726) --- src/pybind/mgr/cephadm/tests/fixtures.py | 4 ++-- src/pybind/mgr/cephadm/tests/test_upgrade.py | 6 +++--- src/pybind/mgr/crash/module.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/fixtures.py b/src/pybind/mgr/cephadm/tests/fixtures.py index 869c7f7cea4..6281283d7b5 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 393fc37aaff..7aa46f90276 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 739555e6270..e9f78c81514 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 -- 2.39.5