Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command class functions shouldn't do multiple conflicting things at once, and should delegate to other functions #544

Open
chuck-sys opened this issue Oct 6, 2020 · 0 comments
Labels
theme:refactoring Something needs to be cleaned up or refactored

Comments

@chuck-sys
Copy link
Collaborator

Summary

Command class functions shouldn't do multiple conflicting things at once, and should delegate to other functions.

Requirements

Extract functions out of command class functions that don't do 1 distinct thing (up to the required level of abstraction, of course).

Context

While refactoring some tests, I came across the function in app/controller/command/commands/team.py:552 lead_helper(), which handles both the deletion and the addition of a team lead. While this was acceptable a bit further up the line, where we parse the actual team command (and where it made sense to only have 1 function there), it doesn't make sense to not split this function here.

There are probably a lot more of these types of functions. Functions that got too big for their own good. And now it is time to cut them down.

@chuck-sys chuck-sys added the theme:refactoring Something needs to be cleaned up or refactored label Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:refactoring Something needs to be cleaned up or refactored
Projects
None yet
Development

No branches or pull requests

1 participant