Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: validate entries in nox.config, too, using attrs #880

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Oct 29, 2024

This is a followup to #871. It also reduces the need for #872, as I think it makes it harder or impossible to incorrectly set this via normal means.

Attrs is a well respected, zero dependency, small library by a CPython core dev, but it is an extra dependency. If we did adopt it, though, I would start moving over a few other things, which could improve our internal typing too.

Incomplete list for "NoxCmdOptions":
class NoxCmdOptions(NoxOptions):
    version: bool
    list_sessions: bool
    json: bool
    posargs: list[str]
    add_timestamp: bool
    no_venv: bool
    R: bool
    noxfile: str
    envdir: None | str
    extra_pythons: list[str]
    force_pythons: list[str]
    install_only: bool
    no_install: bool
    report: None | str
    no_reuse_existing_virtualenvs: bool  # backcompat
    non_interactive: bool
    nocolor: bool
    forcecolor: bool
    color: bool
    invoked_from: str

@henryiii henryiii changed the title fix: validate entries in nox.config, too fix: validate entries in nox.config, too, using attrs Oct 29, 2024
Copy link
Collaborator

@DiddiLeija DiddiLeija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a very handy fix to me! However I'd like to see what other mantainers think of adding a dependency before giving the approval :)

@henryiii henryiii requested a review from theacodes October 31, 2024 16:26
@henryiii henryiii force-pushed the henryiii/fix/validate branch from 1f63e2f to 35533bd Compare November 11, 2024 22:10
@henryiii
Copy link
Collaborator Author

It's been a couple of weeks without any complaints, and I'd like to build on this, so I think I'll merge unless there are any last objections!

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/fix/validate branch from 35533bd to 8662eb5 Compare November 12, 2024 20:16
@henryiii henryiii merged commit bdd84a4 into wntrblm:main Nov 12, 2024
24 checks passed
@henryiii henryiii deleted the henryiii/fix/validate branch November 12, 2024 21:17
@henryiii henryiii mentioned this pull request Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants