-
Notifications
You must be signed in to change notification settings - Fork 191
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
Remove duplicate code #2053
Remove duplicate code #2053
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
if self.component_type == "modules": | ||
installed_components = modules_json.get_all_modules().get(self.modules_repo.remote_url) | ||
installed_components = modules_json.get_all_components(self.component_type).get( | ||
self.modules_repo.remote_url | ||
) | ||
elif self.component_type == "subworkflows": | ||
modules_json.get_installed_subworkflows().get(self.modules_repo.remote_url) | ||
modules_json.get_all_components(self.component_type).get(self.modules_repo.remote_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can delete the if/else now and only use line 84
installed_components = modules_json.get_all_components(self.component_type).get(
self.modules_repo.remote_url
)
Codecov Report
@@ Coverage Diff @@
## dev #2053 +/- ##
==========================================
+ Coverage 67.63% 67.66% +0.03%
==========================================
Files 43 43
Lines 5558 5555 -3
==========================================
Hits 3759 3759
+ Misses 1799 1796 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was duplicated functionality being used which has been superseded by the generalised
ModulesJson.get_all_components
PR checklist
CHANGELOG.md
is updateddocs
is updated