Skip to content

Comments

[ruff] Parenthesize fix when argument spans multiple lines for unnecessary-round (RUF057)#15703

Merged
dylwil3 merged 4 commits intoastral-sh:mainfrom
dylwil3:round-fix
Jan 24, 2025
Merged

[ruff] Parenthesize fix when argument spans multiple lines for unnecessary-round (RUF057)#15703
dylwil3 merged 4 commits intoastral-sh:mainfrom
dylwil3:round-fix

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Jan 24, 2025

As in the title. We also make the fix unsafe when the range of the call to round() intersects comments.

Closes #15598

@dylwil3 dylwil3 added bug Something isn't working fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 24, 2025
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dylwil3 dylwil3 merged commit 7778d1d into astral-sh:main Jan 24, 2025
21 checks passed
dcreager added a commit that referenced this pull request Jan 24, 2025
* main:
  Add `check` command (#15692)
  [red-knot] Use itertools to clean up `SymbolState::merge` (#15702)
  [red-knot] Add `--ignore`, `--warn`, and `--error` CLI arguments (#15689)
  Use `uv init --lib` in tutorial (#15718)
  [red-knot] Use `Unknown | T_inferred` for undeclared public symbols (#15674)
  [`ruff`] Parenthesize fix when argument spans multiple lines for `unnecessary-round` (`RUF057`) (#15703)
  [red-knot] Rename `TestDbBuilder::typeshed` to `.custom_typeshed` (#15712)
  Honor banned top level imports by TID253 in PLC0415.  (#15628)
  Apply `AIR302`-context check only in `@task` function (#15711)
  [`airflow`] Update `AIR302` to check for deprecated context keys (#15144)
  Remove test rules from JSON schema (#15627)
  Add two missing commits to changelog (#15701)
  Fix grep for version number in docker build (#15699)
  Bump version to 0.9.3 (#15698)
  Preserve raw string prefix and escapes (#15694)
  [`flake8-pytest-style`] Rewrite references to `.exception` (`PT027`) (#15680)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fixes Related to suggested fixes for violations preview Related to preview mode features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUF057 fix introduces an error when the argument contains a newline

2 participants