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

mypy plugin: More precisely detect when fields are required. #4086

Commits on May 18, 2022

  1. mypy plugin: More precisely detect when fields are required.

    The mypy plugin would previously incorrectly determine that a field was
    not required in a few scenarios where the field really is required. This
    specifically affected cases when the `Field()` function is used, where
    the plugin assumed that the first argument would always be `default`.
    
    This changes the code to examine each argument more closely, and it now
    properly handles several more scenarios where the default is explicitly
    named or when the default_factory named argument is used.
    richardxia committed May 18, 2022
    Configuration menu
    Copy the full SHA
    41e6c48 View commit details
    Browse the repository at this point in the history