You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/09/22 14:50:32 UTC
[allura] 02/02: [#8467] misc type hints
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8467
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 1b85eefb145b76b692dc8a7a2e216faeb0f63c79
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Sep 22 10:50:17 2022 -0400
[#8467] misc type hints
---
Allura/allura/lib/plugin.py | 2 +-
Allura/allura/model/project.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 89537d810..d9cdf9a0d 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -1224,7 +1224,7 @@ class ProjectRegistrationProvider:
It should be overridden for your specific envirnoment'''
return None
- def registration_date(self, project):
+ def registration_date(self, project) -> datetime:
'''
Return the datetime the project was created.
'''
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index c0a010f5e..f0d3552b4 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1015,7 +1015,7 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
uids = [uid for uid in named_roles.userids_that_reach if uid is not None]
return list(User.query.find({'_id': {'$in': uids}, 'disabled': False, 'pending': False}))
- def users_with_role(self, *role_names):
+ def users_with_role(self, *role_names) -> list[User]:
"""Return all users in this project that have at least one of the roles
specified.