Skip to content

Commit 0b1f16a

Browse files
committed
Replace Self with Shape. Reorder imports
1 parent 99bb06a commit 0b1f16a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/shapefile/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from .__main__ import main
1414
from .__version__ import __version__
15+
from ._doctest_runner import _replace_remote_url
1516
from .classes import Field, ShapeRecord, ShapeRecords, Shapes
1617
from .constants import (
1718
FIRST_RING,
@@ -41,7 +42,6 @@
4142
TRIANGLE_FAN,
4243
TRIANGLE_STRIP,
4344
)
44-
from ._doctest_runner import _replace_remote_url
4545
from .exceptions import GeoJSON_Error, RingSamplingError, ShapefileException
4646
from .geometric_calculations import bbox_overlap
4747
from .helpers import _Array, fsdecode_if_pathlike

src/shapefile/shapes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44
from collections.abc import Iterable, Iterator, Sequence
55
from struct import error, pack, unpack
6-
from typing import Final, Self, TypedDict, Union, cast
6+
from typing import Final, TypedDict, Union, cast
77

88
from .constants import (
99
MULTIPATCH,
@@ -394,7 +394,7 @@ def __geo_interface__(self) -> GeoJSONHomogeneousGeometryObject:
394394
)
395395

396396
@classmethod
397-
def _from_geojson(cls, geoj: GeoJSONHomogeneousGeometryObject) -> Self:
397+
def _from_geojson(cls, geoj: GeoJSONHomogeneousGeometryObject) -> Shape:
398398
# create empty shape
399399
# set shapeType
400400
geojType = geoj["type"] if geoj else "Null"

0 commit comments

Comments
 (0)