Skip to content
Myr

noxfile.py

This file

Path

noxfile.py

62 lines · 1.5 KiB · Python

Last changed by

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

History of this file

Take it

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

lines 1–30why, 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")12 session.run(13 "isort",14 "--project=httpx",15 "--multi-line=3",16 "--trailing-comma",17 "--force-grid-wrap=0",18 "--combine-as",19 "--line-width=88",20 "--recursive",21 "--apply",22 *source_files,23 )24 session.run("black", "--target-version=py36", *source_files)2526 check(session)272829@nox.session(reuse_venv=True)30def check(session):

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

lines 31–33why, one step back
31 session.install(
32 "black", "flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"33 )

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

lines 34–62why, one step back
34
35 session.run("black", "--check", "--target-version=py36", *source_files)36 session.run(37 "flake8", "--max-line-length=88", "--ignore=W503,E203,B305", *source_files38 )39 session.run("mypy", "httpx", "--ignore-missing-imports", "--disallow-untyped-defs")404142@nox.session(reuse_venv=True)43def docs(session):44 session.install("mkdocs", "mkdocs-material")4546 session.run("mkdocs", "build")474849@nox.session(python=["3.6", "3.7", "3.8"])50def test(session):51 session.install("-r", "test-requirements.txt")5253 session.run(54 "coverage",55 "run",56 "--omit='*'",57 "-m",58 "pytest",59 "--cov=httpx",60 "--cov=tests",61 "--cov-report=term-missing",62 )