Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda