Fix some stray noninclusive terms used in a few files - #1448
Conversation
This remediates a few occurrences of undesirable terminology in a few files.
There was a problem hiding this comment.
Code Review
This pull request makes minor configuration and refactoring updates, including restricting direct commits to the 'main' branch in pre-commit, updating the dummy variables regex in Pylint, correcting a comment in conftest.py, and renaming a helper function in binary_code.py. The review feedback highlights an issue with the new Pylint dummy variables regex pattern, which is unanchored and could inadvertently suppress unused variable warnings for active variables starting with 'placeholder'.
| # A regular expression matching the name of placeholder variables (i.e. expected to | ||
| # not be used). | ||
| dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ | ||
| dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|^ignored_|^unused_|^placeholder_? |
There was a problem hiding this comment.
The regular expression pattern ^placeholder_? is unanchored at the end, which means it will match any variable name starting with placeholder (such as placeholders, placeholder_values, or placeholder_map). This can cause Pylint to silently ignore unused variable warnings for actual, active variables that happen to start with this prefix.\n\nTo prevent this, the pattern should be anchored to match only the exact word placeholder (or explicitly placeholder_ if intended as a prefix for unused variables).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|^ignored_|^unused_|^placeholder$
This remediates a few occurrences of undesirable terminology in a few files.