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

Add support for DefaultDict on jedi_typing.py. #1145

Merged
merged 2 commits into from Jun 17, 2018
Merged

Add support for DefaultDict on jedi_typing.py. #1145

merged 2 commits into from Jun 17, 2018

Conversation

tarcisioe
Copy link

Fixes #1144.

@codecov-io
Copy link

codecov-io commented Jun 16, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1145   +/-   ##
=======================================
  Coverage   92.78%   92.78%           
=======================================
  Files          57       57           
  Lines        6902     6902           
=======================================
  Hits         6404     6404           
  Misses        498      498

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 70c2fce...24f49a6. Read the comment docs.

@davidhalter
Copy link
Owner

davidhalter commented Jun 16, 2018

Can you add a test for it as well. Thanks for the fast fix!

@tarcisioe
Copy link
Author

I wasn't sure what to test, so I duplicated the tests that were done to typing.Dict. as well. I also didn't know how to support the instance variable default_factory that DefaultDicts have, because all other typing stubs only have methods and I didn't know how I could type a variable (no type annotations are used on the file, and it would be Python 3.6 only if I used variable annotations).

@davidhalter
Copy link
Owner

This is good enough. Dict in typing.py is pretty much the same as DefaultDict anyway, because there is no way to figure out if a key is present in a dict. Thanks for the tests!

@davidhalter davidhalter merged commit e96ebbe into davidhalter:master Jun 17, 2018
@tarcisioe tarcisioe deleted the feature/defaultdict branch June 17, 2018 14:51
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.

None yet

3 participants