Skip to content

Fix some stray noninclusive terms used in a few files - #1448

Open
mhucka wants to merge 1 commit into
quantumlib:mainfrom
mhucka:language-fixes
Open

Fix some stray noninclusive terms used in a few files#1448
mhucka wants to merge 1 commit into
quantumlib:mainfrom
mhucka:language-fixes

Conversation

@mhucka

@mhucka mhucka commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

This remediates a few occurrences of undesirable terminology in a few files.

This remediates a few occurrences of undesirable terminology in a few
files.
@mhucka
mhucka marked this pull request as ready for review September 1, 2026 18:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'.

Comment thread .pylintrc
# 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_?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant