From 9855917e054b0490ce28f7564c98329abb617f65 Mon Sep 17 00:00:00 2001 From: Peter Von der Porten Date: Wed, 20 May 2026 11:35:32 -0700 Subject: [PATCH 1/2] `__all__` must be a sequence of strings --- geojson/__init__.py | 29 +++++++++++++++++++++-------- geojson/factory.py | 17 ++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/geojson/__init__.py b/geojson/__init__.py index 18d1532..7453b3c 100644 --- a/geojson/__init__.py +++ b/geojson/__init__.py @@ -7,11 +7,24 @@ from geojson.base import GeoJSON from geojson._version import __version__, __version_info__ -__all__ = ([dump, dumps, load, loads, GeoJSONEncoder] + - [coords, map_coords] + - [Point, LineString, Polygon] + - [MultiLineString, MultiPoint, MultiPolygon] + - [GeometryCollection] + - [Feature, FeatureCollection] + - [GeoJSON] + - [__version__, __version_info__]) +__all__ = [ + "dump", + "dumps", + "load", + "loads", + "GeoJSONEncoder", + "coords", + "map_coords", + "Point", + "LineString", + "Polygon", + "MultiLineString", + "MultiPoint", + "MultiPolygon", + "GeometryCollection", + "Feature", + "FeatureCollection", + "GeoJSON", + "__version__", + "__version_info__", +] diff --git a/geojson/factory.py b/geojson/factory.py index b8090bb..ebd54ff 100644 --- a/geojson/factory.py +++ b/geojson/factory.py @@ -4,8 +4,15 @@ from geojson.feature import Feature, FeatureCollection from geojson.base import GeoJSON -__all__ = ([Point, LineString, Polygon] + - [MultiLineString, MultiPoint, MultiPolygon] + - [GeometryCollection] + - [Feature, FeatureCollection] + - [GeoJSON]) +__all__ = [ + "Point", + "LineString", + "Polygon", + "MultiLineString", + "MultiPoint", + "MultiPolygon", + "GeometryCollection", + "Feature", + "FeatureCollection", + "GeoJSON", +] From a43407f82fcb1fca6583a0706c37ec6a21b0b719 Mon Sep 17 00:00:00 2001 From: p-vdp Date: Thu, 28 May 2026 13:32:25 -0700 Subject: [PATCH 2/2] Revert sequence style --- geojson/__init__.py | 31 ++++++++++--------------------- geojson/factory.py | 19 +++++++------------ 2 files changed, 17 insertions(+), 33 deletions(-) diff --git a/geojson/__init__.py b/geojson/__init__.py index 7453b3c..d0cc47b 100644 --- a/geojson/__init__.py +++ b/geojson/__init__.py @@ -7,24 +7,13 @@ from geojson.base import GeoJSON from geojson._version import __version__, __version_info__ -__all__ = [ - "dump", - "dumps", - "load", - "loads", - "GeoJSONEncoder", - "coords", - "map_coords", - "Point", - "LineString", - "Polygon", - "MultiLineString", - "MultiPoint", - "MultiPolygon", - "GeometryCollection", - "Feature", - "FeatureCollection", - "GeoJSON", - "__version__", - "__version_info__", -] +__all__ = ( + ["dump", "dumps", "load", "loads", "GeoJSONEncoder"] + + ["coords", "map_coords"] + + ["Point", "LineString", "Polygon"] + + ["MultiLineString", "MultiPoint", "MultiPolygon"] + + ["GeometryCollection"] + + ["Feature", "FeatureCollection"] + + ["GeoJSON"] + + ["__version__", "__version_info__"] +) diff --git a/geojson/factory.py b/geojson/factory.py index ebd54ff..ee8dffc 100644 --- a/geojson/factory.py +++ b/geojson/factory.py @@ -4,15 +4,10 @@ from geojson.feature import Feature, FeatureCollection from geojson.base import GeoJSON -__all__ = [ - "Point", - "LineString", - "Polygon", - "MultiLineString", - "MultiPoint", - "MultiPolygon", - "GeometryCollection", - "Feature", - "FeatureCollection", - "GeoJSON", -] +__all__ = ( + ["Point", "LineString", "Polygon"] + + ["MultiLineString", "MultiPoint", "MultiPolygon"] + + ["GeometryCollection"] + + ["Feature", "FeatureCollection"] + + ["GeoJSON"] +)