Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add math.integer to PyREPL module completer hardcoded list
  • Loading branch information
loic-simon committed Feb 13, 2026
commit 200f5b89f14bc3492cda02c3f1a7c4b4dae9a4d5
1 change: 1 addition & 0 deletions Lib/_pyrepl/_module_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Standard library submodules that are not detected by pkgutil.iter_modules
# but can be imported, so should be proposed in completion
"collections": ["abc"],
"math": ["integer"],
"os": ["path"],
"xml.parsers.expat": ["errors", "model"],
}
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_pyrepl/test_pyrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ def test_hardcoded_stdlib_submodules(self):
cases = (
("import collections.\t\n", "import collections.abc"),
("from os import \t\n", "from os import path"),
("import math.\t\n", "import math.integer"),
("import xml.parsers.expat.\t\te\t\n\n", "import xml.parsers.expat.errors"),
("from xml.parsers.expat import \t\tm\t\n\n", "from xml.parsers.expat import model"),
)
Expand Down
Loading