summaryrefslogtreecommitdiff
path: root/gitlab/mixins.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-07-28 21:39:22 -0700
committerJohn L. Villalovos <john@sodarock.com>2022-07-28 21:39:22 -0700
commit76ec4b481fa931ea36a195ac474812c11babef7b (patch)
tree23ddb54416eea1971f5b7aaa6fc3e71e941d503b /gitlab/mixins.py
parent8ba97aa459420ec5ae824d9299d6564656841559 (diff)
downloadgitlab-76ec4b481fa931ea36a195ac474812c11babef7b.tar.gz
chore: enable mypy check `warn_return_any`
Update code so that the `warn_return_any` check passes.
Diffstat (limited to 'gitlab/mixins.py')
-rw-r--r--gitlab/mixins.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/mixins.py b/gitlab/mixins.py
index a48c032..d58227a 100644
--- a/gitlab/mixins.py
+++ b/gitlab/mixins.py
@@ -755,7 +755,10 @@ class TimeTrackingMixin(_RestObjectBase):
# Use the existing time_stats attribute if it exist, otherwise make an
# API call
if "time_stats" in self.attributes:
- return self.attributes["time_stats"]
+ time_stats = self.attributes["time_stats"]
+ if TYPE_CHECKING:
+ assert isinstance(time_stats, dict)
+ return time_stats
path = f"{self.manager.path}/{self.encoded_id}/time_stats"
result = self.manager.gitlab.http_get(path, **kwargs)