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: type hints on BaseConfig #1618

Merged

Conversation

PrettyWood
Copy link
Member

Change Summary

Just added SchemaExtraCallable when TYPE_CHECKING is False to make sure typing.get_type_hints does not crash.

Related issue number

closes #1614

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #1618 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #1618   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3793      3796    +3     
  Branches       752       752           
=========================================
+ Hits          3793      3796    +3     
Impacted Files Coverage Δ
pydantic/schema.py 100.00% <0.00%> (ø)
pydantic/validators.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5195e55...85b0add. Read the comment docs.

@samuelcolvin samuelcolvin merged commit 329b1d3 into pydantic:master Jun 9, 2020
@samuelcolvin
Copy link
Member

great, thank you.

@PrettyWood PrettyWood deleted the fix/base_config_type_hinting branch June 9, 2020 10:36
@pawamoy
Copy link

pawamoy commented Jun 11, 2020

Thank you @PrettyWood!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NameError: name 'SchemaExtraCallable' is not defined
3 participants