diff --git a/gitlab/v4/objects/keys.py b/gitlab/v4/objects/keys.py index 46f68946c..c03dceda7 100644 --- a/gitlab/v4/objects/keys.py +++ b/gitlab/v4/objects/keys.py @@ -31,4 +31,4 @@ def get( server_data = self.gitlab.http_get(self.path, **kwargs) if TYPE_CHECKING: assert isinstance(server_data, dict) - return cast(Key, self._obj_cls(self, server_data)) + return self._obj_cls(self, server_data) diff --git a/pyproject.toml b/pyproject.toml index 3e8116904..62e0bfbeb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,25 @@ multi_line_output = 3 order_by_type = false [tool.mypy] +files = "." + +# 'strict = true' is equivalent to the following: +check_untyped_defs = true disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true disallow_untyped_defs = true -files = "." +warn_redundant_casts = true +warn_unused_configs = true +warn_unused_ignores = true + +# The following need to have changes made to be able to enable them: +# disallow_any_generics = true +# disallow_untyped_calls = true +# no_implicit_optional = true +# no_implicit_reexport = true +# strict_equality = true +# warn_return_any = true [[tool.mypy.overrides]] # Overrides for currently untyped modules module = [
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: