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

simplify ruff exclude list #1056

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Conversation

danieleades
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

I am debating about merging this. In one hand it is less lines of code.

However, I had to read ruff's documentation to understand why you used extend-exclude instead of exclude. So I think extending the defaults from ruff is clever but harder to maintain. I will let @mtreinish weight in

@coveralls
Copy link

coveralls commented Jan 17, 2024

Pull Request Test Coverage Report for Build 7563110066

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 95.959%

Totals Coverage Status
Change from base Build 7549921600: 0.04%
Covered Lines: 16030
Relevant Lines: 16705

💛 - Coveralls

@danieleades
Copy link
Contributor Author

I am debating about merging this. In one hand it is less lines of code.

However, I had to read ruff's documentation to understand why you used extend-exclude instead of exclude. So I think extending the defaults from ruff is clever but harder to maintain. I will let @mtreinish weight in

I'm very sympathetic to this argument, i totally see where you're coming from.

That said, I note the following from the ruff docs on the 'exclude' config:

Note that you'll typically want to use extend-exclude to modify the excluded paths.

The items in the default exclude list are super common in the python ecosystem, so i feel that explicitly listing them is unnecessary boilerplate. Using 'extend exclude' instead allows you to document what's different between rustworkx and a 'typical' python library.

@mtreinish
Copy link
Member

Personally I'm fine either way, my preference is along with Ivan's to be explicit in the config on all the paths to exclude because I don't know off the top of my head what ruff is excluding by default (I didn't even realize there were default exclude paths). But at the end of the day were talking about a super minor difference in the configuration and both are doing the right thing.

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

I think it is fine to merge given we don’t change the list much

If ruff breaks us in the future this was the culprit

@IvanIsCoding IvanIsCoding merged commit 0e4ef8b into Qiskit:main Jan 18, 2024
25 checks passed
@danieleades danieleades deleted the ruff-exclude branch January 18, 2024 07:55
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.

5 participants