Skip to content

Commit

Permalink
Enhance the documentation of the inmanta module build command. (PR #…
Browse files Browse the repository at this point in the history
…3146)

# Description

I noticed that the documentation of the `inmanta module build` command could be improved, by adding the default values. This PR fixes that.

# Self Check:

- [ ] ~~Attached issue to pull request~~
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation

# Reviewer Checklist:

- [ ] Sufficient test cases (reproduces the bug/tests the requested feature)
- [ ] Code is clear and sufficiently documented
- [ ] Correct, in line with design
  • Loading branch information
inmantaci committed Aug 2, 2021
1 parent 3fb3b73 commit e612752
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelogs/unreleased/enhance-build-command-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
description: Enhance the documentation of the `inmanta module build` command.
change-type: patch
destination-branches: [master]
8 changes: 6 additions & 2 deletions src/inmanta/moduletool.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,15 @@ def modules_parser_config(cls, parser: ArgumentParser):
build = subparser.add_parser("build", help="Build a Python package from a V2 module.")
build.add_argument(
"path",
help="The path to the module that should be built",
help="The path to the module that should be built. By default, the current working directory is used.",
nargs="?",
)
build.add_argument(
"-o", "--output-dir", help="The directory where the Python package will be stored.", default=None, dest="output_dir"
"-o",
"--output-dir",
help="The directory where the Python package will be stored. Default: <module_root>/dist",
default=None,
dest="output_dir",
)

def build(self, path: Optional[str] = None, output_dir: Optional[str] = None) -> str:
Expand Down

0 comments on commit e612752

Please sign in to comment.