Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jacobtylerwalls opened this issue Nov 3, 2024 · 0 comments · Fixed by #10062
Assignees
Labels
C: used-before-assignment Issues related to 'used-before-assignment' check False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Milestone

Comments

@jacobtylerwalls
Copy link
Member

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


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

  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)

@jacobtylerwalls jacobtylerwalls self-assigned this Nov 3, 2024
@jacobtylerwalls jacobtylerwalls added this to the 3.3.2 milestone Nov 3, 2024
@jacobtylerwalls jacobtylerwalls added False Positive 🦟 A message is emitted but nothing is wrong with the code C: used-before-assignment Issues related to 'used-before-assignment' check Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Nov 3, 2024
@jacobtylerwalls jacobtylerwalls modified the milestones: 3.3.2, 4.0.0 Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: used-before-assignment Issues related to 'used-before-assignment' check False Positive 🦟 A message is emitted but nothing is wrong with the code Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant