Skip to content

Audit remaining uses of TYPING_TYPE_CHECKS_GUARDS #7539

Closed
@jacobtylerwalls

Description

@jacobtylerwalls

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: used-before-assignmentIssues related to 'used-before-assignment' checkFalse Negative 🦋No message is emitted but something is wrong with the code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions