Skip to content

Commit

Permalink
Postpone Python 3.10 dataclass features
Browse files Browse the repository at this point in the history
  • Loading branch information
lagru committed Nov 14, 2023
1 parent 219c92d commit bc5fef4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
8 changes: 4 additions & 4 deletions src/changelist/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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.
Expand All @@ -74,7 +74,7 @@ class Contributor:
contributor's GitHub profile.
"""

name: str | None
name: str
login: str
reference_url: str

Expand All @@ -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."""

Expand Down

0 comments on commit bc5fef4

Please sign in to comment.