Code Monkey home page Code Monkey logo

Comments (9)

pm3512 avatar pm3512 commented on July 17, 2024

Hi, can I work on this?

from vulture.

jendrikseipp avatar jendrikseipp commented on July 17, 2024

Can't you just add del args etc. in the method body @akhundMurad ?

from vulture.

akhundMurad avatar akhundMurad commented on July 17, 2024

@jendrikseipp It will make my code messy. Just imagine that each protocol method will have del statement in it...

from vulture.

jendrikseipp avatar jendrikseipp commented on July 17, 2024

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.

akhundMurad avatar akhundMurad commented on July 17, 2024

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.

jendrikseipp avatar jendrikseipp commented on July 17, 2024

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.

akhundMurad avatar akhundMurad commented on July 17, 2024

The purpose of the Protocol is to define the signature of class and its methods.
Therefore, I cannot change the argument name

from vulture.

jendrikseipp avatar jendrikseipp commented on July 17, 2024

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.

akhundMurad avatar akhundMurad commented on July 17, 2024

Got it, thank you!

from vulture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.