Skip to content

Commit

Permalink
Clean up a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberrumor committed Oct 31, 2023
1 parent 8566cc5 commit be80bff
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions ammo/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,16 @@ def __str__(self) -> str:

class UI:
"""
The UI class stores a controller. On UI init, it will map all currently
defined public methods of the controller to a dictionary of commands.
It then presents a CLI interface, offering default commands for 'exit'
and 'help'. The help menu is generated automatically via inspecting
type hints of the controller's public methods, and is presented in
a typical POSIX usage format.
Expose public methods of whatever class (derived from Controller)
you provide as an argument as commands in an interactive CLI.
"""

def __init__(self, controller: Controller):
"""
On UI init, map all presently defined public methods of the controller
into a dictionary of commands.
"""
self.controller = controller

# get a map of commands to functions and the amount of args they expect
self.command = {}

# Default 'help', may be overridden.
Expand Down

0 comments on commit be80bff

Please sign in to comment.