Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-shields committed Apr 4, 2024
1 parent 1234d74 commit 63f14ce
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,32 @@ def install_with_constraints(session, *args, **kwargs):
@nox.session()
def black(session):
"""Run black code formatter."""
session.run("poetry", "install", external=True)
args = session.posargs or SOURCES
session.run("isort", *args)
session.run("black", *args)
session.run("isort", *args, external=True)
session.run("black", *args, external=True)


@nox.session()
def lint(session):
"""Lint using flake8."""
args = session.posargs or SOURCES
session.run("poetry", "install", external=True)
session.run("poetry", "run", "flake8", *args, external=True)
session.run("flake8", *args, external=True)


@nox.session()
def tests(session):
"""Run the test suite."""
args = session.posargs or ["--cov"]
session.run("poetry", "install", external=True)
session.run("poetry", "run", "pytest", *args, external=True)
session.run("pytest", *args, external=True)


@nox.session()
def coverage(session):
"""Upload coverage data."""
session.run("poetry", "install", external=True)
session.run("coverage", "xml", "--fail-under=0")
session.run("codecov", *session.posargs)

Expand Down

0 comments on commit 63f14ce

Please sign in to comment.