mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 23:27:49 +01:00
Improve Type Completeness & Corresponding Workflow (#4035)
This commit is contained in:
parent
a52c91996e
commit
57c2f6e01e
2 changed files with 9 additions and 1 deletions
8
.github/workflows/type_completeness.yml
vendored
8
.github/workflows/type_completeness.yml
vendored
|
@ -50,6 +50,14 @@ jobs:
|
||||||
json.load(open("pr.json", "rb"))["typeCompleteness"]["completenessScore"]
|
json.load(open("pr.json", "rb"))["typeCompleteness"]["completenessScore"]
|
||||||
)
|
)
|
||||||
base_text = f"This PR changes type completeness from {round(base, 3)} to {round(pr, 3)}."
|
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):
|
if pr < (base - 0.001):
|
||||||
text = f"{base_text} ❌"
|
text = f"{base_text} ❌"
|
||||||
set_summary(text)
|
set_summary(text)
|
||||||
|
|
|
@ -105,7 +105,7 @@ class JobQueue(Generic[CCT]):
|
||||||
|
|
||||||
self._application: Optional[weakref.ReferenceType[Application]] = None
|
self._application: Optional[weakref.ReferenceType[Application]] = None
|
||||||
self._executor = AsyncIOExecutor()
|
self._executor = AsyncIOExecutor()
|
||||||
self.scheduler: AsyncIOScheduler = AsyncIOScheduler(**self.scheduler_configuration)
|
self.scheduler: "AsyncIOScheduler" = AsyncIOScheduler(**self.scheduler_configuration)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
"""Give a string representation of the JobQueue in the form ``JobQueue[application=...]``.
|
"""Give a string representation of the JobQueue in the form ``JobQueue[application=...]``.
|
||||||
|
|
Loading…
Reference in a new issue