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

Deadcode breaks multiline assignments #26

Open
Freyb opened this issue Nov 15, 2024 · 0 comments
Open

Deadcode breaks multiline assignments #26

Freyb opened this issue Nov 15, 2024 · 0 comments

Comments

@Freyb
Copy link

Freyb commented Nov 15, 2024

When deadcode detects an unused variable, it only attempts to remove the line of assignment, ignoring any further lines that are connected to the assignment.

Here, I have an assignment that takes the output of a function call that was broken into multiple lines. Deadcode only tries to remove the first line, leaving the second and the third line in place, resulting in a syntactically incorrect file.

-unused_variable = function_call(
     param1, param2, param3
 )

deadcode version: 2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant