Skip to content

Commit

Permalink
fix: add a pyproject.toml default for load_toml (#917)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii authored Jan 31, 2025
1 parent 101d7c4 commit 223c8c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nox/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def __dir__() -> list[str]:


def load_toml(
filename: os.PathLike[str] | str, *, missing_ok: bool = False
filename: os.PathLike[str] | str = "pyproject.toml", *, missing_ok: bool = False
) -> 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"``.
If ``missing_ok``, this will return an empty dict if a script block was not
found, otherwise it will raise a error.
Expand Down

0 comments on commit 223c8c6

Please sign in to comment.