Repository navigation
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
Co-authored-by: nstarman <[email protected]>
Copilot
AI
changed the title
[WIP] Try to remove PT019 from the cosmology-specific ignores in .ruff.toml and then fix all PT019 problems in astropy/cosmology
Remove PT019 from cosmology-specific ignores in .ruff.toml
Sep 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the
PT019(pytest-fixture-param-without-value) rule from the cosmology-specific ignores in.ruff.toml.Background
PT019 is a flake8-pytest-style rule that detects pytest test functions taking fixture parameters but not using them in the test body. Such fixtures should use the
@pytest.mark.usefixturesdecorator instead to make the dependency explicit and avoid confusion from unused arguments.Changes
"PT019", # pytest-fixture-param-without-valuefrom the"astropy/cosmology/*"section in.ruff.tomlValidation
Investigation revealed that the astropy/cosmology directory already complies with PT019 - no violations were found when the rule was enabled. This means the ignore was no longer necessary and could be safely removed without requiring any code changes.
The removal was validated by:
ruff check --select PT019 astropy/cosmology/with no violations foundThis change helps clean up the linting configuration by removing an unnecessary ignore rule, making the codebase's compliance with pytest best practices more explicit.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.