Refactor Python code to functional style #53
Labels
No Label
ANSIBLE
BUG
CODE
DEVELOPMENT
DOCUMENTATION
FEEDBACK
FIX
HOWTOs
IDEA
INFRA
ISSUE
MAILSERVER
TESTS
To-Be-Reviewed
WEB
WEBSITE
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Depends on
#88 Consider using iterators instead of lists and dicts
Disroot/gpg-lacre
Reference: Disroot/gpg-lacre#53
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Separate operations and the data they operate on so we can cover the code with unit tests.
Ideas:
subprocess.Popen
.subprocess.Popen
.More ideas for general refactoring:
is_configuration_complete()
(provided bylacre.config
) would make sense.lacre.notifications
.bytes
orstr
, but not intermix them.General refactoring direction:
if
s are a hint.Another idea is to have as many functions that return some results instead of producing side-effects as possible.
General Lacre flow could be:
Right now everything is mixed, making it so hard to test.