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

Allow autocompletion of fields #398

merged 2 commits into from Feb 18, 2019

Allow autocompletion of fields #398

merged 2 commits into from Feb 18, 2019


Copy link

@dgasmith dgasmith commented Feb 16, 2019

Change Summary

Modifies the __dir__ method to show fields as well as canonical functions and attributes. As the __dir__ method is explicitly for interactive use (see the docs) this should not effect other areas of pydantic and as such is implemented in a very straightforward manner. It is also possible to hide metafields and the Config object as well if desired.

Use case: Our users will often handle pydantic objects in Jupyter notebooks and interactive interpreters where this feature is quite useful when exploring objects that they are not familiar with.


  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • HISTORY.rst has been updated
    • if this is the first change since a release, please add a new section
    • include the issue number or this pull request number #<number>
    • include your github username @<whomever>
Copy link

@codecov codecov bot commented Feb 16, 2019

Codecov Report

Merging #398 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #398   +/-   ##
  Coverage     100%   100%           
  Files          14     14           
  Lines        2064   2068    +4     
  Branches      420    420           
+ Hits         2064   2068    +4

@samuelcolvin samuelcolvin merged commit 5438aa5 into samuelcolvin:master Feb 18, 2019
7 checks passed
Copy link

@samuelcolvin samuelcolvin commented Feb 18, 2019

awesome, thank you.

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

Successfully merging this pull request may close these issues.

None yet

2 participants