Use set literal notation
This commit is contained in:
parent
859c5279c4
commit
43c115a747
1 changed files with 18 additions and 24 deletions
|
@ -14,32 +14,26 @@ from typer import Typer
|
||||||
app: Typer = typer.Typer()
|
app: Typer = typer.Typer()
|
||||||
|
|
||||||
DATETIME_FORMAT: str = "%m/%d/%Y %I:%M %p"
|
DATETIME_FORMAT: str = "%m/%d/%Y %I:%M %p"
|
||||||
CORE_LABELS: set[str] = set(
|
CORE_LABELS: set[str] = {
|
||||||
[
|
"defect",
|
||||||
"defect",
|
"design",
|
||||||
"design",
|
"documentation",
|
||||||
"documentation",
|
"enhancement",
|
||||||
"enhancement",
|
"panic / crash",
|
||||||
"panic / crash",
|
}
|
||||||
]
|
|
||||||
)
|
|
||||||
# A set of labels for adding in labels that we want present in the final
|
# A set of labels for adding in labels that we want present in the final
|
||||||
# report, but that we don't want being defined as a core label, since issues
|
# report, but that we don't want being defined as a core label, since issues
|
||||||
# with without core labels are flagged as errors.
|
# with without core labels are flagged as errors.
|
||||||
ADDITIONAL_LABELS: set[str] = set(
|
ADDITIONAL_LABELS: set[str] = {
|
||||||
[
|
"ai",
|
||||||
"ai",
|
"linux",
|
||||||
"linux",
|
"vim",
|
||||||
"vim",
|
"windows",
|
||||||
"windows",
|
}
|
||||||
]
|
IGNORED_LABELS: set[str] = {
|
||||||
)
|
"ignore top-ranking issues",
|
||||||
IGNORED_LABELS: set[str] = set(
|
"meta",
|
||||||
[
|
}
|
||||||
"ignore top-ranking issues",
|
|
||||||
"meta",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
ISSUES_PER_LABEL: int = 20
|
ISSUES_PER_LABEL: int = 20
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +43,7 @@ class IssueData:
|
||||||
self.like_count: int = issue._rawData["reactions"]["+1"] # type: ignore [attr-defined]
|
self.like_count: int = issue._rawData["reactions"]["+1"] # type: ignore [attr-defined]
|
||||||
self.creation_datetime: str = issue.created_at.strftime(DATETIME_FORMAT)
|
self.creation_datetime: str = issue.created_at.strftime(DATETIME_FORMAT)
|
||||||
# TODO: Change script to support storing labels here, rather than directly in the script
|
# TODO: Change script to support storing labels here, rather than directly in the script
|
||||||
self.labels: set[str] = set(label["name"] for label in issue._rawData["labels"]) # type: ignore [attr-defined]
|
self.labels: set[str] = {label["name"] for label in issue._rawData["labels"]} # type: ignore [attr-defined]
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue