Skip to content

docs(typing): Fix inaccurate selection_interval signature - #3662

Merged
dangotbanned merged 1 commit into
mainfrom
update-selection-interval-ann-doc
Oct 30, 2024
Merged

dangotbanned merged 1 commit into
mainfrom
update-selection-interval-ann-doc

Conversation

@dangotbanned

Copy link
Copy Markdown
Member

Resolves #3653 (comment)

Primarily addresses mark: Mark, which should be mark: BrushConfig.

As @mattijn noted, interactions-parameter-composition would produce this waring:

Argument of type "BrushConfig" cannot be assigned to parameter "mark" of type "Optional[Mark]" in function "selection_interval"
  Type "BrushConfig" is not assignable to type "Optional[Mark]"
    "BrushConfig" is not assignable to "Mark"
    "BrushConfig" is not assignable to "UndefinedType"

I traced this back to:


It was also asked was whether this can be set within a theme.
I found that indeed this would be possible (BrushConfigKwds).

I spotted some others which seemed useful to include (MergedStreamKwds, DerivedStreamKwds).

Note

I think the strange docs these have is due to being defined recursively.


Finally, this PR updates/corrects the typing embedded within the docstring

@dangotbanned
dangotbanned marked this pull request as ready for review October 30, 2024 12:04
@dangotbanned
dangotbanned enabled auto-merge (squash) October 30, 2024 12:04
@dangotbanned
dangotbanned merged commit fef3488 into main Oct 30, 2024
@dangotbanned
dangotbanned deleted the update-selection-interval-ann-doc branch October 30, 2024 12:12
dangotbanned added a commit that referenced this pull request Oct 30, 2024
Follow-up to #3662

This PR simply aligns the changes introduced there to provide a consistent UX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant