INNER CODE UNIT · Python

init_project

webartifex/intro-to-python · noxfile.py:41

def init_project(session):
    """Install the pre-commit hooks."""
    for type_ in (
        "pre-commit",
        "pre-merge-commit",
    ):
        session.run("poetry", "run", "pre-commit", "install", f"--hook-type={type_}")


@nox.session(venv_backend="none")
def doctests(session):
    """Run the xdoctests in the source files."""
    for location in SRC_LOCATIONS:
        session.run("poetry", "run", "xdoctest", "--silent", location)


@nox.session(name="fix-branch-references", venv_backend="none")
def fix_branch_references(_session):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…