lp:~epsy/+junk/clize
- Get this branch:
- bzr branch lp:~epsy/+junk/clize
Branch information
- Owner:
- Yann Kaiser
- Status:
- Development
Recent revisions
- 17. By Yann Kaiser
-
Added keyword-only arguments support.
If a keyword-only argument is found, clize will consider all normal arguments positional, and all keyword-only arguments options. Those with defaults are optional while others are required. This indeed makes "required options" possible, and if you do that I hate you. You can force this behaviour by using @clize.kwo instead of @clize. Python 2 compatibility is of course kept, as long as you don't use annotations or keyword-only arguments in your code.
Clize is now also slightly strictier:
* Options that don't take argument will raise an error if given one in the --option=val form.
* Required positional arguments cannot come after optional arguments. It will raise a ValueError now instead of silently making them optional with default value None. - 16. By Yann Kaiser
-
Added an __all__ parameter so that lazy bums who use "from clize import *" don't get their namespace polluted. By the way, don't do this: tools like pyflakes won't be able to report undefined names because of it.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)