Cleanups and fixes to cli

* Mark methods which are really functions as staticmethod
* Fix calls to other staticmethods to use the subclass rather than the
  base class so that any inheritance overriding will be honored.
* Remove unnecessary logic and dead code
* Fix a typo in a docstring of how to implement subclass init_parser()
  methods
* Call superclass's post_process_args in ansible-doc
* Fix copyright comment according to suggested practice
This commit is contained in:
Toshio Kuratomi 2018-12-19 20:45:47 -08:00
parent 7e92ff823e
commit ed8e60d804
9 changed files with 126 additions and 101 deletions

View file

@ -258,7 +258,8 @@ class VaultCLI(CLI):
if sys.stdout.isatty():
display.display("Encryption successful", stderr=True)
def format_ciphertext_yaml(self, b_ciphertext, indent=None, name=None):
@staticmethod
def format_ciphertext_yaml(b_ciphertext, indent=None, name=None):
indent = indent or 10
block_format_var_name = ""