[Python] Silence PyLint warning about unused variables for string interpolation

Discussão em 'Python' iniciado por Stack, Dezembro 7, 2024.

  1. Stack

    Stack Membro Participativo

    The say module brings string interpolation to Python, like this:

    import say

    def f(a):
    return say.fmt("The value of 'a' is {a}")


    However, PyLint complains that the variable 'a' is never used. This is a problem because my code uses say.fmt extensively. How can I silence this warning?

    Continue reading...

Compartilhe esta Página