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

Add support for del keyword for overridden functions #279

Merged
merged 3 commits into from
May 19, 2022

Conversation

sshishov
Copy link
Contributor

@sshishov sshishov commented Apr 22, 2022

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:

  • I have updated the documentation in the README.md file or my changes don't require an update.
  • I have added an entry in CHANGELOG.md.
  • I have added or adapted tests to cover my changes.
  • I have run tox -e fix-style to format my code and checked the result with tox -e style.

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2022

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 sshishov force-pushed the ss/add-support-del-keyword branch from e4c388f to 14b7750 Compare April 22, 2022 06:34
Copy link
Owner

@jendrikseipp jendrikseipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Could you also describe this new recommendation for handling unused function arguments and its benefits in the README, please?

CHANGELOG.md Outdated Show resolved Hide resolved
@sshishov sshishov force-pushed the ss/add-support-del-keyword branch from 14b7750 to 13951ee Compare May 18, 2022 08:30
@sshishov
Copy link
Contributor Author

Going to update the README and rebase from latest master.

@sshishov sshishov force-pushed the ss/add-support-del-keyword branch 2 times, most recently from cc84e6f to fb659b0 Compare May 18, 2022 08:48
@sshishov sshishov force-pushed the ss/add-support-del-keyword branch from fb659b0 to 4c2ce60 Compare May 18, 2022 08:50
@sshishov
Copy link
Contributor Author

@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 jendrikseipp merged commit ff9fb4c into jendrikseipp:master May 19, 2022
@jendrikseipp
Copy link
Owner

Thanks for the revisions!

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

Successfully merging this pull request may close these issues.

3 participants