Skip to content

Cleanup duplication in handle_include_easyblocks_from#5194

Open
Flamefire wants to merge 1 commit into
easybuilders:developfrom
Flamefire:cleanup-handle_include_easyblocks_from
Open

Cleanup duplication in handle_include_easyblocks_from#5194
Flamefire wants to merge 1 commit into
easybuilders:developfrom
Flamefire:cleanup-handle_include_easyblocks_from

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

Seen the linter warning that included_easyblocks may be used before assignment in the check_included_multiple function.
So ensure included_easyblocks is defined before the function.

Also the whole logging and checking code is duplicated in each branch (for the CLI options),
so move the logging from each option branch to a common function.
This can use the function that checks for duplicates as both are just logging the inclusion (the warning is also just a "log")
This makes the whole handling uniform:

  • Extract filenames
  • Report multiple inclusions
  • Report inclusion

Move the logging from each option branch to a common function.
Ensure `included_easyblocks` is defined before the function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants