diff --git a/pyproject.toml b/pyproject.toml index 5fa9aa5..b87599f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "changelist" version = "0.5rc0.dev0" +# TODO add slots=True, kw_only=True to dataclasses starting with >=3.10 requires-python = ">=3.9" readme = "README.md" license = {file = "LICENSE.txt"} diff --git a/src/changelist/_format.py b/src/changelist/_format.py index 034d19a..91eb794 100644 --- a/src/changelist/_format.py +++ b/src/changelist/_format.py @@ -11,7 +11,7 @@ logger = logging.getLogger(__name__) -@dataclass(frozen=True, slots=True, kw_only=True) +@dataclass(frozen=True) class ChangeNote: """Describes an atomic change in the notes.""" @@ -65,7 +65,7 @@ def from_pull_requests( return notes -@dataclass(frozen=True, slots=True, kw_only=True) +@dataclass(frozen=True) class Contributor: """A person mentioned in the notes as an author or reviewer. @@ -74,7 +74,7 @@ class Contributor: contributor's GitHub profile. """ - name: str | None + name: str login: str reference_url: str @@ -98,7 +98,7 @@ def from_named_users(cls, named_users: set[NamedUser]) -> "set[Contributor]": return contributors -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class MdFormatter: """Format release notes in Markdown from PRs, authors and reviewers.""" diff --git a/src/changelist/_query.py b/src/changelist/_query.py index 5be4228..25aad81 100644 --- a/src/changelist/_query.py +++ b/src/changelist/_query.py @@ -51,7 +51,7 @@ def pull_requests_from_commits(commits: Iterable[Commit]) -> set[PullRequest]: return all_pull_requests -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class GitHubGraphQl: """Interface to query GitHub's GraphQL API for a particular repository."""