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: add a pyproject.toml default for load_toml #917

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nox/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def __dir__() -> list[str]:
)


def load_toml(filename: os.PathLike[str] | str) -> dict[str, Any]:
def load_toml(filename: os.PathLike[str] | str = "pyproject.toml") -> dict[str, Any]:
"""
Load a toml file or a script with a PEP 723 script block.

The file must have a ``.toml`` extension to be considered a toml file or a
``.py`` extension / no extension to be considered a script. Other file
extensions are not valid in this function.
extensions are not valid in this function. The default is ``"pyproject.toml"``.

Example:

Expand Down
Loading