question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detect dead arguments too

See original GitHub issue

Originally reported by: Wilfred Hughes (Bitbucket: Wilfred, GitHub: Wilfred)


It would be great if vulture could also detect unused arguments. For example, y is unused here:

#!python

def foo(x, y):
    return x + 1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
RJ722commented, Jun 25, 2019

@lanzz you can create a whitelist file containing a variable with same name as your argument.

For example, for the program above, the whitelist will look like this:

y
0reactions
lanzzcommented, Jun 25, 2019

Sorry for bringing a long buried issue back from the dead, but is there any way to whitelist unused function arguments? It is not always possible to rename it with a leading underscore (e.g. when a callback interface passes it as a kwarg).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Spot Those Dead End Conversations
Emotionally hostile arguments often have a recovery period of 2-3 days. Signs of a Dead-end Conversation. Here are some signs of what I...
Read more >
How to detect dead code in a frontend project - LogRocket Blog
Explore different approaches to detect dead code in your frontend project ... Second, it will tell us if there are unused arguments in...
Read more >
New warning for never used optional argument #5979 - GitHub
The idea behind it is that it helps detecting dead code, and/or makes sure ... not play too well if the function are...
Read more >
Detecting Argument Selection Defects - Google Research
We present an algorithm that uses this information to detect argument selection defects, in which the programmer has chosen the wrong argument to...
Read more >
1.2: Identifying Arguments - Humanities LibreTexts
The best way to identify whether an argument is present is to ask whether there is a statement that someone is trying to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found