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

Fix __parameters__ access in gen._generate_mapping #221

Commits on Feb 5, 2022

  1. Fix __parameters__ access in gen._generate_mapping

    There are Generic types in the typing modules
    from which you can inherit in your own classes
    which do not have an __parameters__ attribute,
    such classes are now ignored making
    gen._generate_mapping effectively a no-op
    in case the class do not have an __parameters__
    attribute.
    
    As https://github.com/ilevkivskyi/typing_inspect/blob/8f6aa2075ba448ab322def454137e7c59b9b302d/typing_inspect.py#L405
    is showing there are also cases where __parameters__
    could be None, so I test for both cases, that it
    is None or that it does not exist.
    
    See Also:
    python-attrs#217
    raabf committed Feb 5, 2022
    Configuration menu
    Copy the full SHA
    1a80479 View commit details
    Browse the repository at this point in the history
  2. Add HISTORY entry

    raabf committed Feb 5, 2022
    Configuration menu
    Copy the full SHA
    b62813c View commit details
    Browse the repository at this point in the history