]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Move all tooling configuration to setup.cfg (#204)
authorHumberto Rocha <humrochagf@gmail.com>
Tue, 13 Aug 2019 21:27:00 +0000 (18:27 -0300)
committerSeth Michael Larson <sethmichaellarson@gmail.com>
Tue, 13 Aug 2019 21:27:00 +0000 (16:27 -0500)
.isort.cfg [deleted file]
noxfile.py
setup.cfg [new file with mode: 0644]

diff --git a/.isort.cfg b/.isort.cfg
deleted file mode 100644 (file)
index 83cfd95..0000000
+++ /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
index d7246a902fffedb3097860678d0ff6865c73b2da..bd74a2b25ae203fff99017bd0cdb8bb616753b31 100644 (file)
@@ -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 (file)
index 0000000..3077d46
--- /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