Skip to content

Commit 87fcd07

Browse files
authored
Remove python2 logic from checkmember.py (#13246)
1 parent c7861ca commit 87fcd07

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mypy/checkmember.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,7 @@ def analyze_union_member_access(name: str, typ: UnionType, mx: MemberContext) ->
410410

411411

412412
def analyze_none_member_access(name: str, typ: NoneType, mx: MemberContext) -> Type:
413-
is_python_3 = mx.chk.options.python_version[0] >= 3
414-
# In Python 2 "None" has exactly the same attributes as "object". Python 3 adds a single
415-
# extra attribute, "__bool__".
416-
if is_python_3 and name == "__bool__":
413+
if name == "__bool__":
417414
literal_false = LiteralType(False, fallback=mx.named_type("builtins.bool"))
418415
return CallableType(
419416
arg_types=[],

0 commit comments

Comments
 (0)