Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input validators crash fix #4868

Merged
merged 3 commits into from
Aug 11, 2024
Merged

Input validators crash fix #4868

merged 3 commits into from
Aug 11, 2024

Conversation

darrenburns
Copy link
Member

Supplying a list to Input.validate_on causes a crash starting from v0.76.0.

|/textual/widgets/_input.py:304 in __init__
...
│   303 │   │   self.validate_on: set[str] = (                                               │
│ ❱ 304 │   │   │   (_POSSIBLE_VALIDATE_ON_VALUES & cast("set[str]", validate_on))           │
│   305 │   │   │   if validate_on is not None                                               │
│   306 │   │   │   else _POSSIBLE_VALIDATE_ON_VALUES                                        │
│   307 │   │   )

TypeError: RequestOptions() compose() method returned an invalid result; unsupported operand
type(s) for &: 'set' and 'list'

@darrenburns darrenburns self-assigned this Aug 11, 2024
@darrenburns darrenburns marked this pull request as ready for review August 11, 2024 18:51
@darrenburns darrenburns merged commit 3de42a9 into main Aug 11, 2024
20 checks passed
@darrenburns darrenburns deleted the input-validators-crash-fix branch August 11, 2024 20:16
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