GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-140870: Full coverage for _pyrepl._module_completer by loic-simon · Pull Request #143244 · python/cpython

Conversation

@loic-simon

@loic-simon loic-simon commented Dec 28, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

(split from #140871 as recommanded by @tomasr8)

Add a few tests to get the coverage rate of _pyrepl._module_completer to ~100%:

% python -m coverage run --branch --source=_pyrepl._module_completer -m unittest Lib/test/test_pyrepl/test_pyrepl.py
.....................................s..................................................
----------------------------------------------------------------------
Ran 88 tests in 2.369s

OK (skipped=1)

% python -m coverage report --show-missing
Name                               Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------
Lib/_pyrepl/_module_completer.py     267      1    104      1    99%   19
------------------------------------------------------------------------------
TOTAL                                267      1    104      1    99%

The only statement left is the import under if TYPE_CHECKING, as expected.

  • Issue: PyREPL: auto-complete module attributes in import statements #140870

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@loic-simon
Full coverage for _pyrepl._module_completer
d5eb802
@loic-simon
loic-simon requested review from ambv, lysnikolaou and pablogsal as code owners December 28, 2025 12:28
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting review labels Dec 28, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 28, 2025
PyREPL: auto-complete module attributes in import statements #140870
Closed
@loic-simon loic-simon mentioned this pull request Dec 28, 2025
gh-140870: PyREPL auto-complete module attributes in import statements #140871
Merged
@tomasr8 tomasr8 added the skip news label Dec 28, 2025
tomasr8
tomasr8 approved these changes Dec 28, 2025
View reviewed changes

@tomasr8 tomasr8 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good, thanks! The All required checks pass failed for some reason so I'm just gonna merge main to trigger a new run..

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

loic-simon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Dec 28, 2025
@tomasr8
Merge branch 'main' into improve-pyrepl-test-coverage
435d2e0
@tomasr8 tomasr8 added the needs backport to 3.14 bugs and security fixes label Dec 28, 2025
@tomasr8
tomasr8 merged commit c3febba into python:main Dec 28, 2025
46 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Dec 28, 2025

Copy link
Copy Markdown

Thanks @loic-simon for the PR, and @tomasr8 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 28, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 28, 2025
@loic-simon @tomasr8 @miss-islington
pythongh-140870: Full coverage for _pyrepl._module_completer (pythonG…
b4c47f8
…H-143244)

Full coverage for _pyrepl._module_completer
(cherry picked from commit c3febba)

Co-authored-by: Loïc Simon <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 28, 2025

Copy link
Copy Markdown

GH-143260 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 28, 2025
tomasr8 added a commit that referenced this pull request Dec 28, 2025
@miss-islington @loic-simon @tomasr8
[3.14] gh-140870: Full coverage for _pyrepl._module_completer (GH-143244
b097fa1
) (#143260)

gh-140870: Full coverage for _pyrepl._module_completer (GH-143244)

Full coverage for _pyrepl._module_completer
(cherry picked from commit c3febba)

Co-authored-by: Loïc Simon <[email protected]>
Co-authored-by: Tomas R. <[email protected]>
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@loic-simon @tomasr8 @thunder-coding
pythongh-140870: Full coverage for _pyrepl._module_completer (python#…
90119d3
…143244)

Full coverage for _pyrepl._module_completer

Co-authored-by: Tomas R. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tomasr8 tomasr8 tomasr8 approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@loic-simon @tomasr8
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.