Return the configuration for a given tox environment (will create if not exist yet). :param item: the name of the environment is :param package: a flag indicating if the environment is of type packaging or not (only used for creation) :param loaders: loaders to use for this
(
self,
item: str,
package: bool = False, # noqa: FBT001, FBT002
loaders: Sequence[Loader[Any]] | None = None,
)
| 176 | return conf_set |
| 177 | |
| 178 | def get_env( |
| 179 | self, |
| 180 | item: str, |
| 181 | package: bool = False, # noqa: FBT001, FBT002 |
| 182 | loaders: Sequence[Loader[Any]] | None = None, |
| 183 | ) -> EnvConfigSet: |
| 184 | """Return the configuration for a given tox environment (will create if not exist yet). |
| 185 | |
| 186 | :param item: the name of the environment is |
| 187 | :param package: a flag indicating if the environment is of type packaging or not (only used for creation) |
| 188 | :param loaders: loaders to use for this configuration (only used for creation) |
| 189 | |
| 190 | :returns: the tox environments config |
| 191 | |
| 192 | """ |
| 193 | if item in self._env_to_conf_set: |
| 194 | return self._env_to_conf_set[item] |
| 195 | section, base_test, base_pkg = self._src.get_tox_env_section(item) |
| 196 | result = self.get_section_config( |
| 197 | section, |
| 198 | base=base_pkg if package else base_test, |
| 199 | of_type=EnvConfigSet, |
| 200 | for_env=item, |
| 201 | loaders=loaders, |
| 202 | ) |
| 203 | self._env_to_conf_set[item] = result |
| 204 | return result |
| 205 | |
| 206 | def clear_env(self, name: str) -> None: |
| 207 | section, _, __ = self._src.get_tox_env_section(name) |