Skip to content

Commit 48f53a3

Browse files
committed
.
1 parent 3ef3702 commit 48f53a3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mypy/stubtest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,18 +488,17 @@ def _shape_differs(t1: type[object], t2: type[object]) -> bool:
488488
)
489489
t_size = t1.__basicsize__
490490
if (
491-
# TODO: better understanding of attributes of type objects
492-
not t2.__weakrefoffset__ # static analysis: ignore[value_always_true]
491+
not t2.__weakrefoffset__
493492
and t1.__weakrefoffset__ + SIZEOF_PYOBJECT == t_size
494493
):
495494
t_size -= SIZEOF_PYOBJECT
496495
if (
497-
not t2.__dictoffset__ # static analysis: ignore[value_always_true]
496+
not t2.__dictoffset__
498497
and t1.__dictoffset__ + SIZEOF_PYOBJECT == t_size
499498
):
500499
t_size -= SIZEOF_PYOBJECT
501500
if (
502-
not t2.__weakrefoffset__ # static analysis: ignore[value_always_true]
501+
not t2.__weakrefoffset__
503502
and t2.__weakrefoffset__ == t_size
504503
):
505504
t_size -= SIZEOF_PYOBJECT

0 commit comments

Comments
 (0)