diff --git a/dev-requirements.txt b/dev-requirements.txt index 969332a..26f44cc 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -8,7 +8,7 @@ fastapi==0.100.0 iniconfig==2.0.0 isort==5.12.0 mypy-extensions==1.0.0 -mypy==1.5.1 +mypy==1.6.0 packaging==23.1 pathspec==0.11.2 platformdirs==3.11.0 diff --git a/refurb/checks/readability/no_or_default.py b/refurb/checks/readability/no_or_default.py index 148dbcb..352dc54 100644 --- a/refurb/checks/readability/no_or_default.py +++ b/refurb/checks/readability/no_or_default.py @@ -88,7 +88,9 @@ def check(node: OpExpr, errors: list[Error]) -> None: return type_name = ( - "builtins.tuple" if str(ty).lower() == "tuple[]" else str(ty) + "builtins.tuple" + if str(ty).lower().startswith("tuple[") + else str(ty) ) # Must check fullname for compatibility with older Mypy versions