From 0449c55a8e1965006bab059d82522606e780d6a2 Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Mon, 5 Aug 2024 07:15:00 -0700 Subject: [PATCH] image.py: Add native ee types to type aliases for ImageCollection, Image, and List PiperOrigin-RevId: 659543806 --- python/ee/image.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/python/ee/image.py b/python/ee/image.py index b51c9b0e7..d69320ea4 100644 --- a/python/ee/image.py +++ b/python/ee/image.py @@ -30,6 +30,7 @@ from ee import featurecollection from ee import function from ee import geometry +from ee import imagecollection from ee import kernel from ee import projection from ee import reducer @@ -62,11 +63,15 @@ Any, featurecollection.FeatureCollection, computedobject.ComputedObject ] _GeometryType = Union[Any, computedobject.ComputedObject] -_ImageCollectionType = Union[Any, computedobject.ComputedObject] -_ImageType = Union[Any, computedobject.ComputedObject] +_ImageCollectionType = Union[ + Any, imagecollection.ImageCollection, computedobject.ComputedObject +] +_ImageType = Union[Any, 'Image', computedobject.ComputedObject] _IntegerType = Union[int, 'ee_number.Number', computedobject.ComputedObject] _KernelType = Union[kernel.Kernel, computedobject.ComputedObject] -_ListType = Union[List[Any], Tuple[Any, Any], computedobject.ComputedObject] +_ListType = Union[ + List[Any], Tuple[Any, Any], 'ee_list.List', computedobject.ComputedObject +] _NumberType = Union[float, 'ee_number.Number', computedobject.ComputedObject] _ProjectionType = Union[ str,