summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames R. Barlow <james@purplerock.ca>2021-08-17 01:33:02 -0700
committerJames R. Barlow <james@purplerock.ca>2021-08-17 01:33:02 -0700
commit9dfe60d75bf7e9ea547b0596edd16db685c14da2 (patch)
treea6bb14e64b7c74221770081a8cecd72a388dda96
parent0bd6795babe2122396a46bb89eef5071857597d3 (diff)
Move our tool settings into pyproject
-rw-r--r--pyproject.toml42
-rw-r--r--setup.cfg36
2 files changed, 43 insertions, 35 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 49b7a7c..495b283 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -66,3 +66,45 @@ before-all = "brew install qpdf"
# or PyPy3 doesn't work on Windows 64-bit, one or the other
# PyPy+Win32 seems like a very low priority combination
skip = "pp3* cp310-*"
+
+[tool.mypy]
+
+[[tool.mypy.overrides]]
+module = [
+ 'PIL',
+ 'PIL.TiffTags',
+ 'lxml.etree'
+]
+ignore_missing_imports = true
+
+[tool.pytest.ini_options]
+minversion = "6.0"
+norecursedirs = ["lib", ".pc", ".git", "venv"]
+testpaths = ["tests"]
+addopts = "-n auto"
+
+[tool.coverage.run]
+concurrency = ["multiprocessing"]
+
+[tool.coverage.report]
+# Regexes for lines to exclude from consideration
+exclude_lines = [
+ # Have to re-enable the standard pragma
+ "pragma: no cover",
+
+ # Don't complain if tests don't hit defensive assertion code:
+ "raise AssertionError",
+ "raise NotImplementedError",
+
+ # Don't complain if non-runnable code isn't run:
+ "if 0:",
+ "if __name__ == .__main__.:",
+]
+
+[tool.coverage.html]
+directory = "coverage/pycov"
+
+[tool.isort]
+profile = "black"
+known_first_party = ["pikepdf"]
+known_third_party = ["PIL","conftest","hypothesis","lxml","pkg_resources","psutil","pytest","setuptools"]
diff --git a/setup.cfg b/setup.cfg
index 875845c..68aadae 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -64,6 +64,7 @@ docs =
toml
test =
attrs >= 20.2.0
+ coverage[toml]
hypothesis >= 5, < 7
Pillow >= 7, < 9
psutil >= 5, < 6
@@ -79,38 +80,3 @@ test =
[aliases]
test=pytest
-
-[tool:pytest]
-norecursedirs = lib .pc .git venv
-testpaths = tests
-addopts =
- -n auto
-
-[coverage:run]
-concurrency = multiprocessing
-
-[coverage:report]
-# Regexes for lines to exclude from consideration
-exclude_lines =
- # Have to re-enable the standard pragma
- pragma: no cover
-
- # Don't complain if tests don't hit defensive assertion code:
- raise AssertionError
- raise NotImplementedError
-
- # Don't complain if non-runnable code isn't run:
- if 0:
- if __name__ == .__main__.:
-
-[coverage:html]
-directory = coverage/pycov
-
-[isort]
-multi_line_output=3
-include_trailing_comma=True
-force_grid_wrap=0
-use_parentheses=True
-line_length=88
-known_first_party = pikepdf
-known_third_party = PIL,conftest,hypothesis,lxml,pkg_resources,psutil,pytest,setuptools