]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Move configuration of tools to pyproject.toml (#2686)
authorBartosz Sokorski <b.sokorski@gmail.com>
Wed, 3 May 2023 13:13:40 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2023 13:13:40 +0000 (14:13 +0100)
Co-authored-by: Tom Christie <tom@tomchristie.com>
pyproject.toml
requirements.txt
setup.cfg [deleted file]

index d74fe7bf96f5463acc3789ea5f3963ab61f9b96b..d5313c64cf6563f28e7cfc8ad5d9c995ccab0f37 100644 (file)
@@ -99,3 +99,29 @@ line-length = 120
 
 [tool.ruff.isort]
 combine-as-imports = true
+
+[tool.mypy]
+ignore_missing_imports = true
+strict = true
+
+[[tool.mypy.overrides]]
+module = "tests.*"
+disallow_untyped_defs = false
+check_untyped_defs = true
+
+[tool.pytest.ini_options]
+addopts = "-rxXs"
+filterwarnings = [
+  "error",
+  "ignore: You seem to already have a custom sys.excepthook handler installed. I'll skip installing Trio's custom handler, but this means MultiErrors will not show full tracebacks.:RuntimeWarning",
+  # See: https://github.com/agronholm/anyio/issues/508
+  "ignore: trio.MultiError is deprecated since Trio 0.22.0:trio.TrioDeprecationWarning"
+]
+markers = [
+  "copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup",
+  "network: marks tests which require network connection. Used in 3rd-party build environments that have network disabled."
+]
+
+[tool.coverage.run]
+omit = ["venv/*", "httpx/_compat.py"]
+include = ["httpx/*", "tests/*"]
index b2ac31891f4b17942c4ffebeaccd53a8a205f6b1..840ecd0cf28257d13026a07ccf0af00e56ecd52c 100644 (file)
@@ -20,7 +20,7 @@ twine==4.0.2
 
 # Tests & Linting
 black==23.3.0
-coverage==7.2.2
+coverage[toml]==7.2.2
 cryptography==40.0.2
 mypy==1.0.1
 types-certifi==2021.10.8.2
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644 (file)
index 728160b..0000000
--- a/setup.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-[mypy]
-ignore_missing_imports = True
-strict = True
-
-[mypy-tests.*]
-disallow_untyped_defs = False
-check_untyped_defs = True
-
-[tool:pytest]
-addopts = -rxXs
-filterwarnings =
-  error
-  ignore: You seem to already have a custom sys.excepthook handler installed. I'll skip installing Trio's custom handler, but this means MultiErrors will not show full tracebacks.:RuntimeWarning
-  # See: https://github.com/agronholm/anyio/issues/508
-  ignore: trio\.MultiError is deprecated since Trio 0\.22\.0:trio.TrioDeprecationWarning
-markers =
-  copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup
-  network: marks tests which require network connection. Used in 3rd-party build environments that have network disabled.
-
-[coverage:run]
-omit = venv/*, httpx/_compat.py
-include = httpx/*, tests/*