Module "geojson_pydantic" does not explicitly export attribute "Polygon"; implicit reexport disabled
farridav opened this issue · 2 comments
farridav commented
When using this package in the following way:
from geojson_pydantic import Feature, Polygon
from pydantic import BaseModel
class MyModel(BaseModel):
geojson: Feature[Polygon, dict]
and running mypy
i seem to get the following errors:
schemas.py:5: error: Module "geojson_pydantic" does not explicitly export attribute "Feature"; implicit reexport disabled
from geojson_pydantic import Feature, Polygon
^
schemas.py:5: error: Module "geojson_pydantic" does not explicitly export attribute "Polygon"; implicit reexport disabled
from geojson_pydantic import Feature, Polygon
^
Found 2 errors in 1 file (checked 8 source files)
Am i using this in the right way ? the code behaves as expected, but the type declaration doesnt like me using the types from the main package, should i explicitly import them from their source location ?
geospatial-jeff commented
I think this is happening because we aren't using __all__
to specify what is exported by each module. This would be a good addition.