Skip to content

Commit

Permalink
🔧 update lint nox session
Browse files Browse the repository at this point in the history
  • Loading branch information
burgholzer committed Oct 10, 2024
1 parent 6aa01da commit cf0cbef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import argparse
import os
import shutil
from typing import TYPE_CHECKING

import nox
Expand All @@ -30,12 +31,11 @@

@nox.session(reuse_venv=True)
def lint(session: nox.Session) -> None:
"""Lint the Python part of the codebase using pre-commit.
"""Run the linter."""
if shutil.which("pre-commit") is None:
session.install("pre-commit")

Simply execute `nox -rs lint` to run all configured hooks.
"""
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", *session.posargs)
session.run("pre-commit", "run", "--all-files", *session.posargs, external=True)


def _run_tests(
Expand Down

0 comments on commit cf0cbef

Please sign in to comment.