Add kw_only to large frozen report/response dataclasses#2933
Merged
adamtheturtle merged 1 commit intomainfrom Mar 29, 2026
Merged
Add kw_only to large frozen report/response dataclasses#2933adamtheturtle merged 1 commit intomainfrom
adamtheturtle merged 1 commit intomainfrom
Conversation
DatabaseSummaryReport, TargetSummaryReport, TargetRecord, and Response now require keyword arguments at construction, reducing positional argument mistakes as fields evolve. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DatabaseSummaryReport,TargetSummaryReport,TargetRecord, andResponsenow usekw_only=Truewithfrozen=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, andResponsekeyword-only dataclasses by addingkw_only=Truewhile keeping themfrozen=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.