Skip to content

feat: Generate stubs for public methods of private classes which are superclasses of public classes #64

@Masara

Description

@Masara

Is your feature request related to a problem?

Currently (after PR #50), if public classes inherit from private classes, the stubs for the public class will be generated and reference those private classes, but the private classes won't be generated and are therefore "invisible" for the user.

Desired solution

If a public class inherits from a private class, the private class should generate stubs, too.

To do this, we would need to extend the information in the API data so that superclass information also points in the other direction, i.e. we need to find out the subclasses for all classes.

The stubs generator should add the public methods of the internal classes to the public classes.

Additional Context

An example test case where the private super class should be generated can be found @ Stub-Generator\tests\data\various_modules_package\aliasing\aliasing_module_1.py for the class AliasingModuleClassC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✔️ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions