Skip to content

feat: Rework import generation for stubs. #38

@Masara

Description

@Masara

Is your feature request related to a problem?

Currently import information are directly taken from the api_analyzer to the stubs generator, but for the stubs we need to check all type hints in the Python code whether the types are new types imported from other files or not. For those new types imports have to be generated and other imports from the api_analyzer do not have to be taken over to the stubs.

Desired solution

Mypy should be able to specify source paths for type hints, therefore for the first step, those information have to be found and added to the api_analyzer. The second step would be to generate imports for with the stubs generator.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions