Bump to 0.4.0
[platform/upstream/python3-hatch_vcs.git] / pyproject.toml
1 [build-system]
2 requires = ["hatchling>=1.1.0"]
3 build-backend = "hatchling.build"
4
5 [project]
6 name = "hatch-vcs"
7 dynamic = ["version"]
8 description = 'Hatch plugin for versioning with your preferred VCS'
9 readme = "README.md"
10 license = { text = "MIT" }
11 requires-python = ">= 3.8"
12 keywords = [
13   "git",
14   "hatch",
15   "mercurial",
16   "plugin",
17   "scm",
18   "vcs",
19   "version",
20 ]
21 authors = [
22   { name = "Ofek Lev", email = "oss@ofek.dev" },
23 ]
24 classifiers = [
25   "Development Status :: 4 - Beta",
26   "Programming Language :: Python",
27   "Programming Language :: Python :: 3.8",
28   "Programming Language :: Python :: 3.9",
29   "Programming Language :: Python :: 3.10",
30   "Programming Language :: Python :: 3.11",
31   "Programming Language :: Python :: 3.12",
32   "Programming Language :: Python :: Implementation :: CPython",
33   "Programming Language :: Python :: Implementation :: PyPy",
34 ]
35 dependencies = [
36   "hatchling>=1.1.0",
37   "setuptools-scm>=6.4.0",
38 ]
39
40 [project.urls]
41 Funding = "https://github.com/sponsors/ofek"
42 History = "https://github.com/ofek/hatch-vcs/blob/master/HISTORY.md"
43 Issues = "https://github.com/ofek/hatch-vcs/issues"
44 Source = "https://github.com/ofek/hatch-vcs"
45
46 [project.entry-points.hatch]
47 vcs = "hatch_vcs.hooks"
48
49 [tool.hatch.version]
50 path = "hatch_vcs/__about__.py"
51
52 [tool.black]
53 target-version = ["py38"]
54 line-length = 120
55 skip-string-normalization = true
56
57 [tool.ruff]
58 target-version = "py38"
59 line-length = 120
60 select = [
61   "A",
62   "B",
63   "C",
64   "E",
65   "F",
66   "FBT",
67   "I",
68   "N",
69   "Q",
70   "RUF",
71   "S",
72   "T",
73   "UP",
74   "W",
75   "YTT",
76 ]
77 ignore = [
78   # Allow non-abstract empty methods in abstract base classes
79   "B027",
80   # Ignore McCabe complexity
81   "C901",
82   # Allow boolean positional values in function calls, like `dict.get(... True)`
83   "FBT003",
84   # Ignore checks for possible passwords
85   "S105", "S106", "S107",
86   # Ignore noisy checks for insecure subprocess calls
87   "S603", "S607",
88   # Boolean default values
89   "FBT002",
90 ]
91
92 [tool.ruff.isort]
93 known-first-party = ["hatch_vcs"]
94
95 [tool.ruff.flake8-quotes]
96 inline-quotes = "single"
97
98 [tool.ruff.flake8-tidy-imports]
99 ban-relative-imports = "all"
100
101 [tool.ruff.per-file-ignores]
102 # Tests can use relative imports and assertions
103 "tests/**/*" = ["TID252", "S101"]
104
105 [tool.mypy]
106 disallow_untyped_defs = false
107 follow_imports = "normal"
108 ignore_missing_imports = true
109 pretty = true
110 show_column_numbers = true
111 show_error_codes = true
112 warn_no_return = false
113 warn_unused_ignores = true
114
115 [tool.coverage.run]
116 source_pkgs = ["hatch_vcs", "tests"]
117 branch = true
118 parallel = true
119 omit = [
120   "hatch_vcs/__about__.py",
121 ]
122
123 [tool.coverage.paths]
124 hatch_vcs = ["hatch_vcs", "*/hatch-vcs/hatch_vcs"]
125 tests = ["tests", "*/hatch-vcs/tests"]
126
127 [tool.coverage.report]
128 exclude_lines = [
129   "no cov",
130   "if __name__ == .__main__.:",
131   "if TYPE_CHECKING:",
132 ]