Skip to content

Add kw_only to large frozen report/response dataclasses#2933

Merged
adamtheturtle merged 1 commit intomainfrom
dataclass-kw-only-reports-response
Mar 29, 2026
Merged

Add kw_only to large frozen report/response dataclasses#2933
adamtheturtle merged 1 commit intomainfrom
dataclass-kw-only-reports-response

Conversation

@adamtheturtle
Copy link
Copy Markdown
Member

@adamtheturtle adamtheturtle commented Mar 29, 2026

Summary

DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response now use kw_only=True with frozen=True. Constructors in this repo already use keyword arguments.

Smaller frozen types in reports.py (TargetData, QueryResult, TargetStatusAndRecord) are unchanged.

Testing

Full suite was not run here due to local torch/httpx environment issues on this machine; constructors were verified to use keywords via code search.

Made with Cursor


Note

Medium Risk
This changes the public constructor signature of several exported dataclasses (kw_only=True), which is backward-incompatible for any external callers using positional args. Internal call sites appear to already use keyword arguments, so impact should be limited if consumers follow the same pattern.

Overview
Makes DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response keyword-only dataclasses by adding kw_only=True while keeping them frozen=True.

This prevents positional construction of these types (a small API tightening), while leaving smaller frozen report types unchanged.

Written by Cursor Bugbot for commit 0f81323. This will update automatically on new commits. Configure here.

DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response
now require keyword arguments at construction, reducing positional
argument mistakes as fields evolve.

Made-with: Cursor
@adamtheturtle adamtheturtle enabled auto-merge March 29, 2026 06:47
@adamtheturtle adamtheturtle merged commit c4439cf into main Mar 29, 2026
16 checks passed
@adamtheturtle adamtheturtle deleted the dataclass-kw-only-reports-response branch March 29, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant