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

Removing nested-min-max from lint exclusions and updates #12295

Closed

Conversation

joesho112358
Copy link
Contributor

Summary

#9614 test for removing nested-min-max

Details and comments

Flattening nested max's

@joesho112358 joesho112358 requested review from a team as code owners April 24, 2024 03:16
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 24, 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
  • @ajavadia
  • @levbishop
  • @t-imamichi

@joesho112358 joesho112358 marked this pull request as draft April 24, 2024 03:38
size = max(max(layout_mapping), max(layout_mapping.values()))
size = max(layout_mapping, layout_mapping.values())
Copy link
Member

Choose a reason for hiding this comment

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

These don't quite mean the same thing - max in one-argument form consumes the iterable and with two-or-more arguments it returns the max argument without iterating any individual argument.

If pylint is suggesting this, it's a bug, because they're not the same thing. (If it is a bug, there's a good chance it's fixed on pylint main - we're not using the newest version.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Righto! Looks like this will need to be closed and the nested-min-max should be moved up to permanent with a note. I can do that later on. Thanks for the look!

@joesho112358
Copy link
Contributor Author

This looks to be necessary and will need a new PR for commenting why nested-min-max is needed.

@joesho112358 joesho112358 deleted the remove-nested-min-max-lint-rule branch April 25, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PR PRs from contributors that are not 'members' of the Qiskit repo
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants