From: John Mulligan Date: Tue, 28 Mar 2023 21:07:20 +0000 (-0400) Subject: mgr/dashboard: ignore type checking for exception handling module X-Git-Tag: v19.0.0~1447^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e767b8643aa6565a6149a600df3d87a7b31f737a;p=ceph.git mgr/dashboard: ignore type checking for exception handling module Add a `# type: ignore` comment to the exception handling dashboard module just like the instance to lines below. This module does not already import typing, so I'm not going to add it. This change is needed in order to run mypy 0.981. Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/dashboard/services/exception.py b/src/pybind/mgr/dashboard/services/exception.py index ed4fbe8003d9..c39209569dbd 100644 --- a/src/pybind/mgr/dashboard/services/exception.py +++ b/src/pybind/mgr/dashboard/services/exception.py @@ -34,7 +34,7 @@ def serialize_dashboard_exception(e, include_http_status=False, task=None): component = getattr(e, 'component', None) out['component'] = component if component else None if include_http_status: - out['status'] = getattr(e, 'status', 500) + out['status'] = getattr(e, 'status', 500) # type: ignore if task: out['task'] = dict(name=task.name, metadata=task.metadata) # type: ignore return out