Skip to content

Conversation

Prhmma
Copy link

@Prhmma Prhmma commented Oct 18, 2025

  • Update ruff version in dev-requirements.txt and .pre-commit-config.yaml
  • Add noqa for intentional conditional imports flagged by newer ruff

Description

Updates ruff from 0.6.9 to 0.14.1 to catch newer warnings that are triggered only in newer versions, as requested in the linked issue. The newer ruff version introduced additional PLC0415 warnings for imports that are intentionally placed inside functions/try-except blocks for conditional behaviour.

Added # noqa: PLC0415 to the conditional Django import in docs/examples/django/manage.py since this import is intentionally inside main() with try/except to provide a helpful ImportError when Django is not installed.

Fixes #4780

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Ran tox -e ruff locally to verify ruff linting passes with the new version
  • Verified that pre-commit hooks (ruff check and ruff format) run successfully

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…metry#4780)

- Update ruff version in dev-requirements.txt and .pre-commit-config.yaml
- Add noqa for intentional conditional imports flagged by newer ruff
@Prhmma Prhmma requested a review from a team as a code owner October 18, 2025 13:46
@tammy-baylis-swi
Copy link
Contributor

Thanks for this. Please could you also add a changelog entry.

Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

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

Lgtm, maintainers will also have a look.

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.

bump ruff version

3 participants