DataDog / datadog-for-intellij-platform

Datadog for IntelliJ IDEA
https://docs.datadoghq.com/developers/ide_integrations/idea/
Other
5 stars 0 forks source link

[BUG] Python If Return No Else #26

Closed JensAstrup closed 9 months ago

JensAstrup commented 9 months ago

Describe the bug

When an if/elif statement is used and the if has a return, the plugin erroneously states that the else is not necessary because if has a return, when it should be recognizing that elif is being used which states a condition and not else.

Steps To Reproduce

  1. Write some Python with an if/elif block, ensure that the if statement has a return

Screenshot 2024-01-30 at 7 30 43 PM Screenshot 2024-01-30 at 7 30 56 PM

Expected Behavior

There should be no warning on if/elif blocks for the if no return else check

Additional Context

What versions of software are you using?

juli1 commented 9 months ago

@JensAstrup thank you for your report. Can you please check again - the bug should be fixed.

JensAstrup commented 9 months ago

Yep, it looks fixed, thanks! :)