Conversation
guyzmo
left a comment
There was a problem hiding this comment.
That's a super great thing you've done, that might help in debugging issues related to changes in the dependencies.
Though I got a few design comments!
| def cli(): # pragma: no cover | ||
| try: | ||
| sys.exit(main(docopt(__doc__.format(self=sys.argv[0].split(os.path.sep)[-1], version=__version__)))) | ||
| sys.exit(main(docopt(__doc__.format(self=sys.argv[0].split(os.path.sep)[-1], version=__version__), |
There was a problem hiding this comment.
the --help version should also contain --version
| return 2 | ||
|
|
||
|
|
||
| class Version: |
There was a problem hiding this comment.
This should be moved to either:
- the tools module if left as is ;
- the kwargparse module if integrated to the kwargparse/dispatcher system
- its own new module otherwise (i.e.: as a new independant module)
| import os, json, platform | ||
|
|
||
|
|
||
| SERVICE_PACKAGE = pybitbucket |
There was a problem hiding this comment.
I don't really like that pattern, it feels a bit redundant with the register target decorator. What I'd rather do is either make a new decorator that manages version, or add an argument to register_target with the version string.
There was a problem hiding this comment.
the other better side of that is that you don't need the full loading of the module into the main system, and if a module has a version string that's not standard (i.e. not using __version__ we're good for that.
No description provided.