Upgrade the pytype version to one that can parse the tkinter stubs. (#4456)

The latest pytype release fixes two pyi parser bugs that allow files
affected by them to be taken off the pytype exclude list. I removed two
`total=False` declarations in tkinter/__init__ that pytype does not like
(because it checks that `total` is present only when TypedDict is a
class's immediate parent) and which shouldn't be needed because
_InMiscNonTotal already specifies totality. I double-checked that mypy
reports no errors in 3.7 on a .py file containing:

  from typing_extensions import TypedDict
  Foo = TypedDict('Foo', {'x': int}, total=False)
  class Bar(Foo): pass
  x: Foo = {}

showing that it doesn't require `total` to be repeated.
This commit is contained in:
Rebecca Chen
2020-08-17 19:49:58 -07:00
committed by GitHub
parent f23ce60668
commit 61537be530
3 changed files with 3 additions and 18 deletions

View File

@@ -17,18 +17,3 @@ third_party/2and3/attr/validators.pyi
third_party/2and3/pynamodb/models.pyi
third_party/3/six/__init__.pyi
third_party/3/six/moves/__init__.pyi
# anything that imports tkinter
# https://github.com/google/pytype/issues/637
# https://github.com/google/pytype/issues/644
stdlib/3/tkinter/__init__.pyi
stdlib/3/tkinter/dialog.pyi
stdlib/3/tkinter/filedialog.pyi
stdlib/3/tkinter/font.pyi
stdlib/3/tkinter/ttk.pyi
third_party/3/six/moves/tkinter.pyi
third_party/3/six/moves/tkinter_dialog.pyi
third_party/3/six/moves/tkinter_filedialog.pyi
third_party/3/six/moves/tkinter_tkfiledialog.pyi
third_party/3/six/moves/tkinter_ttk.pyi
stdlib/2and3/turtle.pyi