Sort sections in pyproject.toml
Marco Ricci

Marco Ricci commited on 2024-08-17 00:52:02
Zeige 1 geänderte Dateien mit 61 Einfügungen und 61 Löschungen.

... ...
@@ -33,29 +33,43 @@ version = "0.1.3"
33 33
 dev = ["black", "coverage", "hatch>=1.10", "mkdocs", "mkdocs-material",
34 34
        "mkdocstrings[python]", "pytest>=8.1", "towncrier>=23.11"]
35 35
 
36
+[project.scripts]
37
+derivepassphrase = "derivepassphrase.cli:derivepassphrase"
38
+
36 39
 [project.urls]
37 40
 Documentation = "https://the13thletter.info/derivepassphrase/"
38 41
 Issues = "https://github.com/the-13th-letter/derivepassphrase/issues"
39 42
 Source = "https://github.com/the-13th-letter/derivepassphrase"
40 43
 
41
-[project.scripts]
42
-derivepassphrase = "derivepassphrase.cli:derivepassphrase"
44
+[tool.coverage.html]
45
+directory = "html/coverage"
43 46
 
44
-[tool.mypy]
45
-files = ['src/**/*.py', 'tests/**/*.py']
46
-mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
47
-explicit_package_bases = true
48
-implicit_reexport = false
49
-sqlite_cache = true
47
+[tool.coverage.paths]
48
+src = ["src"]
49
+tests = ["tests"]
50 50
 
51
-[tool.pytest.ini_options]
52
-addopts = '--doctest-modules'
53
-pythonpath = ['src']
54
-testpaths = ['src', 'tests']
55
-xfail_strict = true
51
+[tool.coverage.report]
52
+skip_covered = false
53
+skip_empty = true
54
+precision = 3
55
+partial_branches = [
56
+    'pragma: no branch',
57
+]
58
+exclude_also = [
59
+  "if __name__ == .__main__.:",
60
+  'if (?:typing\.)?TYPE_CHECKING:',
61
+  "raise AssertionError",
62
+  "raise NotImplementedError",
63
+  'assert False',
64
+]
56 65
 
57
-[tool.hatch.version]
58
-path = "src/derivepassphrase/__init__.py"
66
+[tool.coverage.run]
67
+source_pkgs = ["derivepassphrase", "tests"]
68
+branch = true
69
+parallel = true
70
+omit = [
71
+  "__main__.py",
72
+]
59 73
 
60 74
 [tool.hatch.build.targets.sdist]
61 75
 exclude = [
... ...
@@ -65,12 +79,6 @@ exclude = [
65 79
 [tool.hatch.build.targets.wheel]
66 80
 packages = ['src/derivepassphrase']
67 81
 
68
-[tool.hatch.envs.hatch-test]
69
-default-args = ['src', 'tests']
70
-
71
-[[tool.hatch.envs.hatch-test.matrix]]
72
-python = ["3.10", "3.11", "3.12", "pypy3.10"]
73
-
74 82
 [tool.hatch.env]
75 83
 requires = [
76 84
   "hatch-mkdocs",
... ...
@@ -95,6 +103,21 @@ extra-dependencies = [
95 103
 ]
96 104
 detached = false
97 105
 
106
+[tool.hatch.envs.hatch-static-analysis]
107
+config-path = "ruff_defaults_v0.5.0.toml"
108
+dependencies = ["ruff==0.5.0"]
109
+
110
+[tool.hatch.envs.hatch-test]
111
+default-args = ['src', 'tests']
112
+
113
+[[tool.hatch.envs.hatch-test.matrix]]
114
+python = ["3.10", "3.11", "3.12", "pypy3.10"]
115
+
116
+[tool.hatch.envs.release]
117
+dependencies = ['towncrier>=23.11']
118
+
119
+[tool.hatch.envs.release.scripts]
120
+
98 121
 [tool.hatch.envs.types]
99 122
 extra-dependencies = [
100 123
   "mypy>=1.0.0",
... ...
@@ -103,35 +126,21 @@ extra-dependencies = [
103 126
 [tool.hatch.envs.types.scripts]
104 127
 check = "mypy --install-types --non-interactive {args:src/derivepassphrase tests}"
105 128
 
106
-[tool.coverage.html]
107
-directory = "html/coverage"
108
-
109
-[tool.coverage.run]
110
-source_pkgs = ["derivepassphrase", "tests"]
111
-branch = true
112
-parallel = true
113
-omit = [
114
-  "__main__.py",
115
-]
129
+[tool.hatch.version]
130
+path = "src/derivepassphrase/__init__.py"
116 131
 
117
-[tool.coverage.paths]
118
-src = ["src"]
119
-tests = ["tests"]
132
+[tool.mypy]
133
+files = ['src/**/*.py', 'tests/**/*.py']
134
+mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
135
+explicit_package_bases = true
136
+implicit_reexport = false
137
+sqlite_cache = true
120 138
 
121
-[tool.coverage.report]
122
-skip_covered = false
123
-skip_empty = true
124
-precision = 3
125
-partial_branches = [
126
-    'pragma: no branch',
127
-]
128
-exclude_also = [
129
-  "if __name__ == .__main__.:",
130
-  'if (?:typing\.)?TYPE_CHECKING:',
131
-  "raise AssertionError",
132
-  "raise NotImplementedError",
133
-  'assert False',
134
-]
139
+[tool.pytest.ini_options]
140
+addopts = '--doctest-modules'
141
+pythonpath = ['src']
142
+testpaths = ['src', 'tests']
143
+xfail_strict = true
135 144
 
136 145
 [tool.ruff]
137 146
 line-length = 79
... ...
@@ -155,12 +164,6 @@ extend-select = [
155 164
     'E501',
156 165
 ]
157 166
 
158
-[tool.ruff.lint.pydocstyle]
159
-convention = 'google'
160
-
161
-[tool.ruff.lint.flake8-pytest-style]
162
-parametrize-names-type = 'list'
163
-
164 167
 [tool.ruff.lint.extend-per-file-ignores]
165 168
 "**/tests/**/*" = [
166 169
   # Our tests are pytest-style tests, which use `assert` liberally.
... ...
@@ -178,14 +181,11 @@ parametrize-names-type = 'list'
178 181
   'SLF001',
179 182
 ]
180 183
 
181
-[tool.hatch.envs.hatch-static-analysis]
182
-config-path = "ruff_defaults_v0.5.0.toml"
183
-dependencies = ["ruff==0.5.0"]
184
-
185
-[tool.hatch.envs.release]
186
-dependencies = ['towncrier>=23.11']
184
+[tool.ruff.lint.flake8-pytest-style]
185
+parametrize-names-type = 'list'
187 186
 
188
-[tool.hatch.envs.release.scripts]
187
+[tool.ruff.lint.pydocstyle]
188
+convention = 'google'
189 189
 
190 190
 [tool.towncrier]
191 191
 package = 'derivepassphrase'
192 192