Undo single-child hatch environment inheritance
Marco Ricci

Marco Ricci commited on 2024-08-24 14:45:41
Zeige 1 geänderte Dateien mit 1 Einfügungen und 8 Löschungen.


The "types" and "hatch-static-analysis" hatch environments, which were
supposed to both inherit from a common base environment, behave somewhat
differently: the former needs dependent packages installed (so
`extra-dependencies = [..., "pytest", ...]`, `skip-install = false` and
perhaps even `features = [...]`), while the latter doesn't
(`skip-install = true`, `extra-dependencies` and `features` are empty).
Of course, neither tool needs the other installed either.  As such,
there is very little content left for an actual common base environment.
So, fold all settings from the base environment into the "types"
environment, and remove the base environment and the inheritance.
... ...
@@ -95,13 +95,6 @@ requires = [
95 95
 [tool.hatch.env.collectors.mkdocs.docs]
96 96
 path = "mkdocs.yml"
97 97
 
98
-[tool.hatch.envs.default-test]
99
-dependencies = [
100
-  "coverage[toml] ~= 7.5",
101
-  "pytest ~= 8.1",
102
-  "pytest-randomly ~= 3.15",
103
-]
104
-
105 98
 [tool.hatch.envs.docs]
106 99
 extra-dependencies = [
107 100
   # Our documentation uses the Material theme.  It also uses
... ...
@@ -140,8 +133,8 @@ extra-dependencies = [
140 133
 [tool.hatch.envs.types]
141 134
 extra-dependencies = [
142 135
   "mypy ~= 1.0",
136
+  "pytest ~= 8.1",
143 137
 ]
144
-template = "default-test"
145 138
 
146 139
 [tool.hatch.envs.types.scripts]
147 140
 check = "mypy --install-types --non-interactive {args:src/derivepassphrase tests}"
148 141