jendrikseipp / vulture

Find dead Python code
MIT License
3.38k stars 148 forks source link

Add support for `del` keyword for overridden functions #279

Closed sshishov closed 2 years ago

sshishov commented 2 years ago

Currently if you override the function of any framework or any library and you are not using all parameters, then the parameters which are not used are identified as unused. It is good practice while overriding function/method to keep the signature of it intact. Otherwise you can get potentially some issues with next releases etc.

Description

Adding support for del operation inside the function. The keyword del will mark the variable as used now and we can safely implement the suggested workaround.

Related Issue

This PR is addressing the issue #278

Checklist:

codecov-commenter commented 2 years ago

Codecov Report

Merging #279 (4c2ce60) into master (bbef855) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #279   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files          18       18           
  Lines         635      635           
=======================================
  Hits          631      631           
  Misses          4        4           
Impacted Files Coverage Δ
vulture/core.py 99.37% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bbef855...4c2ce60. Read the comment docs.

sshishov commented 2 years ago

Going to update the README and rebase from latest master.

sshishov commented 2 years ago

@jendrikseipp I have updated the README file. Could you please check? If you have better wording, please provide here, I will kindly make the changes.

jendrikseipp commented 2 years ago

Thanks for the revisions!