Repository navigation
feat(codegen): keyword-only arg/args for params-class methods - #7
Merged
Merged
Conversation
kvdomingo
marked this pull request as ready for review
October 19, 2026 16:22
Params-class arguments were the only positional parameter in generated methods. They are now keyword-only: `arg` for single-call commands and `args: Sequence[Params]` for :copyfrom and :batch* commands, matching asavoy/alt-sqlc-gen-python's name for batch arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sync the query-codegen delta into the main spec and move the change to the archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kvdomingo
force-pushed
the
feat/codegen/keyword-only-params-arg
branch
from
October 19, 2026 16:24
5a48baf to
8813b36
Compare
kvdomingo
added a commit
that referenced
this pull request
Oct 19, 2026
* docs: gitbutler setup (#4) * feat(overrides): add many option for list-wrapped override types (#3) * docs: gitbutler setup * docs(openspec): propose override many option Add an OpenSpec change for a 'many' override flag that wraps py_type in a list, so py_import works for lists of user types. py_import now requires a single-identifier py_type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(overrides): add many option for list-wrapped override types py_import with a generic py_type produced invalid imports. many: true wraps the override type in a list; py_import now requires a single identifier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: [skip ci] archive override many spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * docs: [skip ci] bump to v1.1.0 * feat(codegen): keyword-only arg/args for params-class methods (#7) * feat(codegen): keyword-only arg/args for params-class methods Params-class arguments were the only positional parameter in generated methods. They are now keyword-only: `arg` for single-call commands and `args: Sequence[Params]` for :copyfrom and :batch* commands, matching asavoy/alt-sqlc-gen-python's name for batch arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: [skip ci] archive keyword-only-params-arg spec Sync the query-codegen delta into the main spec and move the change to the archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Params-class arguments were the only positional parameter in generated querier methods. They are now keyword-only:
:copyfrom,:batchexec,:batchone,:batchmany→def create_authors(self, *, args: Sequence[CreateAuthorsParams])query_parameter_limit(or with a limit of0) →def update_author(self, *, arg: UpdateAuthorParams)Batch commands use the same name as asavoy/alt-sqlc-gen-python (
args), but the annotation staysSequence[Params]rather thanlist[Params].Callers now pass
arg=/args=. The README migration notes cover both upstream and alt users.Includes regenerated testdata/examples, updated hand-written protocol fakes, and the OpenSpec change
keyword-only-params-arg. Verified withmake test,mypy --stricton the feature-matrix and protocol fixtures, andpytest src/testsinexamples/against Postgres.🤖 Generated with Claude Code