Skip to content

Commit

Permalink
Remove unneccesory re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Jan 4, 2023
1 parent b7858ad commit dc5ff7a
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 48 deletions.
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/admin/options.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from django.contrib.admin import ModelAdmin as ModelAdmin
from django.contrib.admin import ModelAdmin
from django.contrib.gis.forms import BaseGeometryWidget

spherical_mercator_srid: int
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/apps.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from django.apps import AppConfig as AppConfig
from django.apps import AppConfig

class GISConfig(AppConfig): ...
6 changes: 3 additions & 3 deletions django-stubs/contrib/gis/gdal/datasource.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Any

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.driver import Driver as Driver
from django.contrib.gis.gdal.layer import Layer as Layer
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.driver import Driver
from django.contrib.gis.gdal.layer import Layer

class DataSource(GDALBase):
destructor: Any
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/gdal/driver.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.base import GDALBase

class Driver(GDALBase):
ptr: Any
Expand Down
8 changes: 4 additions & 4 deletions django-stubs/contrib/gis/gdal/feature.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.field import Field as Field
from django.contrib.gis.gdal.geometries import OGRGeometry as OGRGeometry
from django.contrib.gis.gdal.geomtype import OGRGeomType as OGRGeomType
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry
from django.contrib.gis.gdal.geomtype import OGRGeomType

class Feature(GDALBase):
destructor: Any
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/gdal/field.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.base import GDALBase

class Field(GDALBase):
ptr: Any
Expand Down
6 changes: 3 additions & 3 deletions django-stubs/contrib/gis/gdal/geometries.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any, AnyStr

from django.contrib.gis.gdal import CoordTransform, SpatialReference
from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.envelope import Envelope as Envelope
from django.contrib.gis.gdal.geomtype import OGRGeomType as OGRGeomType
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.envelope import Envelope
from django.contrib.gis.gdal.geomtype import OGRGeomType
from django.contrib.gis.geos import GEOSGeometry

class OGRGeometry(GDALBase):
Expand Down
16 changes: 8 additions & 8 deletions django-stubs/contrib/gis/gdal/layer.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from collections.abc import Iterator
from typing import Any, AnyStr, overload

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.envelope import Envelope as Envelope
from django.contrib.gis.gdal.feature import Feature as Feature
from django.contrib.gis.gdal.field import Field as Field
from django.contrib.gis.gdal.geometries import OGRGeometry as OGRGeometry
from django.contrib.gis.gdal.geomtype import OGRGeomType as OGRGeomType
from django.contrib.gis.gdal.srs import SpatialReference as SpatialReference
from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.envelope import Envelope
from django.contrib.gis.gdal.feature import Feature
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry
from django.contrib.gis.gdal.geomtype import OGRGeomType
from django.contrib.gis.gdal.srs import SpatialReference
from django.contrib.gis.geos.geometry import GEOSGeometry
from typing_extensions import Literal

class Layer(GDALBase):
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/gdal/raster/band.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, overload

from django.contrib.gis.gdal.raster.base import GDALRasterBase as GDALRasterBase
from django.contrib.gis.gdal.raster.base import GDALRasterBase
from typing_extensions import Literal

class GDALBand(GDALRasterBase):
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/gdal/raster/base.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.base import GDALBase

class GDALRasterBase(GDALBase):
@property
Expand Down
8 changes: 4 additions & 4 deletions django-stubs/contrib/gis/gdal/raster/source.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from collections.abc import Sequence
from typing import Any

from django.contrib.gis.gdal.driver import Driver as Driver
from django.contrib.gis.gdal.raster.band import BandList as BandList
from django.contrib.gis.gdal.raster.base import GDALRasterBase as GDALRasterBase
from django.contrib.gis.gdal.srs import SpatialReference as SpatialReference
from django.contrib.gis.gdal.driver import Driver
from django.contrib.gis.gdal.raster.band import BandList
from django.contrib.gis.gdal.raster.base import GDALRasterBase
from django.contrib.gis.gdal.srs import SpatialReference

class TransformPoint(list[Sequence[float]]):
indices: dict[str, tuple[int, int]]
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/gdal/srs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from enum import IntEnum
from typing import Any, AnyStr

