summaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-02-04 21:33:37 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-15 17:08:21 +0100
commit02d865948d491c1e054715de1ae49b6ce14885c5 (patch)
treeeae31853823776916e42bab08926d2c6d3ad2bb4 /tests/functional
parent1282688abc6284124f9c3163838cdfa1d7f60f62 (diff)
downloadpylint-git-02d865948d491c1e054715de1ae49b6ce14885c5.tar.gz
Fix TypedDict inherit-non-class false-positive Python 3.9+
* Closes #1927
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/t/typedDict.py18
-rw-r--r--tests/functional/t/typedDict.rc2
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/t/typedDict.py b/tests/functional/t/typedDict.py
new file mode 100644
index 000000000..9fdcee2ee
--- /dev/null
+++ b/tests/functional/t/typedDict.py
@@ -0,0 +1,18 @@
+"""Test typing.TypedDict"""
+# pylint: disable=invalid-name,missing-class-docstring,too-few-public-methods
+import typing
+from typing import TypedDict
+
+
+class CustomTD(TypedDict):
+ var: int
+
+class CustomTD2(typing.TypedDict, total=False):
+ var2: str
+
+class CustomTD3(CustomTD2):
+ var3: int
+
+CustomTD4 = TypedDict("CustomTD4", var4=bool)
+
+CustomTD5 = TypedDict("CustomTD5", {"var5": bool})
diff --git a/tests/functional/t/typedDict.rc b/tests/functional/t/typedDict.rc
new file mode 100644
index 000000000..85fc502b3
--- /dev/null
+++ b/tests/functional/t/typedDict.rc
@@ -0,0 +1,2 @@
+[testoptions]
+min_pyver=3.8