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

autodoc: fix constructor signatures for classes derived from typing.Generic #8142

Merged
merged 2 commits into from Oct 2, 2020

Commits on Aug 21, 2020

  1. autodoc: Test the signature of typing.Generic subclasses.

    This test is currently failing because typing.Generic.__new__ clobbers the
    real signature.
    jcarrano committed Aug 21, 2020
    Copy the full SHA
    6426861 View commit details
    Browse the repository at this point in the history
  2. autodoc: blacklist typing.Generic.__new__

    When documenting classes derived from typing.Generic (essentially all classes in the
    typing module) the constructor signature would show an unhelpful (*args, **kwds).
    
    typing.Generic has a __new__ method which was picked up by sphinx. With this patch it
    is skipped and constructor signatures for generic classes are shown as they should.
    jcarrano committed Aug 21, 2020
    Copy the full SHA
    740be7f View commit details
    Browse the repository at this point in the history