-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trace and shrink dictionaries as TypedDicts if possible.
* Trace a dictionary as an anonymous TypedDict if all keys are strings (up to a limit). * Conservatively shrink multiple TypedDicts as one only if they are all identical. Otherwise, fall back to the default behaviour. * Generate a TypedDict class definition stub at the top of the module stub and name it using the parameter name. * Add MAX_TYPED_DICT_SIZE field to Config. * Hand-roll an equality test because the default equality test for TypedDict fails for identical invocations: TypedDict('Foo', {'a': int}) != TypedDict('Foo', {'a': int}). * Trace and shrink return types and yield types as well. * Handle nested dictionaries. * Add `make_forward_ref` so that we can use ForwardRefs. I deleted a test for a nested `Dict[str, TypedDict]` because it kept failing on Python 3.6.
- Loading branch information
Showing
13 changed files
with
1,094 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[dev-packages] | ||
|
||
"flake8" = "*" | ||
pytest = "*" | ||
mypy = "*" | ||
pytest-smartcov = "*" | ||
"e1839a8" = {path = ".", editable = true} | ||
e1839a8 = {path = ".",editable = true} | ||
cython = "*" | ||
sphinx = "*" | ||
twine = "*" | ||
django = "*" | ||
tox = "*" | ||
|
||
[pipenv] | ||
|
||
keep_outdated = true | ||
|
||
[packages] | ||
stringcase = "*" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.