summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-11-24 21:24:16 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-12-05 22:10:29 -0800
commitf40e9b3517607c95f2ce2735e3b08ffde8d61e5a (patch)
tree04bb910ec19d26de826acbafe48b3d1927779c8f
parenta86d0490cadfc2f9fe5490879a1258cf264d5202 (diff)
downloadgitlab-f40e9b3517607c95f2ce2735e3b08ffde8d61e5a.tar.gz
chore: enable 'warn_redundant_casts' for mypyjlvillal/mypy_strict_two_steps
Enable 'warn_redundant_casts'for mypy and resolve one issue.
-rw-r--r--gitlab/v4/objects/keys.py2
-rw-r--r--pyproject.toml2
2 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/v4/objects/keys.py b/gitlab/v4/objects/keys.py
index 46f6894..c03dced 100644
--- a/gitlab/v4/objects/keys.py
+++ b/gitlab/v4/objects/keys.py
@@ -31,4 +31,4 @@ class KeyManager(GetMixin, RESTManager):
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 8e9920e..62e0bfb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,6 +12,7 @@ disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
+warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
@@ -21,7 +22,6 @@ warn_unused_ignores = true
# no_implicit_optional = true
# no_implicit_reexport = true
# strict_equality = true
-# warn_redundant_casts = true
# warn_return_any = true
[[tool.mypy.overrides]] # Overrides for currently untyped modules