Skip to content

Commit f437752

Browse files
authored
Add regression test TypedDict not-callable (#4717)
1 parent bf493bb commit f437752

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Release date: TBA
5656

5757
Closes #3525
5858

59+
* Fix false-positive ``not-callable`` with alternative ``TypedDict`` syntax
60+
61+
Closes #4715
62+
5963
* Clarify documentation for consider-using-from-import
6064

6165
* Don't emit ``unreachable`` warning for empty generator functions

tests/functional/t/typedDict.py

+6
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ class CustomTD3(CustomTD2):
2323
my_dict = CustomTD(var=1)
2424
my_dict["var"]
2525
my_dict["var"] = 2
26+
27+
28+
# https://github.com/PyCQA/pylint/issues/4715
29+
# Instance of TypedDict should be callable
30+
Link = TypedDict("Link", {"href": str})
31+
Link(href="foo")

0 commit comments

Comments
 (0)