You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy stubgen re-exports more names than needed (despite --export-less). It seems that imports that are only used in function parameter type annotations (see FirstErrorType below) are always re-exported and imports from 'if TYPE_CHECKING' clauses (see SecondErrorType below) as well.
Only semi-related remark: It would be helpful if stubgen could be configured to only re-export names that are already explicitly re-exported in the source file. This would allow me to workaround this issue and would also fix #2190
Bug Report
mypy stubgen re-exports more names than needed (despite --export-less). It seems that imports that are only used in function parameter type annotations (see FirstErrorType below) are always re-exported and imports from 'if TYPE_CHECKING' clauses (see SecondErrorType below) as well.
To Reproduce
Expected Behavior
Nether FirstErrorType nor SecondErrorType should be re-exported according to the documentation of the --export-less switch, which states
Actual Behavior
the output of
stubgen --export-less example.py
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: