We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f4019b4 + 5cc20af commit 0dbec58Copy full SHA for 0dbec58
README.md
@@ -47,9 +47,9 @@ my-tool --input_file /path/to/file.txt --max_records 1234
47
48
This requires two components.
49
50
-- Create Pydantic Data Model of type `T`
51
-- write a function that takes an instance of `T` and returns the exit code (e.g., 0 for success, non-zero for failure).
52
-- pass the `T` into to the `to_runner` function, or the `run_and_exit`
+- Create Pydantic Data Model `T` by extending `Cmd`
+- Add a method `def run(self) -> None`. This should raise an exception on error, or return `None` on success.
+- pass the *class* `T` into to the `to_runner` function, or the `run_and_exit`
53
54
Explicit example show below.
55
0 commit comments