Comments (9)
Hi, can I work on this?
from vulture.
Can't you just add del args
etc. in the method body @akhundMurad ?
from vulture.
@jendrikseipp It will make my code messy. Just imagine that each protocol method will have del
statement in it...
from vulture.
Can you paste the content of the method to get a clearer picture for the use case?
Also, is it possible to change the method signature, i.e., to change msg
to msg_
to signal that the argument is unused?
from vulture.
https://github.com/akhundMurad/diator/blob/main/src/diator/middlewares/logging.py
Here you can see the full code. I added # noqa
comment as a temporary fix.
from vulture.
Thanks! And is it possible to change the method signature, i.e., to change msg
to msg_
to signal that the argument is unused?
from vulture.
The purpose of the Protocol is to define the signature of class and its methods.
Therefore, I cannot change the argument name
from vulture.
OK, thanks. Then the best solution would be to detect that this class inherits from Protocol and ignore the unused method arguments. Doing this cleanly will probably require adding scope information to Vulture, see #304. Until then, I don't think it makes sense to tackle this issue.
from vulture.
Got it, thank you!
from vulture.
Related Issues (20)
- Multiprocessing vulture with python. HOT 1
- TOML parsing fails with multi-line strings HOT 1
- Remove files from AST tree HOT 1
- Vulture not finding code that it should be HOT 1
- False positives for TypedDicts
- Help with ignoring decorated method HOT 4
- [QUESTION] How to suppress `unused-property` error?
- finding completely dead files HOT 1
- Switch to tomli/tomllib for toml parsing HOT 2
- Feature request: A way to more specifically target items for whitelisting HOT 1
- Add a way to ignore the same files as `.gitignore` HOT 9
- False positive when an attribute uses `weakref.finalize` HOT 1
- The pre-commit autoupdate downgrades to v2.11 HOT 6
- AttributeError: 'Tuple' object has no attribute 'id' HOT 3
- Dealing with recursive functions that are only called by themselves
- The conda package for `vulture` is unmaintained HOT 6
- Confusing recursive processing of directory HOT 4
- RecursionError: maximum recursion depth exceeded HOT 5
- Wanting to contribute: is there a need for a vs code extension that helps you find the unused functions with one click? HOT 3
- Inline ignoring again HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulture.