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

Bump ruff from 0.9.10 to 0.10.0 #397

Merged
merged 1 commit into from
Mar 14, 2025
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 14, 2025

Bumps ruff from 0.9.10 to 0.10.0.

Release notes

Sourced from ruff's releases.

0.10.0

Release Notes

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Changes to how the Python version is inferred when a target-version is not specified (#16319)

    In previous versions of Ruff, you could specify your Python version with:

    • The target-version option in a ruff.toml file or the [tool.ruff] section of a pyproject.toml file.
    • The project.requires-python field in a pyproject.toml file with a [tool.ruff] section.

    These options worked well in most cases, and are still recommended for fine control of the Python version. However, because of the way Ruff discovers config files, pyproject.toml files without a [tool.ruff] section would be ignored, including the requires-python setting. Ruff would then use the default Python version (3.9 as of this writing) instead, which is surprising when you've attempted to request another version.

    In v0.10, config discovery has been updated to address this issue:

    • If Ruff finds a ruff.toml file without a target-version, it will check for a pyproject.toml file in the same directory and respect its requires-python version, even if it does not contain a [tool.ruff] section.
    • If Ruff finds a user-level configuration, the requires-python field of the closest pyproject.toml in a parent directory will take precedence.
    • If there is no config file (ruff.tomlor pyproject.toml with a [tool.ruff] section) in the directory of the file being checked, Ruff will search for the closest pyproject.toml in the parent directories and use its requires-python setting.
  • Updated TYPE_CHECKING behavior (#16669)

    Previously, Ruff only recognized typechecking blocks that tested the typing.TYPE_CHECKING symbol. Now, Ruff recognizes any local variable named TYPE_CHECKING. This release also removes support for the legacy if 0: and if False: typechecking checks. Use a local TYPE_CHECKING variable instead.

  • More robust noqa parsing (#16483)

    The syntax for both file-level and in-line suppression comments has been unified and made more robust to certain errors. In most cases, this will result in more suppression comments being read by Ruff, but there are a few instances where previously read comments will now log an error to the user instead. Please refer to the documentation on Error suppression for the full specification.

  • Avoid unnecessary parentheses around with statements with a single context manager and a trailing comment (#14005)

    This change fixes a bug in the formatter where it introduced unnecessary parentheses around with statements with a single context manager and a trailing comment. This change may result in a change in formatting for some users.

  • Bump alpine default tag to 3.21 for derived Docker images (#16456)

    Alpine 3.21 was released in Dec 2024 and is used in the official Alpine-based Python images. Now the ruff:alpine image will use 3.21 instead of 3.20 and ruff:alpine3.20 will no longer be updated.

Deprecated Rules

The following rules have been deprecated:

... (truncated)

Changelog

Sourced from ruff's changelog.

0.10.0

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Changes to how the Python version is inferred when a target-version is not specified (#16319)

    In previous versions of Ruff, you could specify your Python version with:

    • The target-version option in a ruff.toml file or the [tool.ruff] section of a pyproject.toml file.
    • The project.requires-python field in a pyproject.toml file with a [tool.ruff] section.

    These options worked well in most cases, and are still recommended for fine control of the Python version. However, because of the way Ruff discovers config files, pyproject.toml files without a [tool.ruff] section would be ignored, including the requires-python setting. Ruff would then use the default Python version (3.9 as of this writing) instead, which is surprising when you've attempted to request another version.

    In v0.10, config discovery has been updated to address this issue:

    • If Ruff finds a ruff.toml file without a target-version, it will check for a pyproject.toml file in the same directory and respect its requires-python version, even if it does not contain a [tool.ruff] section.
    • If Ruff finds a user-level configuration, the requires-python field of the closest pyproject.toml in a parent directory will take precedence.
    • If there is no config file (ruff.tomlor pyproject.toml with a [tool.ruff] section) in the directory of the file being checked, Ruff will search for the closest pyproject.toml in the parent directories and use its requires-python setting.
  • Updated TYPE_CHECKING behavior (#16669)

    Previously, Ruff only recognized typechecking blocks that tested the typing.TYPE_CHECKING symbol. Now, Ruff recognizes any local variable named TYPE_CHECKING. This release also removes support for the legacy if 0: and if False: typechecking checks. Use a local TYPE_CHECKING variable instead.

  • More robust noqa parsing (#16483)

    The syntax for both file-level and in-line suppression comments has been unified and made more robust to certain errors. In most cases, this will result in more suppression comments being read by Ruff, but there are a few instances where previously read comments will now log an error to the user instead. Please refer to the documentation on Error suppression for the full specification.

  • Avoid unnecessary parentheses around with statements with a single context manager and a trailing comment (#14005)

    This change fixes a bug in the formatter where it introduced unnecessary parentheses around with statements with a single context manager and a trailing comment. This change may result in a change in formatting for some users.

  • Bump alpine default tag to 3.21 for derived Docker images (#16456)

    Alpine 3.21 was released in Dec 2024 and is used in the official Alpine-based Python images. Now the ruff:alpine image will use 3.21 instead of 3.20 and ruff:alpine3.20 will no longer be updated.

Deprecated Rules

The following rules have been deprecated:

... (truncated)

Commits
  • 27e9d1f Ruff v0.10 Release (#16708)
  • acf35c5 Add new noqa specification to the docs (#16703)
  • b9b2562 describe requires-python fallback in docs (#16704)
  • abaa189 [red-knot] handle cycles in MRO/bases resolution (#16693)
  • 360ba09 [red-knot] Auto generate statement nodes (#16645)
  • d8159e8 [pylint] Better inference for str.strip (PLE310) (#16671)
  • 04ad562 [pylint] Improve repeated-equality-comparison fix to use a set when all...
  • 9167471 [pylint/pep8-naming] Check __new__ argument name in `bad-staticmethod-a...
  • 348815d [flake8-pyi] Stabilize fix for unused-private-type-var (PYI018) (#16682)
  • 1326d55 [flake8-bandit] Deprecate suspicious-xmle-tree-usage (S320) (#16680)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.10.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.9.10...0.10.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested review from greg-kcio and jessfraz March 14, 2025 11:23
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Mar 14, 2025
Copy link

vercel bot commented Mar 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
kittycad-py ✅ Ready (Inspect) Visit Preview Mar 14, 2025 11:24am

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.27%. Comparing base (8dc7cef) to head (811fe07).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #397   +/-   ##
=======================================
  Coverage   62.27%   62.27%           
=======================================
  Files         516      516           
  Lines       13104    13104           
=======================================
  Hits         8161     8161           
  Misses       4943     4943           
Flag Coverage Δ
unittests 62.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greg-kcio greg-kcio merged commit 8d945de into main Mar 14, 2025
7 checks passed
@greg-kcio greg-kcio deleted the dependabot/pip/ruff-0.10.0 branch March 14, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant