aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-10 02:42:23 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-10 02:42:23 -0500
commita172acf0b81a9a1027f1b28cfae5b2ba4f5a32c6 (patch)
treeff483492260ba5584524a7bd53141cf39c81c5b4 /pyproject.toml
parentlddtree: raise min version to Python 3.8 (diff)
downloadpax-utils-a172acf0b81a9a1027f1b28cfae5b2ba4f5a32c6.tar.gz
pax-utils-a172acf0b81a9a1027f1b28cfae5b2ba4f5a32c6.tar.bz2
pax-utils-a172acf0b81a9a1027f1b28cfae5b2ba4f5a32c6.zip
pyproject.toml: add black & isort & mypy settings
This should help stabilize the tool behavior for different developers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml42
1 files changed, 42 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..ab0fde0
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,42 @@
+# Copyright 2024 Gentoo Foundation
+# Copyright 2024 Mike Frysinger <vapier@gentoo.org>
+# Copyright 2024 The ChromiumOS Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
+
+
+# https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html
+[tool.black]
+line-length = 88
+target-version = ["py38"]
+
+
+# https://pycqa.github.io/isort/docs/configuration/options
+[tool.isort]
+py_version = "38"
+
+# Be compatible with `black` since it also matches what we want.
+profile = "black"
+
+line_length = 88
+length_sort = false
+force_single_line = true
+lines_after_imports = 2
+from_first = false
+case_sensitive = false
+force_sort_within_sections = true
+order_by_type = false
+
+# Allow importing multiple classes on a single line from these modules.
+# https://google.github.io/styleguide/pyguide#s2.2-imports
+single_line_exclusions = [
+ "abc",
+ "collections.abc",
+ "typing",
+]
+
+
+# https://mypy.readthedocs.io/en/stable/config_file.html
+[tool.mypy]
+python_version = "3.8"