drytoml.app.wrappers module¶
Third-party commands enabled through drytoml.
-
class
drytoml.app.wrappers.
Cli
(configs: List[str])¶ Bases:
drytoml.app.wrappers.Wrapper
Call another script, configuring it with specific cli flag.
-
cfg
: str¶
-
pre_call
() → None¶ Prepare sys.argv to contain the configuration flag and file.
-
virtual
: IO[str]¶
-
-
class
drytoml.app.wrappers.
Env
(env: Union[str, List[str]])¶ Bases:
drytoml.app.wrappers.Wrapper
Call another script, configuring it with an environment variable.
-
cfg
: str¶
-
pre_import
()¶ Configure env var before callback import.
-
virtual
: IO[str]¶
-
-
class
drytoml.app.wrappers.
Wrapper
¶ Bases:
object
Common skeleton for third-party wrapper commands.
-
cfg
: str¶
-
pre_call
()¶ Execute custom processing done before callback execut.
-
pre_import
()¶ Execute custom processing done before callback import.
-
tmp_dump
()¶ Yield a temporary file with the configuration toml contents.
- Yields
Temporary file with the configuration toml contents
-
virtual
: IO[str]¶
-
-
drytoml.app.wrappers.
black
()¶ Execute black, configured with custom setting cli flag.
-
drytoml.app.wrappers.
check
()¶ Execute all formatters and linters, sequentially.
-
drytoml.app.wrappers.
flake8helled
()¶ Execute flake8helled, configured with custom env var.
-
drytoml.app.wrappers.
flakehell
()¶ Execute flakehell, configured with custom env var.
-
drytoml.app.wrappers.
import_callable
(string: str) → Callable¶ Import a module from a string using colon syntax.
- Parameters
string – String of the form package.module:object
- Returns
The imported module
-
drytoml.app.wrappers.
isort
()¶ Execute isort, configured with custom setting cli flag.
-
drytoml.app.wrappers.
pylint
()¶ Execute pylint, configured with custom setting cli flag.