Skip to content

Commit a703722

Browse files
chore(deps): update dependency ruff to >=0.2,<0.14 (#1319)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [ruff](https://docs.astral.sh/ruff) ([source](https://redirect.github.com/astral-sh/ruff), [changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md)) | `>=0.2,<0.13` -> `>=0.2,<0.14` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.12.2/0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.13.0`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0130) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.12...0.13.0) Check out the [blog post](https://astral.sh/blog/ruff-v0.13.0) for a migration guide and overview of the changes! ##### Breaking changes - **Several rules can now add `from __future__ import annotations` automatically** `TC001`, `TC002`, `TC003`, `RUF013`, and `UP037` now add `from __future__ import annotations` as part of their fixes when the `lint.future-annotations` setting is enabled. This allows the rules to move more imports into `TYPE_CHECKING` blocks (`TC001`, `TC002`, and `TC003`), use PEP 604 union syntax on Python versions before 3.10 (`RUF013`), and unquote more annotations (`UP037`). - **Full module paths are now used to verify first-party modules** Ruff now checks that the full path to a module exists on disk before categorizing it as a first-party import. This change makes first-party import detection more accurate, helping to avoid false positives on local directories with the same name as a third-party dependency, for example. See the [FAQ section](https://docs.astral.sh/ruff/faq/#how-does-ruff-determine-which-of-my-imports-are-first-party-third-party-etc) on import categorization for more details. - **Deprecated rules must now be selected by exact rule code** Ruff will no longer activate deprecated rules selected by their group name or prefix. As noted below, the two remaining deprecated rules were also removed in this release, so this won't affect any current rules, but it will still affect any deprecations in the future. - **The deprecated macOS configuration directory fallback has been removed** Ruff will no longer look for a user-level configuration file at `~/Library/Application Support/ruff/ruff.toml` on macOS. This feature was deprecated in v0.5 in favor of using the [XDG specification](https://specifications.freedesktop.org/basedir-spec/latest/) (usually resolving to `~/.config/ruff/ruff.toml`), like on Linux. The fallback and accompanying deprecation warning have now been removed. ##### Removed Rules The following rules have been removed: - [`pandas-df-variable-name`](https://docs.astral.sh/ruff/rules/pandas-df-variable-name) (`PD901`) - [`non-pep604-isinstance`](https://docs.astral.sh/ruff/rules/non-pep604-isinstance) (`UP038`) ##### Stabilization The following rules have been stabilized and are no longer in preview: - [`airflow-dag-no-schedule-argument`](https://docs.astral.sh/ruff/rules/airflow-dag-no-schedule-argument) (`AIR002`) - [`airflow3-removal`](https://docs.astral.sh/ruff/rules/airflow3-removal) (`AIR301`) - [`airflow3-moved-to-provider`](https://docs.astral.sh/ruff/rules/airflow3-moved-to-provider) (`AIR302`) - [`airflow3-suggested-update`](https://docs.astral.sh/ruff/rules/airflow3-suggested-update) (`AIR311`) - [`airflow3-suggested-to-move-to-provider`](https://docs.astral.sh/ruff/rules/airflow3-suggested-to-move-to-provider) (`AIR312`) - [`long-sleep-not-forever`](https://docs.astral.sh/ruff/rules/long-sleep-not-forever) (`ASYNC116`) - [`f-string-number-format`](https://docs.astral.sh/ruff/rules/f-string-number-format) (`FURB116`) - [`os-symlink`](https://docs.astral.sh/ruff/rules/os-symlink) (`PTH211`) - [`generic-not-last-base-class`](https://docs.astral.sh/ruff/rules/generic-not-last-base-class) (`PYI059`) - [`redundant-none-literal`](https://docs.astral.sh/ruff/rules/redundant-none-literal) (`PYI061`) - [`pytest-raises-ambiguous-pattern`](https://docs.astral.sh/ruff/rules/pytest-raises-ambiguous-pattern) (`RUF043`) - [`unused-unpacked-variable`](https://docs.astral.sh/ruff/rules/unused-unpacked-variable) (`RUF059`) - [`useless-class-metaclass-type`](https://docs.astral.sh/ruff/rules/useless-class-metaclass-type) (`UP050`) The following behaviors have been stabilized: - [`assert-raises-exception`](https://docs.astral.sh/ruff/rules/assert-raises-exception) (`B017`) now checks for direct calls to `unittest.TestCase.assert_raises` and `pytest.raises` instead of only the context manager forms. - [`missing-trailing-comma`](https://docs.astral.sh/ruff/rules/missing-trailing-comma) (`COM812`) and [`prohibited-trailing-comma`](https://docs.astral.sh/ruff/rules/prohibited-trailing-comma) (`COM819`) now check for trailing commas in PEP 695 type parameter lists. - [`raw-string-in-exception`](https://docs.astral.sh/ruff/rules/raw-string-in-exception) (`EM101`) now also checks for byte strings in exception messages. - [`invalid-mock-access`](https://docs.astral.sh/ruff/rules/invalid-mock-access) (`PGH005`) now checks for `AsyncMock` methods like `not_awaited` in addition to the synchronous variants. - [`useless-import-alias`](https://docs.astral.sh/ruff/rules/useless-import-alias) (`PLC0414`) no longer applies to `__init__.py` files, where it conflicted with one of the suggested fixes for [`unused-import`](https://docs.astral.sh/ruff/rules/unused-import) (`F401`). - [`bidirectional-unicode`](https://docs.astral.sh/ruff/rules/bidirectional-unicode) (`PLE2502`) now also checks for U+061C (Arabic Letter Mark). - The fix for [`multiple-with-statements`](https://docs.astral.sh/ruff/rules/multiple-with-statements) (`SIM117`) is now marked as always safe. ##### Preview features - \[`pyupgrade`] Enable `UP043` in stub files ([#&#8203;20027](https://redirect.github.com/astral-sh/ruff/pull/20027)) ##### Bug fixes - \[`pyupgrade`] Apply `UP008` only when the `__class__` cell exists ([#&#8203;19424](https://redirect.github.com/astral-sh/ruff/pull/19424)) - \[`ruff`] Fix empty f-string detection in `in-empty-collection` (`RUF060`) ([#&#8203;20249](https://redirect.github.com/astral-sh/ruff/pull/20249)) ##### Server - Add support for using uv as an alternative formatter backend ([#&#8203;19665](https://redirect.github.com/astral-sh/ruff/pull/19665)) ##### Documentation - \[`pep8-naming`] Fix formatting of `__all__` (`N816`) ([#&#8203;20301](https://redirect.github.com/astral-sh/ruff/pull/20301)) ### [`v0.12.12`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01212) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.11...0.12.12) ##### Preview features - Show fixes by default ([#&#8203;19919](https://redirect.github.com/astral-sh/ruff/pull/19919)) - \[`airflow`] Convert `DatasetOrTimeSchedule(datasets=...)` to `AssetOrTimeSchedule(assets=...)` (`AIR311`) ([#&#8203;20202](https://redirect.github.com/astral-sh/ruff/pull/20202)) - \[`airflow`] Improve the `AIR002` error message ([#&#8203;20173](https://redirect.github.com/astral-sh/ruff/pull/20173)) - \[`airflow`] Move `airflow.operators.postgres_operator.Mapping` from `AIR302` to `AIR301` ([#&#8203;20172](https://redirect.github.com/astral-sh/ruff/pull/20172)) - \[`flake8-async`] Implement `blocking-input` rule (`ASYNC250`) ([#&#8203;20122](https://redirect.github.com/astral-sh/ruff/pull/20122)) - \[`flake8-use-pathlib`] Make `PTH119` and `PTH120` fixes unsafe because they can change behavior ([#&#8203;20118](https://redirect.github.com/astral-sh/ruff/pull/20118)) - \[`pylint`] Add U+061C to `PLE2502` ([#&#8203;20106](https://redirect.github.com/astral-sh/ruff/pull/20106)) - \[`ruff`] Fix false negative for empty f-strings in `deque` calls (`RUF037`) ([#&#8203;20109](https://redirect.github.com/astral-sh/ruff/pull/20109)) ##### Bug fixes - Less confidently mark f-strings as empty when inferring truthiness ([#&#8203;20152](https://redirect.github.com/astral-sh/ruff/pull/20152)) - \[`fastapi`] Fix false positive for paths with spaces around parameters (`FAST003`) ([#&#8203;20077](https://redirect.github.com/astral-sh/ruff/pull/20077)) - \[`flake8-comprehensions`] Skip `C417` when lambda contains `yield`/`yield from` ([#&#8203;20201](https://redirect.github.com/astral-sh/ruff/pull/20201)) - \[`perflint`] Handle tuples in dictionary comprehensions (`PERF403`) ([#&#8203;19934](https://redirect.github.com/astral-sh/ruff/pull/19934)) ##### Rule changes - \[`pycodestyle`] Preserve return type annotation for `ParamSpec` (`E731`) ([#&#8203;20108](https://redirect.github.com/astral-sh/ruff/pull/20108)) ##### Documentation - Add fix safety sections to docs ([#&#8203;17490](https://redirect.github.com/astral-sh/ruff/pull/17490),[#&#8203;17499](https://redirect.github.com/astral-sh/ruff/pull/17499)) ### [`v0.12.11`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01211) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.10...0.12.11) ##### Preview features - \[`airflow`] Extend `AIR311` and `AIR312` rules ([#&#8203;20082](https://redirect.github.com/astral-sh/ruff/pull/20082)) - \[`airflow`] Replace wrong path `airflow.io.storage` with `airflow.io.store` (`AIR311`) ([#&#8203;20081](https://redirect.github.com/astral-sh/ruff/pull/20081)) - \[`flake8-async`] Implement `blocking-http-call-httpx-in-async-function` (`ASYNC212`) ([#&#8203;20091](https://redirect.github.com/astral-sh/ruff/pull/20091)) - \[`flake8-logging-format`] Add auto-fix for f-string logging calls (`G004`) ([#&#8203;19303](https://redirect.github.com/astral-sh/ruff/pull/19303)) - \[`flake8-use-pathlib`] Add autofix for `PTH211` ([#&#8203;20009](https://redirect.github.com/astral-sh/ruff/pull/20009)) - \[`flake8-use-pathlib`] Make `PTH100` fix unsafe because it can change behavior ([#&#8203;20100](https://redirect.github.com/astral-sh/ruff/pull/20100)) ##### Bug fixes - \[`pyflakes`, `pylint`] Fix false positives caused by `__class__` cell handling (`F841`, `PLE0117`) ([#&#8203;20048](https://redirect.github.com/astral-sh/ruff/pull/20048)) - \[`pyflakes`] Fix `allowed-unused-imports` matching for top-level modules (`F401`) ([#&#8203;20115](https://redirect.github.com/astral-sh/ruff/pull/20115)) - \[`ruff`] Fix false positive for t-strings in `default-factory-kwarg` (`RUF026`) ([#&#8203;20032](https://redirect.github.com/astral-sh/ruff/pull/20032)) - \[`ruff`] Preserve relative whitespace in multi-line expressions (`RUF033`) ([#&#8203;19647](https://redirect.github.com/astral-sh/ruff/pull/19647)) ##### Rule changes - \[`ruff`] Handle empty t-strings in `unnecessary-empty-iterable-within-deque-call` (`RUF037`) ([#&#8203;20045](https://redirect.github.com/astral-sh/ruff/pull/20045)) ##### Documentation - Fix incorrect `D413` links in docstrings convention FAQ ([#&#8203;20089](https://redirect.github.com/astral-sh/ruff/pull/20089)) - \[`flake8-use-pathlib`] Update links to the table showing the correspondence between `os` and `pathlib` ([#&#8203;20103](https://redirect.github.com/astral-sh/ruff/pull/20103)) ### [`v0.12.10`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#01210) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.9...0.12.10) ##### Preview features - \[`flake8-simplify`] Implement fix for `maxsplit` without separator (`SIM905`) ([#&#8203;19851](https://redirect.github.com/astral-sh/ruff/pull/19851)) - \[`flake8-use-pathlib`] Add fixes for `PTH102` and `PTH103` ([#&#8203;19514](https://redirect.github.com/astral-sh/ruff/pull/19514)) ##### Bug fixes - \[`isort`] Handle multiple continuation lines after module docstring (`I002`) ([#&#8203;19818](https://redirect.github.com/astral-sh/ruff/pull/19818)) - \[`pyupgrade`] Avoid reporting `__future__` features as unnecessary when they are used (`UP010`) ([#&#8203;19769](https://redirect.github.com/astral-sh/ruff/pull/19769)) - \[`pyupgrade`] Handle nested `Optional`s (`UP045`) ([#&#8203;19770](https://redirect.github.com/astral-sh/ruff/pull/19770)) ##### Rule changes - \[`pycodestyle`] Make `E731` fix unsafe instead of display-only for class assignments ([#&#8203;19700](https://redirect.github.com/astral-sh/ruff/pull/19700)) - \[`pyflakes`] Add secondary annotation showing previous definition (`F811`) ([#&#8203;19900](https://redirect.github.com/astral-sh/ruff/pull/19900)) ##### Documentation - Fix description of global config file discovery strategy ([#&#8203;19188](https://redirect.github.com/astral-sh/ruff/pull/19188)) - Update outdated links to <https://typing.python.org/en/latest/source/stubs.html> ([#&#8203;19992](https://redirect.github.com/astral-sh/ruff/pull/19992)) - \[`flake8-annotations`] Remove unused import in example (`ANN401`) ([#&#8203;20000](https://redirect.github.com/astral-sh/ruff/pull/20000)) ### [`v0.12.9`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0129) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.8...0.12.9) ##### Preview features - \[`airflow`] Add check for `airflow.secrets.cache.SecretCache` (`AIR301`) ([#&#8203;17707](https://redirect.github.com/astral-sh/ruff/pull/17707)) - \[`ruff`] Offer a safe fix for multi-digit zeros (`RUF064`) ([#&#8203;19847](https://redirect.github.com/astral-sh/ruff/pull/19847)) ##### Bug fixes - \[`flake8-blind-except`] Fix `BLE001` false-positive on `raise ... from None` ([#&#8203;19755](https://redirect.github.com/astral-sh/ruff/pull/19755)) - \[`flake8-comprehensions`] Fix false positive for `C420` with attribute, subscript, or slice assignment targets ([#&#8203;19513](https://redirect.github.com/astral-sh/ruff/pull/19513)) - \[`flake8-simplify`] Fix handling of U+001C..U+001F whitespace (`SIM905`) ([#&#8203;19849](https://redirect.github.com/astral-sh/ruff/pull/19849)) ##### Rule changes - \[`pylint`] Use lowercase hex characters to match the formatter (`PLE2513`) ([#&#8203;19808](https://redirect.github.com/astral-sh/ruff/pull/19808)) ##### Documentation - Fix `lint.future-annotations` link ([#&#8203;19876](https://redirect.github.com/astral-sh/ruff/pull/19876)) ##### Other changes - Build `riscv64` binaries for release ([#&#8203;19819](https://redirect.github.com/astral-sh/ruff/pull/19819)) - Add rule code to error description in GitLab output ([#&#8203;19896](https://redirect.github.com/astral-sh/ruff/pull/19896)) ### [`v0.12.8`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0128) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.7...0.12.8) ##### Preview features - \[`flake8-use-pathlib`] Expand `PTH201` to check all `PurePath` subclasses ([#&#8203;19440](https://redirect.github.com/astral-sh/ruff/pull/19440)) ##### Bug fixes - \[`flake8-blind-except`] Change `BLE001` to correctly parse exception tuples ([#&#8203;19747](https://redirect.github.com/astral-sh/ruff/pull/19747)) - \[`flake8-errmsg`] Exclude `typing.cast` from `EM101` ([#&#8203;19656](https://redirect.github.com/astral-sh/ruff/pull/19656)) - \[`flake8-simplify`] Fix raw string handling in `SIM905` for embedded quotes ([#&#8203;19591](https://redirect.github.com/astral-sh/ruff/pull/19591)) - \[`flake8-import-conventions`] Avoid false positives for NFKC-normalized `__debug__` import aliases in `ICN001` ([#&#8203;19411](https://redirect.github.com/astral-sh/ruff/pull/19411)) - \[`isort`] Fix syntax error after docstring ending with backslash (`I002`) ([#&#8203;19505](https://redirect.github.com/astral-sh/ruff/pull/19505)) - \[`pylint`] Mark `PLC0207` fixes as unsafe when `*args` unpacking is present ([#&#8203;19679](https://redirect.github.com/astral-sh/ruff/pull/19679)) - \[`pyupgrade`] Prevent infinite loop with `I002` (`UP010`, `UP035`) ([#&#8203;19413](https://redirect.github.com/astral-sh/ruff/pull/19413)) - \[`ruff`] Parenthesize generator expressions in f-strings (`RUF010`) ([#&#8203;19434](https://redirect.github.com/astral-sh/ruff/pull/19434)) ##### Rule changes - \[`eradicate`] Don't flag `pyrefly` pragmas as unused code (`ERA001`) ([#&#8203;19731](https://redirect.github.com/astral-sh/ruff/pull/19731)) ##### Documentation - Replace "associative" with "commutative" in docs for `RUF036` ([#&#8203;19706](https://redirect.github.com/astral-sh/ruff/pull/19706)) - Fix copy and line separator colors in dark mode ([#&#8203;19630](https://redirect.github.com/astral-sh/ruff/pull/19630)) - Fix link to `typing` documentation ([#&#8203;19648](https://redirect.github.com/astral-sh/ruff/pull/19648)) - \[`refurb`] Make more examples error out-of-the-box ([#&#8203;19695](https://redirect.github.com/astral-sh/ruff/pull/19695),[#&#8203;19673](https://redirect.github.com/astral-sh/ruff/pull/19673),[#&#8203;19672](https://redirect.github.com/astral-sh/ruff/pull/19672)) ##### Other changes - Include column numbers in GitLab output format ([#&#8203;19708](https://redirect.github.com/astral-sh/ruff/pull/19708)) - Always expand tabs to four spaces in diagnostics ([#&#8203;19618](https://redirect.github.com/astral-sh/ruff/pull/19618)) - Update pre-commit's `ruff` id ([#&#8203;19654](https://redirect.github.com/astral-sh/ruff/pull/19654)) ### [`v0.12.7`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0127) This is a follow-up release to 0.12.6. Because of an issue in the package metadata, 0.12.6 failed to publish fully to PyPI and has been yanked. Similarly, there is no GitHub release or Git tag for 0.12.6. The contents of the 0.12.7 release are identical to 0.12.6, except for the updated metadata. ### [`v0.12.6`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0126) ##### Preview features - \[`flake8-commas`] Add support for trailing comma checks in type parameter lists (`COM812`, `COM819`) ([#&#8203;19390](https://redirect.github.com/astral-sh/ruff/pull/19390)) - \[`pylint`] Implement auto-fix for `missing-maxsplit-arg` (`PLC0207`) ([#&#8203;19387](https://redirect.github.com/astral-sh/ruff/pull/19387)) - \[`ruff`] Offer fixes for `RUF039` in more cases ([#&#8203;19065](https://redirect.github.com/astral-sh/ruff/pull/19065)) ##### Bug fixes - Support `.pyi` files in ruff analyze graph ([#&#8203;19611](https://redirect.github.com/astral-sh/ruff/pull/19611)) - \[`flake8-pyi`] Preserve inline comment in ellipsis removal (`PYI013`) ([#&#8203;19399](https://redirect.github.com/astral-sh/ruff/pull/19399)) - \[`perflint`] Ignore rule if target is `global` or `nonlocal` (`PERF401`) ([#&#8203;19539](https://redirect.github.com/astral-sh/ruff/pull/19539)) - \[`pyupgrade`] Fix `UP030` to avoid modifying double curly braces in format strings ([#&#8203;19378](https://redirect.github.com/astral-sh/ruff/pull/19378)) - \[`refurb`] Ignore decorated functions for `FURB118` ([#&#8203;19339](https://redirect.github.com/astral-sh/ruff/pull/19339)) - \[`refurb`] Mark `int` and `bool` cases for `Decimal.from_float` as safe fixes (`FURB164`) ([#&#8203;19468](https://redirect.github.com/astral-sh/ruff/pull/19468)) - \[`ruff`] Fix `RUF033` for named default expressions ([#&#8203;19115](https://redirect.github.com/astral-sh/ruff/pull/19115)) ##### Rule changes - \[`flake8-blind-except`] Change `BLE001` to permit `logging.critical(..., exc_info=True)` ([#&#8203;19520](https://redirect.github.com/astral-sh/ruff/pull/19520)) ##### Performance - Add support for specifying minimum dots in detected string imports ([#&#8203;19538](https://redirect.github.com/astral-sh/ruff/pull/19538)) ### [`v0.12.5`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0125) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.4...0.12.5) ##### Preview features - \[`flake8-use-pathlib`] Add autofix for `PTH101`, `PTH104`, `PTH105`, `PTH121` ([#&#8203;19404](https://redirect.github.com/astral-sh/ruff/pull/19404)) - \[`ruff`] Support byte strings (`RUF055`) ([#&#8203;18926](https://redirect.github.com/astral-sh/ruff/pull/18926)) ##### Bug fixes - Fix `unreachable` panic in parser ([#&#8203;19183](https://redirect.github.com/astral-sh/ruff/pull/19183)) - \[`flake8-pyi`] Skip fix if all `Union` members are `None` (`PYI016`) ([#&#8203;19416](https://redirect.github.com/astral-sh/ruff/pull/19416)) - \[`perflint`] Parenthesize generator expressions (`PERF401`) ([#&#8203;19325](https://redirect.github.com/astral-sh/ruff/pull/19325)) - \[`pylint`] Handle empty comments after line continuation (`PLR2044`) ([#&#8203;19405](https://redirect.github.com/astral-sh/ruff/pull/19405)) ##### Rule changes - \[`pep8-naming`] Fix `N802` false positives for `CGIHTTPRequestHandler` and `SimpleHTTPRequestHandler` ([#&#8203;19432](https://redirect.github.com/astral-sh/ruff/pull/19432)) ### [`v0.12.4`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0124) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.3...0.12.4) ##### Preview features - \[`flake8-type-checking`, `pyupgrade`, `ruff`] Add `from __future__ import annotations` when it would allow new fixes (`TC001`, `TC002`, `TC003`, `UP037`, `RUF013`) ([#&#8203;19100](https://redirect.github.com/astral-sh/ruff/pull/19100)) - \[`flake8-use-pathlib`] Add autofix for `PTH109` ([#&#8203;19245](https://redirect.github.com/astral-sh/ruff/pull/19245)) - \[`pylint`] Detect indirect `pathlib.Path` usages for `unspecified-encoding` (`PLW1514`) ([#&#8203;19304](https://redirect.github.com/astral-sh/ruff/pull/19304)) ##### Bug fixes - \[`flake8-bugbear`] Fix `B017` false negatives for keyword exception arguments ([#&#8203;19217](https://redirect.github.com/astral-sh/ruff/pull/19217)) - \[`flake8-use-pathlib`] Fix false negative on direct `Path()` instantiation (`PTH210`) ([#&#8203;19388](https://redirect.github.com/astral-sh/ruff/pull/19388)) - \[`flake8-django`] Fix `DJ008` false positive for abstract models with type-annotated `abstract` field ([#&#8203;19221](https://redirect.github.com/astral-sh/ruff/pull/19221)) - \[`isort`] Fix `I002` import insertion after docstring with multiple string statements ([#&#8203;19222](https://redirect.github.com/astral-sh/ruff/pull/19222)) - \[`isort`] Treat form feed as valid whitespace before a semicolon ([#&#8203;19343](https://redirect.github.com/astral-sh/ruff/pull/19343)) - \[`pydoclint`] Fix `SyntaxError` from fixes with line continuations (`D201`, `D202`) ([#&#8203;19246](https://redirect.github.com/astral-sh/ruff/pull/19246)) - \[`refurb`] `FURB164` fix should validate arguments and should usually be marked unsafe ([#&#8203;19136](https://redirect.github.com/astral-sh/ruff/pull/19136)) ##### Rule changes - \[`flake8-use-pathlib`] Skip single dots for `invalid-pathlib-with-suffix` (`PTH210`) on versions >= 3.14 ([#&#8203;19331](https://redirect.github.com/astral-sh/ruff/pull/19331)) - \[`pep8_naming`] Avoid false positives on standard library functions with uppercase names (`N802`) ([#&#8203;18907](https://redirect.github.com/astral-sh/ruff/pull/18907)) - \[`pycodestyle`] Handle brace escapes for t-strings in logical lines ([#&#8203;19358](https://redirect.github.com/astral-sh/ruff/pull/19358)) - \[`pylint`] Extend invalid string character rules to include t-strings ([#&#8203;19355](https://redirect.github.com/astral-sh/ruff/pull/19355)) - \[`ruff`] Allow `strict` kwarg when checking for `starmap-zip` (`RUF058`) in Python 3.14+ ([#&#8203;19333](https://redirect.github.com/astral-sh/ruff/pull/19333)) ##### Documentation - \[`flake8-type-checking`] Make `TC010` docs example more realistic ([#&#8203;19356](https://redirect.github.com/astral-sh/ruff/pull/19356)) - Make more documentation examples error out-of-the-box ([#&#8203;19288](https://redirect.github.com/astral-sh/ruff/pull/19288),[#&#8203;19272](https://redirect.github.com/astral-sh/ruff/pull/19272),[#&#8203;19291](https://redirect.github.com/astral-sh/ruff/pull/19291),[#&#8203;19296](https://redirect.github.com/astral-sh/ruff/pull/19296),[#&#8203;19292](https://redirect.github.com/astral-sh/ruff/pull/19292),[#&#8203;19295](https://redirect.github.com/astral-sh/ruff/pull/19295),[#&#8203;19297](https://redirect.github.com/astral-sh/ruff/pull/19297),[#&#8203;19309](https://redirect.github.com/astral-sh/ruff/pull/19309)) ### [`v0.12.3`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0123) [Compare Source](https://redirect.github.com/astral-sh/ruff/compare/0.12.2...0.12.3) ##### Preview features - \[`flake8-bugbear`] Support non-context-manager calls in `B017` ([#&#8203;19063](https://redirect.github.com/astral-sh/ruff/pull/19063)) - \[`flake8-use-pathlib`] Add autofixes for `PTH100`, `PTH106`, `PTH107`, `PTH108`, `PTH110`, `PTH111`, `PTH112`, `PTH113`, `PTH114`, `PTH115`, `PTH117`, `PTH119`, `PTH120` ([#&#8203;19213](https://redirect.github.com/astral-sh/ruff/pull/19213)) - \[`flake8-use-pathlib`] Add autofixes for `PTH203`, `PTH204`, `PTH205` ([#&#8203;18922](https://redirect.github.com/astral-sh/ruff/pull/18922)) ##### Bug fixes - \[`flake8-return`] Fix false-positive for variables used inside nested functions in `RET504` ([#&#8203;18433](https://redirect.github.com/astral-sh/ruff/pull/18433)) - Treat form feed as valid whitespace before a line continuation ([#&#8203;19220](https://redirect.github.com/astral-sh/ruff/pull/19220)) - \[`flake8-type-checking`] Fix syntax error introduced by fix (`TC008`) ([#&#8203;19150](https://redirect.github.com/astral-sh/ruff/pull/19150)) - \[`pyupgrade`] Keyword arguments in `super` should suppress the `UP008` fix ([#&#8203;19131](https://redirect.github.com/astral-sh/ruff/pull/19131)) ##### Documentation - \[`flake8-pyi`] Make example error out-of-the-box (`PYI007`, `PYI008`) ([#&#8203;19103](https://redirect.github.com/astral-sh/ruff/pull/19103)) - \[`flake8-simplify`] Make example error out-of-the-box (`SIM116`) ([#&#8203;19111](https://redirect.github.com/astral-sh/ruff/pull/19111)) - \[`flake8-type-checking`] Make example error out-of-the-box (`TC001`) ([#&#8203;19151](https://redirect.github.com/astral-sh/ruff/pull/19151)) - \[`flake8-use-pathlib`] Make example error out-of-the-box (`PTH210`) ([#&#8203;19189](https://redirect.github.com/astral-sh/ruff/pull/19189)) - \[`pycodestyle`] Make example error out-of-the-box (`E272`) ([#&#8203;19191](https://redirect.github.com/astral-sh/ruff/pull/19191)) - \[`pycodestyle`] Make example not raise unnecessary `SyntaxError` (`E114`) ([#&#8203;19190](https://redirect.github.com/astral-sh/ruff/pull/19190)) - \[`pydoclint`] Make example error out-of-the-box (`DOC501`) ([#&#8203;19218](https://redirect.github.com/astral-sh/ruff/pull/19218)) - \[`pylint`, `pyupgrade`] Fix syntax errors in examples (`PLW1501`, `UP028`) ([#&#8203;19127](https://redirect.github.com/astral-sh/ruff/pull/19127)) - \[`pylint`] Update `missing-maxsplit-arg` docs and error to suggest proper usage (`PLC0207`) ([#&#8203;18949](https://redirect.github.com/astral-sh/ruff/pull/18949)) - \[`flake8-bandit`] Make example error out-of-the-box (`S412`) ([#&#8203;19241](https://redirect.github.com/astral-sh/ruff/pull/19241)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/openapi-generators/openapi-python-client). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dylan Anthony <[email protected]>
1 parent a2a66e2 commit a703722

File tree

5 files changed

+38
-32
lines changed

5 files changed

+38
-32
lines changed

.changeset/support_ruff_013.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: minor
3+
---
4+
5+
# Support Ruff 0.13

pdm.lock

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"python-dateutil>=2.8.1,<3.0.0",
1515
"httpx>=0.23.0,<0.29.0",
1616
"ruamel.yaml>=0.18.6,<0.19.0",
17-
"ruff>=0.2,<0.13",
17+
"ruff>=0.2,<0.14",
1818
"typing-extensions>=4.8.0,<5.0.0",
1919
]
2020
name = "openapi-python-client"

