Skip to content

fix: over validation of lists#921

Merged
henryiii merged 1 commit intowntrblm:mainfrom
henryiii:henryiii/fix/over_validate
Jan 31, 2025
Merged

fix: over validation of lists#921
henryiii merged 1 commit intowntrblm:mainfrom
henryiii:henryiii/fix/over_validate

Conversation

@henryiii
Copy link
Copy Markdown
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 <henryschreineriii@gmail.com>
@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
Copy Markdown
Collaborator Author

@edgarrmondragon Does this look fine?

@edgarrmondragon
Copy link
Copy Markdown
Contributor

@edgarrmondragon Does this look fine?

Yup, this works!

@henryiii henryiii merged commit 97e5a38 into wntrblm:main Jan 31, 2025
@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