Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[pyupgrade] Keyword arguments in super should suppress the UP008 fix - #19131

#19131
Merged
ntBre merged 2 commits into
astral-sh:mainastral-sh/ruff:mainfrom
danparizher:fix-19096danparizher/ruff:fix-19096Copy head branch name to clipboard
Jul 9, 2025
Merged

[pyupgrade] Keyword arguments in super should suppress the UP008 fix#19131
ntBre merged 2 commits into
astral-sh:mainastral-sh/ruff:mainfrom
danparizher:fix-19096danparizher/ruff:fix-19096Copy head branch name to clipboard

Conversation

@danparizher

Copy link
Copy Markdown
Contributor

Summary

Fixes #19096

@github-actions

github-actions Bot commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre added bug Something isn't working fixes Related to suggested fixes for violations labels Jul 4, 2025

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! I think this is totally reasonable, but another option would be still to emit the diagnostic but suppress the fix. What do you think?

The main benefit there is that if you get another diagnostic, maybe from a type checker, telling you to remove the kwargs, you don't get a new diagnostic from Ruff afterwards. I think the only real downside is that we'd have to downgrade the FIX_AVAILABILITY to Sometimes here.

@danparizher

Copy link
Copy Markdown
Contributor Author

I think that's a better approach - thanks for the feedback, I went ahead and implemented the changes.

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ntBre ntBre changed the title [pyupgrade] Keyword arguments in super should suppress the UP008 fix [pyupgrade] Keyword arguments in super should suppress the UP008 fix Jul 9, 2025
@ntBre
ntBre merged commit 221edcb into astral-sh:main Jul 9, 2025
35 checks passed
@danparizher
danparizher deleted the fix-19096 branch July 9, 2025 19:20
UnboundVariable pushed a commit to UnboundVariable/ruff that referenced this pull request Jul 10, 2025
…re_help

* 'main' of https://github.com/astral-sh/ruff: (34 commits)
  [docs] add capital one to who's using ruff (astral-sh#19248)
  [`pyupgrade`] Keyword arguments in `super` should suppress the `UP008` fix (astral-sh#19131)
  [`flake8-use-pathlib`] Add autofixes for `PTH100`, `PTH106`, `PTH107`, `PTH108`, `PTH110`, `PTH111`, `PTH112`, `PTH113`, `PTH114`, `PTH115`, `PTH117`, `PTH119`, `PTH120` (astral-sh#19213)
  [ty] Do not run `mypy_primer.yaml` when all changed files are Markdown files (astral-sh#19244)
  [`flake8-bandit`] Make example error out-of-the-box (`S412`) (astral-sh#19241)
  [`pydoclint`] Make example error out-of-the-box (`DOC501`) (astral-sh#19218)
  [ty] Add "kind" to completion suggestions
  [ty] Add type information to `all_members` API
  [ty] Expand API of `all_members` to return a struct
  [ty] Ecosystem analyzer PR comment workflow (astral-sh#19237)
  [ty] Merge `ty_macros` into `ruff_macros` (astral-sh#19229)
  [ty] Fix `ClassLiteral.into_callable` for dataclasses (astral-sh#19192)
  [ty] `dataclasses.field` support (astral-sh#19140)
  [ty] Fix panic for attribute expressions with empty value (astral-sh#19069)
  [ty] Return `CallableType` from `BoundMethodType.into_callable_type` (astral-sh#19193)
  [`flake8-bugbear`] Support non-context-manager calls in `B017` (astral-sh#19063)
  [ty] Improved diagnostic for reassignments of `Final` symbols (astral-sh#19214)
  [ty] Use full range for assignment definitions (astral-sh#19211)
  [`pylint`] Update `missing-maxsplit-arg` docs and error to suggest proper usage (`PLC0207`) (astral-sh#18949)
  [ty] Add `set -eu` to mypy-primer script (astral-sh#19212)
  ...

# Conflicts:
#	crates/ty_python_semantic/src/types/class.rs
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyword arguments in super should suppress the UP008 fix

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.