diff --git a/tests/builtin_classes.py b/tests/builtin_classes.py index 452961cd..5524ecc1 100644 --- a/tests/builtin_classes.py +++ b/tests/builtin_classes.py @@ -22,9 +22,6 @@ def test_set(self): def test_dict(self): self.assertOnlyIn(((2, 2), (3, 0)), self.detect("dict()")) - def test_type(self): - self.assertOnlyIn(((2, 2), (3, 0)), self.detect("type()")) - def test_memoryview(self): self.assertOnlyIn(((2, 7), (3, 0)), self.detect("memoryview()")) diff --git a/tests/builtin_functions.py b/tests/builtin_functions.py index 96e5d988..88f2dd8c 100644 --- a/tests/builtin_functions.py +++ b/tests/builtin_functions.py @@ -53,6 +53,9 @@ def test_super(self): # Calling without arguments requires v3 (`SourceVisitor.super_no_args()`). self.assertOnlyIn(((2, 2), (3, 0)), self.detect("super(SomeType)")) + def test_type(self): + self.assertOnlyIn(((2, 0), (3, 0)), self.detect("type()")) + def test_unichr(self): self.assertOnlyIn((2, 0), self.detect("unichr()")) diff --git a/vermin/rules.py b/vermin/rules.py index 2d657384..f80f006f 100644 --- a/vermin/rules.py +++ b/vermin/rules.py @@ -206,7 +206,6 @@ def MOD_MEM_REQS(config): "object": ((2, 2), (3, 0)), "set": ((2, 4), (3, 0)), "dict": ((2, 2), (3, 0)), - "type": ((2, 2), (3, 0)), "long": ((2, 0), None), # Classes @@ -635,6 +634,7 @@ def MOD_MEM_REQS(config): "str.zfill": ((2, 2), (3, 0)), "sum": ((2, 3), (3, 0)), "super": ((2, 2), (3, 0)), + "type": ((2, 0), (3, 0)), "unichr": ((2, 0), None), "unicode": ((2, 0), None), "unicode.isdecimal": ((2, 0), None),