def lint()

in noxfile.py [0:0]


def lint(session):
    # Install numpy to use its mypy plugin
    # https://numpy.org/devdocs/reference/typing.html#mypy-plugin
    session.install("black ~= 25.0", "flake8", "mypy", "isort", "numpy")
    session.install(".")
    session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
    session.run("black", "--check", "--target-version=py39", *SOURCE_FILES)
    session.run("isort", "--check", "--profile=black", *SOURCE_FILES)
    session.run("flake8", "--extend-ignore=E203,E402,E501,E704,E712", *SOURCE_FILES)

    # TODO: When all files are typed we can change this to .run("mypy", "--strict", "eland/")
    stdout = session.run(
        "mypy",
        "--show-error-codes",
        "--strict",
        *TYPED_FILES,
        success_codes=(0, 1),
        silent=True,
    )

    errors = []
    for line in stdout.splitlines():
        filepath = line.partition(":")[0]
        if filepath in TYPED_FILES:
            errors.append(line)
    if errors:
        session.error("\n" + "\n".join(sorted(set(errors))))