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
* Fix handling of nested imports
Instead of assuming that a name is imported from a top level package,
look in the imports for this name starting from the parent submodule
up until the import is found
* Fix "from imports" getting rexported unnecessarily
* Fix import sorting when having import aliases
Fixespython#13661Fixespython#7006
* Fix handling of nested imports.
Instead of assuming that a name is imported from a top level package,
look in the imports for this name starting from the parent submodule up
until the import is found
* Fix "from imports" getting reexported unnecessarily
* Fix import sorting when having import aliases
Fixes#13661Fixes#7006
Bug Report
Using latest mypy 0.971 stub is incorrectly generated (missing import in case of multiple "same imports").
Stubgen generates:
Since stubgenbug.common.circuit_breaker was lost in the process stubgenbug.common.circuit_breaker.CircuitBreaker is not resolved.
I am attaching the minimal example.
stubgenbug.tar.gz
To Reproduce
Extract attached file and run stubgen stubgenbug -o stubgenbug/out
Expected Behavior
import stubgenbug.common.circuit_breaker should stay in pyi
Your Environment
mypy.ini
(and other config files): /The text was updated successfully, but these errors were encountered: