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

[syntax-errors] Fix false positive for parenthesized tuple index #16948

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

ntBre
Copy link
Contributor

@ntBre ntBre commented Mar 24, 2025

Summary

Fixes #16943 by checking if the tuple is not parenthesized before emitting an error.

Test Plan

New inline test based on the initial report

Summary
--

Fixes #16943 by checking if the tuple is not parenthesized before emitting an
error.

Test Plan
--

New inline test based on the initial report
@ntBre ntBre added the bug Something isn't working label Mar 24, 2025
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -2 violations, +0 -0 fixes in 1 projects; 54 projects unchanged)

mesonbuild/meson-python (+0 -2 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview

- mesonpy/_editable.py:253:31: SyntaxError: Cannot use star expression in index on Python 3.8 (syntax was added in Python 3.11)
- mesonpy/_editable.py:253:48: SyntaxError: Cannot use star expression in index on Python 3.8 (syntax was added in Python 3.11)

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
SyntaxError: 2 0 2 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@ntBre ntBre merged commit 2711e08 into main Mar 24, 2025
22 checks passed
@ntBre ntBre deleted the brent/star-args branch March 24, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for starred arguments with Python 3.10
2 participants