Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
mypy gives an error while importing submodule : Module has no attribute

When I am checking my modules through mypy it gives me this error:

Module 'django.contrib.gis' has no attribute 'forms'

and I am importing forms like this:

from django.contrib.gis import forms

I know it is correct but mypy shows this error message.

I could import like this: from django.contrib import gis and use forms as gis.forms but I do not want to.

Can anyone help me to fix this? Thanks.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

It appears that your problem is similar to this issue raised in mypy's github repo:

Module X has no attribute Y, since version 0.700 (works fine with 0.670)

wherein the author of the issue originally ran mypy with the following line

RUN mypy --strict ./mypackage/tests.py

and solved the problem by running mypy by adding on the --implicit-reexport flag as follows:

RUN mypy --strict --implicit-reexport ./mypackage/tests.py

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda