Skip to content

Commit c64baff

Browse files
authored
gh-69605: Add math.integer to PyREPL module completer hardcoded list (#144811)
1 parent d6e0445 commit c64baff

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Lib/_pyrepl/_module_completer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# Standard library submodules that are not detected by pkgutil.iter_modules
2424
# but can be imported, so should be proposed in completion
2525
"collections": ["abc"],
26+
"math": ["integer"],
2627
"os": ["path"],
2728
"xml.parsers.expat": ["errors", "model"],
2829
}

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ def test_hardcoded_stdlib_submodules(self):
11871187
cases = (
11881188
("import collections.\t\n", "import collections.abc"),
11891189
("from os import \t\n", "from os import path"),
1190+
("import math.\t\n", "import math.integer"),
11901191
("import xml.parsers.expat.\t\te\t\n\n", "import xml.parsers.expat.errors"),
11911192
("from xml.parsers.expat import \t\tm\t\n\n", "from xml.parsers.expat import model"),
11921193
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :mod:`math.integer` to :term:`REPL` auto-completion of imports.

0 commit comments

Comments
 (0)