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
Moving the unsupported-assignment-operation lint rule #12304
Moving the unsupported-assignment-operation lint rule #12304
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 9026416755Details
💛 - Coveralls |
pyproject.toml
Outdated
@@ -213,6 +213,7 @@ disable = [ | |||
"docstring-first-line-empty", # relax docstring style | |||
"import-outside-toplevel", "import-error", # overzealous with our optionals/dynamic packages | |||
"nested-min-max", # this gives false equivalencies if implemented for the current lint version | |||
"unsupported-assignment-operation", # one instance needed for the dragon: qiskit/providers/options.py:232 |
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 put a # pylint: disable=unsupported-assignment-operation
with a comment on the offending line, if it's just one place.
We might even be able to get away with not doing that if we put a manual type hint
class Options(Mapping):
__slots__ = ("_fields", "validator")
_fields: dict[str, Any]
validator: dict[str, Any]
in the class body - with any luck, that should get pylint to infer the proper types of those fields, even though it can't reason about the super().__setattr__
stuff we do.
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.
the typing was unfortunately insufficient to convince the linter. updates for the single line were added
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.
Ah, that's a shame. The skip is fine, though - it's not uncommon to have very specific lines of code where it makes sense to disable one particular linter rule, which is why the skip syntax is there.
# Conflicts: # pyproject.toml
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!
Summary
#9614 Moving up and comment
unsupported-assignment-operation
Details and comments
This looks like it should be fixed if/when it gets updated.