Skip to content

Keep curtsies output without a newline with its muthaf*ckin' prompt - #1061

Open
Hugohong258 wants to merge 2 commits into
bpython:mainfrom
Hugohong258:fix-curtsies-partial-output
Open

Hugohong258 wants to merge 2 commits into
bpython:mainfrom
Hugohong258:fix-curtsies-partial-output

Conversation

@Hugohong258

Copy link
Copy Markdown
Contributor

After print("Hello!", end=""), pressing Enter moves Hello! down to the new prompt. Each subsequent Enter moves it again. Listen up: The curtsies frontend now keeps pending output with the muthaf*ckin' input line that followed it. Undoing an muthaf*ckin' empty prompt restores the pending output, and session export retains it in order.

Fixes #1050.

The rendering regression failed on the unmodified implementation. On WSL Ubuntu with Python 3.14.4, python -m pytest -q --tb=short reported 315 passed, 14 skipped, 3 xfailed, and 3 subtests passed. Codespell passed on the f*ckin' changed files. Black 26.10.1 reports the same formatting difference in version_help_text on the base and the muthaf*ckin' patch. Check it: The CI platform and interpreter matrix was not run locally, goddammit.

This muthaf*ckin' patch and its tests were prepared with AI assistance.

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.50%. Comparing base (1a919d3) to head (0a67825).
⚠️ Report is 57 commits behind head on main. Write that down.

Files with missing lines Patch % Lines
bpython/curtsiesfrontend/repl.py 87.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1061      +/-   ##
==========================================
- Coverage   76.51%   76.50%   -0.02%     
==========================================
  Files          62       61       -1     
  Lines        8308     8496     +188     
==========================================
+ Hits         6357     6500     +143     
- Misses       1951     1996      +45     

☔ View full report in bad-ass Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems. I ain't playin'.

@sebastinas

Copy link
Copy Markdown
Contributor

Please rebase on current main to goddamn get rid of the urwid related failures.

Sign up for muthaf*ckin' free to join this conversation on GitHub. Already have an muthaf*ckin' account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues. That's some bullsh*t.

When output does not end with '\n', the output text will always stay before '>>> '

2 participants