tests/test_parser/test_openapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def test_from_data_no_operation_id(self, mocker, config):
466466
mocker.patch("openapi_python_client.utils.remove_string_escapes", return_value=data.description)
467467
parameters = mocker.MagicMock()
468468

469-
endpoint, _, return_params = Endpoint.from_data(
469+
Endpoint.from_data(
470470
data=data,
471471
path=path,
472472
method=method,
@@ -651,7 +651,7 @@ def test_from_data_overrides_path_item_params_with_operation_params(self, config
651651
)
652652
}
653653

654-
collections, schemas, parameters = EndpointCollection.from_data(
654+
collections, _schemas, _parameters = EndpointCollection.from_data(
655655
data=data,
656656
schemas=Schemas(),
657657
parameters=Parameters(),

tests/test_parser/test_responses.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def test_response_from_data_no_content(any_property_factory):
2121
data = oai.Response.model_construct(description="")
2222

23-
response, schemas = response_from_data(
23+
response, _schemas = response_from_data(
2424
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
2525
data=data,
2626
schemas=Schemas(),
@@ -49,7 +49,7 @@ def test_response_from_data_unsupported_content_type():
4949
data = oai.Response.model_construct(description="", content={"blah": None})
5050
config = MagicMock()
5151
config.content_type_overrides = {}
52-
response, schemas = response_from_data(
52+
response, _schemas = response_from_data(
5353
status_code=status_code,
5454
data=data,
5555
schemas=Schemas(),
@@ -68,7 +68,7 @@ def test_response_from_data_no_content_schema(any_property_factory):
6868
)
6969
config = MagicMock()
7070
config.content_type_overrides = {}
71-
response, schemas = response_from_data(
71+
response, _schemas = response_from_data(
7272
status_code=status_code,
7373
data=data,
7474
schemas=Schemas(),
@@ -99,7 +99,7 @@ def test_response_from_data_property_error(mocker):
9999
config = MagicMock()
100100
config.content_type_overrides = {}
101101

102-
response, schemas = responses.response_from_data(
102+
response, _schemas = responses.response_from_data(
103103
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
104104
data=data,
105105
schemas=Schemas(),
@@ -130,7 +130,7 @@ def test_response_from_data_property(mocker, any_property_factory):
130130
config.content_type_overrides = {}
131131
status_code = HTTPStatusPattern(pattern="400", code_range=(400, 400))
132132

133-
response, schemas = responses.response_from_data(
133+
response, _schemas = responses.response_from_data(
134134
status_code=status_code,
135135
data=data,
136136
schemas=Schemas(),
@@ -165,7 +165,7 @@ def test_response_from_data_reference(mocker, any_property_factory):
165165
config = MagicMock()
166166
config.content_type_overrides = {}
167167

168-
response, schemas = responses.response_from_data(
168+
response, _schemas = responses.response_from_data(
169169
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
170170
data=oai.Reference.model_construct(ref="#/components/responses/ErrorResponse"),
171171
schemas=Schemas(),
@@ -200,7 +200,7 @@ def test_response_from_data_invalid_reference(ref_string, expected_error_string,
200200
config = MagicMock()
201201
config.content_type_overrides = {}
202202

203-
response, schemas = responses.response_from_data(
203+
response, _schemas = responses.response_from_data(
204204
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
205205
data=oai.Reference.model_construct(ref=ref_string),
206206
schemas=Schemas(),
@@ -226,7 +226,7 @@ def test_response_from_data_ref_to_response_that_is_a_ref(mocker, any_property_f
226226
config = MagicMock()
227227
config.content_type_overrides = {}
228228

229-
response, schemas = responses.response_from_data(
229+
response, _schemas = responses.response_from_data(
230230
status_code=HTTPStatusPattern(pattern="400", code_range=(400, 400)),
231231
data=oai.Reference.model_construct(ref="#/components/responses/ErrorResponse"),
232232
schemas=Schemas(),
@@ -249,7 +249,7 @@ def test_response_from_data_content_type_overrides(any_property_factory):
249249
)
250250
config = MagicMock()
251251
config.content_type_overrides = {"application/zip": "application/octet-stream"}
252-
response, schemas = response_from_data(
252+
response, _schemas = response_from_data(
253253
status_code=HTTPStatusPattern(pattern="200", code_range=(200, 200)),
254254
data=data,
255255
schemas=Schemas(),

0 commit comments

Comments
 (0)