Skip to content

Conversation

@chanicpanic
Copy link

What is the problem that this PR addresses?

Choice.disabled is annotated as an optional str but can also be a bool:

"{}".format(
""
if isinstance(choice.disabled, bool)
else " ({})".format(choice.disabled)
),

Partially related to #251 (comment)

How did you solve it?

This PR changes the type of Choice.disabled and related annotations to Optional[Union[str, bool]].

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

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