Skip to content

Commit e9ecea0

Browse files
authored
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 c42a72c
1 parent f20c565 commit e9ecea0

File tree

5 files changed

+3146
-80
lines changed

5 files changed

+3146
-80
lines changed

requirements-tests-py3.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ flake8==3.8.3
55
flake8-bugbear==20.1.4
66
flake8-pyi==20.5.0
77
isort[pyproject]==5.1.1
8-
pytype>=2020.07.24
8+
pytype>=2020.07.30

0 commit comments

Comments
 (0)