♻️ Refactor CLI print functions #575
Labels
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
Issues for the Hacktoberfest
help wanted
Extra attention is needed
Is there an existing issue for this?
Suggestion
The CLI includes some printing function that are currently in a base step but could be isolated completely to a set of printer functions.
https://github.com/microsoft/electionguard-python/blob/8aa589c9744bdf52e1e2659e2f83c255ffc65441/src/electionguard_cli/e2e_steps/e2e_step_base.py#L5
https://github.com/microsoft/electionguard-python/blob/main/src/electionguard_cli/e2e_steps/print_results_step.py
Possible Implementation
A simpler implementation that is a bit more pythonic is shifting to make a printer module for the CLI. This could include some standard color coding for different sections. That could be changed.
The base step can be removed and instead methods can just be imported directly as they are used. The name
printer_tools
is just an example.from electionguard_cli.printer_tools import print_header
Anything else?
No response
The text was updated successfully, but these errors were encountered: