Skip to content

Commit

Permalink
Merge pull request #172 from netromdk/issue-171
Browse files Browse the repository at this point in the history
Fixed versions for built-in type()
  • Loading branch information
netromdk authored Apr 4, 2023
2 parents adca326 + 8ee0f93 commit a222969
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions tests/builtin_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()"))

Expand Down
3 changes: 3 additions & 0 deletions tests/builtin_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()"))

Expand Down
2 changes: 1 addition & 1 deletion vermin/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit a222969

Please sign in to comment.