From f9ec90111c78eb0f7ae99b41b5078061add29239 Mon Sep 17 00:00:00 2001 From: Afreen Date: Thu, 15 Feb 2024 21:03:36 +0530 Subject: [PATCH] mgr/dashboard: Add # type ignore to fix ci failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit issue: ===== The run_tox py is failing : dashboard/module.py:34: note: In module imported here, dashboard/__init__.py:60: note: ... from here: dashboard/services/rgw_client.py: note: In member "_is_system_user" of class "RgwClient": dashboard/services/rgw_client.py:483: error: Incompatible return value type (got "Literal[0, 1]", expected "bool") Found 1 error in 1 file (checked 32 source files) mypy: exit 1 (82.29 seconds) /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr> mypy --config-file=../../mypy.ini -m alerts -m balancer -m cephadm -m crash -m dashboard -m devicehealth -m diskprediction_local -m hello -m influx -m iostat -m localpool -m mds_autoscaler -m mgr_module -m mgr_util -m mirroring -m nfs -m orchestrator -m pg_autoscaler -m progress -m prometheus -m rbd_support -m rgw -m rook -m snap_schedule -m selftest -m stats -m status -m telegraf -m telemetry -m test_orchestrator -m volumes -m zabbix pid=235356 mypy: FAIL ✖ in 3 minutes 11.62 secondstake your time..you can postpone too Fix: === Added "# type ignore" to ignore the type check to _is_system_user's response Signed-off-by: Afreen --- src/pybind/mgr/dashboard/services/rgw_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/services/rgw_client.py b/src/pybind/mgr/dashboard/services/rgw_client.py index 236fd45646499..8acc61a2968e4 100644 --- a/src/pybind/mgr/dashboard/services/rgw_client.py +++ b/src/pybind/mgr/dashboard/services/rgw_client.py @@ -480,7 +480,7 @@ class RgwClient(RestClient): def _is_system_user(self, admin_path, userid, request=None) -> bool: # pylint: disable=unused-argument response = request() - return strtobool(response['data']['system']) + return strtobool(response['data']['system']) # type: ignore def is_system_user(self) -> bool: return self._is_system_user(self.admin_path, self.userid) -- 2.39.5