Closed
Description
Along the lines of #7524 and #6787, there is probably a false positive for used-before-assignment
/unused-variable
lurking in the use of defstmt_parent.test.as_string() in TYPING_TYPE_CHECKS_GUARDS
, which is not robust against importing typing
under an alias.
I advised us against doing a drop-in replacement by in_type_checking_block
without writing more tests. For discussion on that see #7525 (comment).
To close this issue, we need a contributor to write a regression test that fails on main
and ideally a test that also would have failed if we had taken the simple approach of just doing the drop-in replacement in #7525 (comment).