Skip to content

Preserve None when inlining bare return expressions - #943

Closed
Narek-Khachikyan wants to merge 1 commit into
python-rope:masterfrom
Narek-Khachikyan:fix-inline-bare-return-745
Closed

Narek-Khachikyan wants to merge 1 commit into
python-rope:masterfrom
Narek-Khachikyan:fix-inline-bare-return-745

Conversation

@Narek-Khachikyan

Copy link
Copy Markdown

Description

Inlining a method with a bare return into an expression generated invalid Python, including result = and (t for t in ). Substitute None for the empty return expression, preserving the method's return value.

Fixes #745

Both executable regressions failed with SyntaxError before the fix and pass afterward. Validation: 104 inline tests passed; the full suite had 2,171 passed, 7 skipped, and 5 expected failures. Black and isort checks passed.

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have updated CHANGELOG.md

@Narek-Khachikyan Narek-Khachikyan closed this by deleting the head repository Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compilation error after applying the Inline method refactoring

1 participant