orig_checks = list(
check for check in orig_checks if not fnmatch(check, name_with_prefix)
)
# remove check when check=-google-runtime-references to_=-google-* (simplification)
orig_checks = list(
check for check in orig_checks if not fnmatch(check, name_without_prefix)
)
I can't quite figure it out entirely, but this looks like both branches do the same thing:
new_check
without the leading-
new_check
with the leading-
.If so, the lines of code could be reduced by introducing:
and then use
_Originally posted by @1uc in https://github.com/BlueBrain/hpc-coding-conventions/pull/123#discussion_r865619598_