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

fix: over validation of lists #921

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Jan 31, 2025

Lists were being over-validated when we added validation (see #920), nox.options.sessions = ("a", "b") should be allowed. I don't want to allow nox.options.sessions = "ab", though, since that's surprising and would only work for one-letter sessions. I went with just validating both lists and tuples, though now that I think of it, maybe sets should be supported too. There's also the option of just validating for Sequence + not(str), but that can't be represented in static types (first commit), as far as I know. Edit: reverted to the original Sequence idea, set and frozenset (at least) should be supported too.

Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii force-pushed the henryiii/fix/over_validate branch from 6b8e780 to da0a05c Compare January 31, 2025 20:20
@henryiii henryiii marked this pull request as ready for review January 31, 2025 20:21
@henryiii henryiii mentioned this pull request Jan 31, 2025
@henryiii
Copy link
Collaborator Author

@edgarrmondragon Does this look fine?

@edgarrmondragon
Copy link
Contributor

@edgarrmondragon Does this look fine?

Yup, this works!

@henryiii henryiii merged commit 97e5a38 into wntrblm:main Jan 31, 2025
24 checks passed
@henryiii henryiii deleted the henryiii/fix/over_validate branch January 31, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants