Skip to content

Commit bf25b48

Browse files
committed
slots
1 parent 9a6d518 commit bf25b48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

release_management/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
ROOT_DIR = RELEASE_DIR.parent
2525
PEP_ROOT = ROOT_DIR / 'peps'
2626

27-
kw_only = {'kw_only': True} if sys.version_info[:2] >= (3, 10) else {}
27+
dc_kw = {'kw_only': True, 'slots': True} if sys.version_info[:2] >= (3, 10) else {}
2828

2929

30-
@dataclass(frozen=True, **kw_only, slots=True)
30+
@dataclass(frozen=True, **dc_kw)
3131
class PythonReleases:
3232
metadata: dict[str, VersionMetadata]
3333
releases: dict[str, list[ReleaseInfo]]
3434

3535

36-
@dataclass(frozen=True, **kw_only, slots=True)
36+
@dataclass(frozen=True, **dc_kw)
3737
class VersionMetadata:
3838
"""Metadata for a given interpreter version (MAJOR.MINOR)."""
3939

@@ -52,7 +52,7 @@ def from_toml(cls, data: dict[str, int | str | dt.date]):
5252
return cls(**{k.replace('-', '_'): v for k, v in data.items()})
5353

5454

55-
@dataclass(frozen=True, **kw_only, slots=True)
55+
@dataclass(frozen=True, **dc_kw)
5656
class ReleaseInfo:
5757
"""Information about a release."""
5858

0 commit comments

Comments
 (0)