formelsammlung.env_exe_runner module¶
-
formelsammlung.env_exe_runner.env_exe_runner(venv_runner, envs, tool, tool_args=None)[source]¶ Call given
toolfrom given tox or nox or virtual env considering OS.- Parameters
venv_runner (
List[str]) – List containing: ‘nox’ and/or ‘tox’ and/or one or more ‘virtual environment’senvs (
List[str]) – List of environments to search thetoolin when ‘tox’ or ‘nox’ is in venv_runner. If neither ‘tox’ nor ‘nox’ is invenv_runneryou may pass an empty list.tool (
str) – Name of the executable to run.tool_args (
Optional[List[str]]) – Arguments to give to thetool.
- Return type
- Returns
Exit code 127 if no executable is found or the exit code of the called cmd.
-
formelsammlung.env_exe_runner.cli_caller()[source]¶ Warp
env_exe_runnerto be callable by cli.Script to call executables in tox/nox/virtual envs considering OS.
The script takes three mandatory arguments:
A string with comma separated runner (tox and/or nox) and/or virtual envs.
A string with comma separated tox/nox envs to check for the executable. The envs are checked in given order. If tox/nox are not part of the first arg you may pass a ‘-‘ as second arg.
The executable to call like e.g. pylint.
All other arguments after are passed to the tool on call.
- Return type
- Returns
Exit code from
env_exe_runner