FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[codex] Fix line wrapping for commented implicit strings by 2830500285 · Pull Request #109 · pytest-dev/unittest2pytest · GitHub

Repository navigation

[codex] Fix line wrapping for commented implicit strings - #109

Draft
2830500285 wants to merge 1 commit into
pytest-dev:mainfrom
2830500285:codex/fix-comment-line-wrapping
Draft

2830500285 wants to merge 1 commit into
pytest-dev:mainfrom
2830500285:codex/fix-comment-line-wrapping

Conversation

Copy link
Copy Markdown

Summary

Fixes conversion of self.assertEqual(...) calls when an implicitly concatenated multi-line string contains an inline comment. The previous line-wrapping step could add backslash continuations to comment lines, producing invalid Python.

This changes the fixer to wrap generated assert expressions in parentheses when the expression contains comment-prefixed leaves, allowing Python implicit continuation to preserve comments safely.

Validation

  • .venv/bin/python -m pytest -q
  • git diff --check

Local result: 36 passed, 1 skipped, 16 warnings.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL