noxfile.py
This file
Path
noxfile.py
50 lines · 1.3 KiB · Python
Last changed by
Add flake8-pie plugin (#419)Stephen Brown IIbefore adoptiondb3e3a0
History of this fileTake it
Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 1–2why, one step back1import nox2Stop running nox on first error (#286)Jt Miclatbefore adoption33032df
lines 3–4why, one step back3nox.options.stop_on_first_error = True4Add tool for profiling (#364)Florimond Mancabefore adoptione1da6b9
line 5why, one step back5source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 6–13why, one step back678@nox.session(reuse_venv=True)9def lint(session):10 session.install("autoflake", "black", "flake8", "isort", "seed-isort-config")1112 session.run("autoflake", "--in-place", "--recursive", *source_files)13 session.run("seed-isort-config", "--application-directories=httpx")Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
line 14why, one step back14 session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 15–21why, one step back15 session.run("black", "--target-version=py36", *source_files)1617 check(session)181920@nox.session(reuse_venv=True)21def check(session):Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63
line 22why, one step back22 session.install(Add flake8-pie plugin (#419)Stephen Brown IIbefore adoptiondb3e3a0
lines 23–29why, one step back23 "black",24 "flake8",25 "flake8-bugbear",26 "flake8-comprehensions",27 "flake8-pie",28 "isort",29 "mypy",Add flake8-comprehensions to nox check task (#200)Can Sarıgölbefore adoption1b82d63
line 30why, one step back30 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
line 31why, one step back31Add --diff flag to Black for easier debugging (#219)euri10before adoptione64fcad
line 32why, one step back32 session.run("black", "--check", "--diff", "--target-version=py36", *source_files)Move all tooling configuration to setup.cfg (#204)Humberto Rochabefore adoptione51b212
lines 33–34why, one step back33 session.run("flake8", *source_files)34 session.run("mypy", "httpx")Run isort in the nox check session (#379)Jamie Hewlandbefore adoption276ee73
lines 35–37why, one step back35 session.run(36 "isort", "--check", "--diff", "--project=httpx", "--recursive", *source_files37 )Use nox for automation and CI (#128)Seth Michael Larsonbefore adoption80dc3e2
lines 38–49why, one step back383940@nox.session(reuse_venv=True)41def docs(session):42 session.install("mkdocs", "mkdocs-material")4344 session.run("mkdocs", "build")454647@nox.session(python=["3.6", "3.7", "3.8"])48def test(session):49 session.install("-r", "test-requirements.txt")Allow per file running of tests (#287)Jt Miclatbefore adoption1f4b8dd
line 50why, one step back50 session.run("python", "-m", "pytest", *session.posargs)