Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use set literal notation

Joseph T. Lyons43c115a74732
diff --git a/script/update_top_ranking_issues/main.py b/script/update_top_ranking_issues/main.py
index 741406696e0..ea503632995 100644
--- a/script/update_top_ranking_issues/main.py
+++ b/script/update_top_ranking_issues/main.py
@@ -14,32 +14,26 @@ from typer import Typer
app: Typer = typer.Typer()
DATETIME_FORMAT: str = "%m/%d/%Y %I:%M %p"
-CORE_LABELS: set[str] = set(
- [
- "defect",
- "design",
- "documentation",
- "enhancement",
- "panic / crash",
- ]
-)
+CORE_LABELS: set[str] = {
+ "defect",
+ "design",
+ "documentation",
+ "enhancement",
+ "panic / crash",
+}
# 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
# with without core labels are flagged as errors.
-ADDITIONAL_LABELS: set[str] = set(
- [
- "ai",
- "linux",
- "vim",
- "windows",
- ]
-)
-IGNORED_LABELS: set[str] = set(
- [
- "ignore top-ranking issues",
- "meta",
- ]
-)
+ADDITIONAL_LABELS: set[str] = {
+ "ai",
+ "linux",
+ "vim",
+ "windows",
+}
+IGNORED_LABELS: set[str] = {
+ "ignore top-ranking issues",
+ "meta",
+}
ISSUES_PER_LABEL: int = 20
@@ -49,7 +43,7 @@ class IssueData:
self.like_count: int = issue._rawData["reactions"]["+1"] # type: ignore [attr-defined]
self.creation_datetime: str = issue.created_at.strftime(DATETIME_FORMAT)
# 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()