Skip to content
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

Merged

Conversation

joesho112358
Copy link
Contributor

Summary

#9614 Moving up and comment unsupported-assignment-operation

Details and comments

This looks like it should be fixed if/when it gets updated.

@joesho112358 joesho112358 requested a review from a team as a code owner April 29, 2024 15:37
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 29, 2024
@qiskit-bot
Copy link
Collaborator

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:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Apr 29, 2024

Pull Request Test Coverage Report for Build 9026416755

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 31 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 89.611%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 7 91.86%
crates/qasm2/src/parse.rs 24 96.23%
Totals Coverage Status
Change from base Build 9023909750: -0.04%
Covered Lines: 62187
Relevant Lines: 69397

💛 - 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
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@joesho112358 joesho112358 requested a review from jyu00 as a code owner May 10, 2024 02:33
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks!

@jakelishman jakelishman added this pull request to the merge queue May 10, 2024
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels May 10, 2024
Merged via the queue into Qiskit:main with commit 5fd7d01 May 10, 2024
15 checks passed
@joesho112358 joesho112358 deleted the move-unsupported-assignment-operation branch May 10, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo type: qa Issues and PRs that relate to testing and code quality
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants