Skip to content

[used-before-assignment] False positive for "same test" exception when test is a walrus operator #10061

Description

@jacobtylerwalls

Primer run on #10034 exposed a false positive we can address separately:


Effect on home-assistant:
The following messages are now emitted:

Details
  1. possibly-used-before-assignment:
    Possibly using variable 'touch_event_callback' before assignment
    https://github.com/home-assistant/core/blob/b09e54c961db279785b75b5c3d192624b3d65664/homeassistant/components/nanoleaf/__init__.py#L77

This comment was generated for commit d7ddc89

Originally posted by @github-actions[bot] in #10034 (comment)

Metadata

Metadata

Labels

C: used-before-assignmentIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions