Skip to content

Commit

Permalink
Improve Type Completeness & Corresponding Workflow (#4035)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Dec 29, 2023
1 parent a52c919 commit 57c2f6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/type_completeness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
json.load(open("pr.json", "rb"))["typeCompleteness"]["completenessScore"]
)
base_text = f"This PR changes type completeness from {round(base, 3)} to {round(pr, 3)}."
if base == 0:
text = f"Something is broken in the workflow. Reported type completeness is 0. 💥"
set_summary(text)
print(Path("pr.readable").read_text(encoding="utf-8"))
error(text)
exit(1)
if pr < (base - 0.001):
text = f"{base_text} ❌"
set_summary(text)
Expand Down
2 changes: 1 addition & 1 deletion telegram/ext/_jobqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self) -> None:

self._application: Optional[weakref.ReferenceType[Application]] = None
self._executor = AsyncIOExecutor()
self.scheduler: AsyncIOScheduler = AsyncIOScheduler(**self.scheduler_configuration)
self.scheduler: "AsyncIOScheduler" = AsyncIOScheduler(**self.scheduler_configuration)

def __repr__(self) -> str:
"""Give a string representation of the JobQueue in the form ``JobQueue[application=...]``.
Expand Down

0 comments on commit 57c2f6e

Please sign in to comment.