@@ -217,7 +217,7 @@ def body(self, new_body: str) -> None:
217217 self ._body = new_body
218218
219219 @property
220- def id (self ) -> int :
220+ def id (self ) -> Optional [ int ] :
221221 return self ._id
222222
223223 @property
@@ -226,12 +226,12 @@ def author(self) -> str:
226226 return self ._author
227227
228228 @property
229- def created (self ) -> datetime .datetime :
229+ def created (self ) -> Optional [ datetime .datetime ] :
230230 """Datetime of creation of the comment."""
231231 return self ._created
232232
233233 @property
234- def edited (self ) -> datetime .datetime :
234+ def edited (self ) -> Optional [ datetime .datetime ] :
235235 """Datetime of last edit of the comment."""
236236 return self ._edited
237237
@@ -256,7 +256,7 @@ def add_reaction(self, reaction: str) -> Reaction:
256256
257257class IssueComment (Comment ):
258258 @property
259- def issue (self ) -> "Issue" :
259+ def issue (self ) -> Optional [ "Issue" ] :
260260 """Issue of issue comment."""
261261 return self ._parent
262262
@@ -266,7 +266,7 @@ def __str__(self) -> str:
266266
267267class PRComment (Comment ):
268268 @property
269- def pull_request (self ) -> "PullRequest" :
269+ def pull_request (self ) -> Optional [ "PullRequest" ] :
270270 """Pull request of pull request comment."""
271271 return self ._parent
272272
@@ -642,12 +642,12 @@ def head_commit(self) -> str:
642642 raise NotImplementedError ()
643643
644644 @property
645- def target_branch_head_commit (self ) -> str :
645+ def target_branch_head_commit (self ) -> Optional [ str ] :
646646 """Commit hash of the HEAD commit of the target branch."""
647647 raise NotImplementedError ()
648648
649649 @property
650- def merge_commit_sha (self ) -> str :
650+ def merge_commit_sha (self ) -> Optional [ str ] :
651651 """
652652 Commit hash of the merge commit of the pull request.
653653
@@ -1009,12 +1009,12 @@ def set(
10091009 raise NotImplementedError ()
10101010
10111011 @property
1012- def created (self ) -> datetime .datetime :
1012+ def created (self ) -> Optional [ datetime .datetime ] :
10131013 """Datetime of creating the commit status."""
10141014 raise NotImplementedError ()
10151015
10161016 @property
1017- def edited (self ) -> datetime .datetime :
1017+ def edited (self ) -> Optional [ datetime .datetime ] :
10181018 """Datetime of editing the commit status."""
10191019 raise NotImplementedError ()
10201020
@@ -1230,7 +1230,7 @@ class GitService(OgrAbstractClass):
12301230 instance_url (str): URL of the git forge instance.
12311231 """
12321232
1233- instance_url : Optional [ str ] = None
1233+ instance_url : str
12341234
12351235 def __init__ (self , ** _ : Any ) -> None :
12361236 pass
@@ -1326,7 +1326,9 @@ def list_projects(
13261326
13271327
13281328class GitProject (OgrAbstractClass ):
1329- def __init__ (self , repo : str , service : GitService , namespace : str ) -> None :
1329+ def __init__ (
1330+ self , repo : str , service : GitService , namespace : Optional [str ]
1331+ ) -> None :
13301332 """
13311333 Args:
13321334 repo: Name of the project.
@@ -1335,7 +1337,7 @@ def __init__(self, repo: str, service: GitService, namespace: str) -> None:
13351337
13361338 - GitHub: username or org name.
13371339 - GitLab: username or org name.
1338- - Pagure: namespace (e.g. `"rpms"`).
1340+ - Pagure: namespace (e.g. `"rpms"`). May be none.
13391341
13401342 In case of forks: `"fork/{username}/{namespace}"`.
13411343 """
@@ -1916,7 +1918,7 @@ def get_username(self) -> str:
19161918 """
19171919 raise NotImplementedError ()
19181920
1919- def get_email (self ) -> str :
1921+ def get_email (self ) -> Optional [ str ] :
19201922 """
19211923 Returns:
19221924 Email of the user.
0 commit comments