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

@ -179,7 +179,8 @@ class PlaybookCLI(CLI):
else:
return results
def _flush_cache(self, inventory, variable_manager):
@staticmethod
def _flush_cache(inventory, variable_manager):
for host in inventory.list_hosts():
hostname = host.get_name()
variable_manager.clear_facts(hostname)