-
Notifications
You must be signed in to change notification settings - Fork 156
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
Wrong processing of typing.Protocol #309
Comments
Hi, can I work on this? |
Can't you just add |
@jendrikseipp It will make my code messy. Just imagine that each protocol method will have |
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 |
https://github.com/akhundMurad/diator/blob/main/src/diator/middlewares/logging.py Here you can see the full code. I added |
Thanks! And is it possible to change the method signature, i.e., to change |
The purpose of the Protocol is to define the signature of class and its methods. |
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. |
Got it, thank you! |
Suppose I have protocol class:
After execution of vulture I get the following output:
In my opinion, vulture should ignore this type of "confidence", due to the nature of typing.Protocol
The text was updated successfully, but these errors were encountered: