Skip to content

Commit

Permalink
labeler: make LabelerCtx un-frozen
Browse files Browse the repository at this point in the history
This is needed so that the dataclass can have dict and other mutable
types as fields.
  • Loading branch information
gotmax23 committed Jul 31, 2023
1 parent b2ffdfc commit 47a86ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hacking/pr_labeler/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_repo(authed: bool = True) -> tuple[github.Github, github.Repository.Repo
return gclient, repo


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass()
class LabelerCtx:
client: github.Github
repo: github.Repository.Repository
Expand All @@ -70,7 +70,7 @@ def previously_labeled(self) -> frozenset[str]:
return frozenset(labels)


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass()
class IssueLabelerCtx(LabelerCtx):
issue: github.Issue.Issue

Expand All @@ -79,7 +79,7 @@ def member(self) -> IssueOrPr:
return self.issue


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass()
class PRLabelerCtx(LabelerCtx):
pr: github.PullRequest.PullRequest

Expand Down

0 comments on commit 47a86ba

Please sign in to comment.