from _typeshed import Self
from django.contrib.gis.gdal.base import GDALBase as GDALBase
from django.contrib.gis.gdal.base import GDALBase

class AxisOrder(IntEnum):
TRADITIONAL: int
Expand Down
3 changes: 1 addition & 2 deletions django-stubs/contrib/gis/geos/collections.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from collections.abc import Iterator
from typing import Any

from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
from django.contrib.gis.geos.geometry import LinearGeometryMixin as LinearGeometryMixin
from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin

class GeometryCollection(GEOSGeometry):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/geos/coordseq.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from collections.abc import Iterator
from typing import Any

from _typeshed import Self
from django.contrib.gis.geos.base import GEOSBase as GEOSBase
from django.contrib.gis.geos.base import GEOSBase

class GEOSCoordSeq(GEOSBase):
ptr_type: Any
Expand Down
11 changes: 4 additions & 7 deletions django-stubs/contrib/gis/geos/geometry.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ from typing import Any
from _typeshed import Self
from django.contrib.gis.gdal import CoordTransform, SpatialReference
from django.contrib.gis.gdal.geometries import OGRGeometry
from django.contrib.gis.geometry import hex_regex as hex_regex # noqa: F401
from django.contrib.gis.geometry import json_regex as json_regex
from django.contrib.gis.geometry import wkt_regex as wkt_regex
from django.contrib.gis.geos.base import GEOSBase as GEOSBase
from django.contrib.gis.geos.coordseq import GEOSCoordSeq as GEOSCoordSeq
from django.contrib.gis.geos.mutable_list import ListMixin as ListMixin
from django.contrib.gis.geos.base import GEOSBase
from django.contrib.gis.geos.coordseq import GEOSCoordSeq
from django.contrib.gis.geos.mutable_list import ListMixin
from django.contrib.gis.geos.point import Point
from django.contrib.gis.geos.prepared import PreparedGeometry as PreparedGeometry
from django.contrib.gis.geos.prepared import PreparedGeometry

class GEOSGeometryBase(GEOSBase):
ptr_type: Any
Expand Down
3 changes: 1 addition & 2 deletions django-stubs/contrib/gis/geos/linestring.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from collections.abc import Iterator
from typing import Any

from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
from django.contrib.gis.geos.geometry import LinearGeometryMixin as LinearGeometryMixin
from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin

class LineString(LinearGeometryMixin, GEOSGeometry):
has_cs: bool
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/contrib/gis/geos/point.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections.abc import Iterator
from typing import Any

from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
from django.contrib.gis.geos.geometry import GEOSGeometry

class Point(GEOSGeometry):
has_cs: bool
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/contrib/gis/geos/polygon.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from collections.abc import Iterator
from typing import Any

from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry
from django.contrib.gis.geos.linestring import LinearRing as LinearRing
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos.linestring import LinearRing

class Polygon(GEOSGeometry):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/contrib/gis/geos/prepared.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

from .base import GEOSBase as GEOSBase
from .geometry import GEOSGeometry as GEOSGeometry
from .base import GEOSBase
from .geometry import GEOSGeometry

class PreparedGeometry(GEOSBase):
ptr_type: Any
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/contrib/gis/utils/layermapping.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ from collections.abc import Mapping
from pathlib import Path
from typing import Any, Protocol

import django.contrib.gis.gdal.field
from django.contrib.gis.gdal import DataSource, OGRGeomType
from django.contrib.gis.gdal.field import Field as OGRField
from django.contrib.gis.gdal.layer import Layer
from django.db.backends.base.operations import BaseDatabaseOperations
from django.db.models import Field, Model
Expand All @@ -19,7 +19,7 @@ class _Writer(Protocol):

class LayerMapping:
MULTI_TYPES: dict[int, OGRGeomType]
FIELD_TYPES: dict[Field, OGRField | tuple[OGRField, ...]]
FIELD_TYPES: dict[Field, django.contrib.gis.gdal.field.Field | tuple[django.contrib.gis.gdal.field.Field, ...]]
ds: DataSource
layer: Layer
using: str
Expand Down

0 comments on commit dc5ff7a

Please sign in to comment.