Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stubgen: Do not remove Generic from base classes #15316

Merged
merged 1 commit into from
May 27, 2023

Commits on May 27, 2023

  1. stubgen: Do not remove Generic from base classes

    Consider this python code:
    ```python
    from typing import Generic, TypeVar
    
    T = TypeVar("T")
    
    class C(Generic[T]): ...
    ```
    
    This is what stubgen produced before:
    ```python
    from typing import TypeVar
    
    T = TypeVar('T')
    
    class C: ...
    ```
    
    and this after:
    ```python
    from typing import Generic, TypeVar
    
    T = TypeVar('T')
    
    class C(Generic[T]): ...
    ```
    
    Note that stubgen handles generics correctly in --parse-only mode already.
    hamdanal committed May 27, 2023
    Configuration menu
    Copy the full SHA
    4d0541b View commit details
    Browse the repository at this point in the history