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

Use get_type_hints() to get typed type hints. #12287

Merged
merged 2 commits into from
Jul 7, 2021

Commits on Jul 7, 2021

  1. Use get_type_hints() to get typed hints.

    dataclasses.fields() can sometimes return a string
    instead of a type. get_type_hints() resolves those
    strings.
    
    Note that get_type_hints() chokes on python 3.9-style
    annotations like list[str], so in relevant places we
    have to still use List[str] etc.
    
    [ci skip-rust]
    
    [ci skip-build-wheels]
    benjyw committed Jul 7, 2021
    Configuration menu
    Copy the full SHA
    e788527 View commit details
    Browse the repository at this point in the history
  2. Fix an issue exposed by this change.

    [ci skip-build-wheels]
    benjyw committed Jul 7, 2021
    Configuration menu
    Copy the full SHA
    2db0c09 View commit details
    Browse the repository at this point in the history