Skip to content

Remove unnecessary Optional types from non-None defaults in schema.py#78

Closed
dlqqq wants to merge 1 commit intoagentclientprotocol:mainfrom
dlqqq:fix/remove-unnecessary-optional-types
Closed

Remove unnecessary Optional types from non-None defaults in schema.py#78
dlqqq wants to merge 1 commit intoagentclientprotocol:mainfrom
dlqqq:fix/remove-unnecessary-optional-types

Conversation

@dlqqq
Copy link

@dlqqq dlqqq commented Mar 7, 2026

Attributes in schema.py with non-None defaults (e.g. False, [], or factory instances) were incorrectly typed as Optional, which misrepresents the actual runtime type. This lets downstream consumers pass type checkers like mypy and access these attributes without unnecessary None checks.

@PsiACE
Copy link
Member

PsiACE commented Mar 24, 2026

Good catch, but schema.py is generated, so it’s best not to edit it directly. If you're still interested, please try working in the scripts dir.

@PsiACE PsiACE closed this Mar 24, 2026
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.

2 participants