CLI¶
lint¶
-
deal._cli._lint.LintCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Run linter against the given files.
python3 -m deal lint project/
Options:
--json: output violations as json per line.--nocolor: output violations in human-friendly format but without colors. Useful for running linter on CI.
Exit code is equal to the found violations count. See linter documentation for more details.
decorate¶
-
deal._cli._decorate.DecorateCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Add decorators to your code.
python3 -m deal decorate project/
Options:
--types: types of decorators to apply. All are enabled by default.--double-quotes: use double quotes. Single quotes are used by default.--nocolor: do not use colors in the console output.
The exit code is always 0. If you want to test the code for missed decorators, use the
lintcommand instead.
test¶
-
deal._cli._test.TestCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Generate and run tests against pure functions.
python3 -m deal test project/
Function must be decorated by one of the following to be run:
@deal.pure@deal.has()(without arguments)
Options:
--count: how many input values combinations should be checked.
Exit code is equal to count of failed test cases. See tests documentation for more details.
memtest¶
-
deal._cli._memtest.MemtestCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Generate and run tests against pure functions and report memory leaks.
python3 -m deal memtest project/
Function must be decorated by one of the following to be run:
@deal.pure@deal.has()(without arguments)
Options:
--count: how many input values combinations should be checked.
Exit code is equal to count of leaked functions. See memory leaks documentation for more details.
stub¶
-
deal._cli._stub.StubCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Generate stub files for the given Python files.
python3 -m deal stub project/
Options:
--iterations: how many time run stub generation against files. Every new iteration uses results from the previous ones, improving the result. Default: 1.
Exit code is 0. See stubs documentation for more details.
prove¶
-
deal._cli._prove.ProveCommand(stream: TextIO, root: pathlib.Path) → None[source]¶ Verify correctness of code.
python3 -m deal prove project/
Options:
--skipped: show skipped functions.--nocolor: disable colored output.
Exit code is equal to the failed theorems count. See Formal Verification documentation for more information.