From 0f813231200c0d54c16d5c25fdcac9fbd9e23d0a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 29 Mar 2026 07:40:24 +0100 Subject: [PATCH] Add kw_only to large frozen report and response dataclasses DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response now require keyword arguments at construction, reducing positional argument mistakes as fields evolve. Made-with: Cursor --- src/vws/reports.py | 6 +++--- src/vws/response.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vws/reports.py b/src/vws/reports.py index 726f93b6..1767a812 100644 --- a/src/vws/reports.py +++ b/src/vws/reports.py @@ -9,7 +9,7 @@ @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class DatabaseSummaryReport: """A database summary report. @@ -64,7 +64,7 @@ class TargetStatuses(Enum): @beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetSummaryReport: """A target summary report. @@ -101,7 +101,7 @@ def from_response_dict(cls, response_dict: dict[str, Any]) -> Self: @beartype(conf=BeartypeConf(is_pep484_tower=True)) -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) class TargetRecord: """A target record. diff --git a/src/vws/response.py b/src/vws/response.py index 71d1b9a4..d6456819 100644 --- a/src/vws/response.py +++ b/src/vws/response.py @@ -5,7 +5,7 @@ from beartype import beartype -@dataclass(frozen=True) +@dataclass(frozen=True, kw_only=True) @beartype class Response: """A response from a request."""