Skip to content
Myr

noxfile.py

This file

Path

noxfile.py

40 lines · 1.1 KiB · Python

Last changed by

Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212

History of this file

Take it

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 1–11why, one step back
1import nox
23source_files = ("httpx", "tests", "setup.py", "noxfile.py")456@nox.session(reuse_venv=True)7def lint(session):8 session.install("autoflake", "black", "flake8", "isort", "seed-isort-config")910 session.run("autoflake", "--in-place", "--recursive", *source_files)11 session.run("seed-isort-config", "--application-directories=httpx")

Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212

line 12why, one step back
12 session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 13–19why, one step back
13 session.run("black", "--target-version=py36", *source_files)
1415 check(session)161718@nox.session(reuse_venv=True)19def check(session):

Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63

lines 20–22why, one step back
20 session.install(
21 "black", "flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"22 )

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 23–24why, one step back
23
24 session.run("black", "--check", "--target-version=py36", *source_files)

Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212

lines 25–26why, one step back
25 session.run("flake8", *source_files)
26 session.run("mypy", "httpx")

Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2

lines 27–39why, one step back
27
2829@nox.session(reuse_venv=True)30def docs(session):31 session.install("mkdocs", "mkdocs-material")3233 session.run("mkdocs", "build")343536@nox.session(python=["3.6", "3.7", "3.8"])37def test(session):38 session.install("-r", "test-requirements.txt")39

Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212

line 40why, one step back
40 session.run("python", "-m", "pytest")