mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add options to tkinter widgets (#4363)
In tkinter, `widget['foo'] = bar` and `widget.config(foo=bar)` do the same thing, but they will now type-check differently: the `widget['foo'] = bar` syntax allows 'foo' to be any string (e.g. a variable, not necessarily a Literal) and bar to be any object, while `widget.config(foo=bar)` checks the existence of the option and the type of bar. Similarly, cget takes a Literal argument but __getitem__ takes a string.
Testing script can still be found at c42a72c53e
This commit is contained in:
@@ -18,7 +18,9 @@ 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)
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user