Project- Removing dead code in Python with Vulture

6 / 7

Invoke Vulture to detect dead code

Finally, we will call vulture to detect the dead code in the dead_code.py script.

INSTRUCTIONS
  • Call Vulture to detect the dead code

    vulture dead_code.py
    

    Observe the results. It gives the file name, line number which contains the dead code, the code itself, and finally the probability of that code being a dead code. Due to Python's dynamic nature, static code analyzers like Vulture are likely to miss some dead code. Also, code that is only called implicitly may be reported as unused. Nonetheless, Vulture can be a very helpful tool for higher code quality.

  • What is the probability percentage for the following line of code being a dead code as given by Vulture?

    import os
    

    %

See Answer

No hints are availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...