Skip to content

Commit

Permalink
build(python): fail nox sessions if a python version is missing (#982)
Browse files Browse the repository at this point in the history
Nox's default behavior is to quietly skip if a python interpreter is missing. https://nox.thea.codes/en/stable/usage.html#failing-sessions-when-the-interpreter-is-missing
  • Loading branch information
busunkim96 committed Mar 16, 2021
1 parent 94686b0 commit eda422b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions synthtool/gcp/templates/python_library/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ nox.options.sessions = [
"docs",
]

# Error if a python version is missing
nox.options.error_on_missing_interpreters = True


@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
"""Run linters.
Expand Down

0 comments on commit eda422b

Please sign in to comment.