[Python] Module does not explicitly export attribute [attr-defined]

Discussão em 'Python' iniciado por Stack, Julho 23, 2025.

  1. Stack

    Stack Membro Participativo

    In bar.py foo is imported

    # bar.py
    from path import foo


    In my current file bar is imported and I use the get_id function of foo:

    from path import bar
    bar.foo.get_id()


    Mypy is complaining

    error: Module "bar" does not explicitly export attribute "foo" [attr-defined]

    Continue reading...

Compartilhe esta Página