From: Humberto Rocha Date: Tue, 13 Aug 2019 21:27:00 +0000 (-0300) Subject: Move all tooling configuration to setup.cfg (#204) X-Git-Tag: 0.7.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e51b2125c913038ce2a39ab5e5ebbc713a5ae27a;p=thirdparty%2Fhttpx.git Move all tooling configuration to setup.cfg (#204) --- diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index 83cfd951..00000000 --- a/.isort.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[settings] -known_first_party = httpx -known_third_party = brotli,certifi,chardet,cryptography,h11,h2,hstspreload,nox,pytest,rfc3986,setuptools,trustme,uvicorn diff --git a/noxfile.py b/noxfile.py index d7246a90..bd74a2b2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -9,18 +9,7 @@ def lint(session): session.run("autoflake", "--in-place", "--recursive", *source_files) session.run("seed-isort-config", "--application-directories=httpx") - session.run( - "isort", - "--project=httpx", - "--multi-line=3", - "--trailing-comma", - "--force-grid-wrap=0", - "--combine-as", - "--line-width=88", - "--recursive", - "--apply", - *source_files, - ) + session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files) session.run("black", "--target-version=py36", *source_files) check(session) @@ -33,10 +22,8 @@ def check(session): ) session.run("black", "--check", "--target-version=py36", *source_files) - session.run( - "flake8", "--max-line-length=88", "--ignore=W503,E203,B305", *source_files - ) - session.run("mypy", "httpx", "--ignore-missing-imports", "--disallow-untyped-defs") + session.run("flake8", *source_files) + session.run("mypy", "httpx") @nox.session(reuse_venv=True) @@ -50,13 +37,4 @@ def docs(session): def test(session): session.install("-r", "test-requirements.txt") - session.run( - "coverage", - "run", - "--omit='*'", - "-m", - "pytest", - "--cov=httpx", - "--cov=tests", - "--cov-report=term-missing", - ) + session.run("python", "-m", "pytest") diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..3077d460 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,19 @@ +[flake8] +ignore = W503, E203, B305 +max-line-length = 88 + +[mypy] +disallow_untyped_defs = True +ignore_missing_imports = True + +[tool:isort] +combine_as_imports = True +force_grid_wrap = 0 +include_trailing_comma = True +known_first_party = httpx +known_third_party = brotli,certifi,chardet,cryptography,h11,h2,hstspreload,nox,pytest,rfc3986,setuptools,trustme,uvicorn +line_length = 88 +multi_line_output = 3 + +[tool:pytest] +addopts = --cov=httpx --cov=tests --cov-report=term-missing