Remove `for_stub=True` conditional branch from the `tools.codegenerator.ImportedNamespaces.getvalue`
junkmd opened this issue · 0 comments
THIS IS FOR drop_py2
PLAN! Please see #392.
The ImportedNamespaces
is a "sprout class" that generates import parts strings of comtypes.gen._xxxxxxxxxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxx_x_x_x
.
In the past, an optional argument for_stub
is added to the getvalues
method, since we were trying to add the functionality to generate type stubs at the same time as the executable module under the comtypes.gen
(#355).
comtypes/comtypes/tools/codegenerator.py
Line 1402 in 00f2317
However, as you can see in #400, the plan has been revised and type hints will be added to executable modules with inline annotations as part of the drop_py2
plan.
So it is no longer necessary to take a for_stub
argument or conditional branch based on it.
Also, the following doctests are no longer required.
comtypes/comtypes/tools/codegenerator.py
Lines 1332 to 1346 in 00f2317
Before PR, run python -m doctest -v comtypes/tools/codegenerator.py
and make sure the test passes.