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

Apply ruff 0.6 #1348

Closed
wants to merge 0 commits into from
Closed

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Aug 26, 2024

Exclude docs/notebooks for now, as notebook liniting is a new addition:

Re-enable ruff check, after it had been disabled by #1274.

Not sure how to address this remaining issue:

mriqc/tests/test_parser.py:97:40: PT019 Fixture `_species` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
   |
95 |     ],
96 | )
97 | def test_species_arg(tmp_path, argval, _species):
   |                                        ^^^^^^^^ PT019
98 |     """Check the correct parsing of the species argument."""
99 |     args = MIN_ARGS + ['--species', argval]
   |

@DimitriPapadopoulos
Copy link
Contributor Author

I'm not certain ruff check --diff and run format --diff do what we think they do. I would expect ruff 0.6.2 to print this residual error, but it doesn't:

mriqc/tests/test_parser.py:97:40: PT019 Fixture `_species` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
   |
95 |     ],
96 | )
97 | def test_species_arg(tmp_path, argval, _species):
   |                                        ^^^^^^^^ PT019
98 |     """Check the correct parsing of the species argument."""
99 |     args = MIN_ARGS + ['--species', argval]
   |

@DimitriPapadopoulos
Copy link
Contributor Author

Yep, works much better without --diff! I don't understand why it was added by #1274.

@DimitriPapadopoulos
Copy link
Contributor Author

I don't know enough about fixtures to fix the residual issue PT019.

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