Skip to content

Fixup Type Annotations - #55

Open
thomasmatecki wants to merge 1 commit into
starfederation:developfrom
thomasmatecki:develop
Open

thomasmatecki wants to merge 1 commit into
starfederation:developfrom
thomasmatecki:develop

Conversation

@thomasmatecki

@thomasmatecki thomasmatecki commented Sep 14, 2026

Copy link
Copy Markdown

Refines type annotations in src/datastar_py/attributes.py.

  • Add type parameters to Mapping where appropriate. [1] [2] [3] [4]
  • Changed the BaseAttr super class to include type params: Mapping[str, str | Literal[True]]
  • Defined a JSObjectDict type alias for JavaScript object construction and updated the _js_object helper function to use it.
  • Added a _mods dictionary attribute type to the TimingMod, DelayMod, and ViewtransitionMod classes. These classes is always mixed in with BaseAttr [1] [2] [3]
  • Added type params to return type of _filter_dict.

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