Skip to content

Commit

Permalink
Add ee_list.List to all _ListType aliases.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 659946097
  • Loading branch information
schwehr authored and Google Earth Engine Authors committed Aug 6, 2024
1 parent 81cc456 commit 56b2004
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 12 deletions.
8 changes: 6 additions & 2 deletions python/ee/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
from ee import featurecollection

_EeBoolType = Union[Any, computedobject.ComputedObject]
_FeatureCollectionType = Union[Any, featurecollection.FeatureCollection, computedobject.ComputedObject]
_FeatureCollectionType = Union[
Any, featurecollection.FeatureCollection, computedobject.ComputedObject
]
_IntegerType = Union[int, 'ee_number.Number', 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]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]

Expand Down
4 changes: 3 additions & 1 deletion python/ee/confusionmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
from ee import ee_number

_ConfusionMatrixType = Union['ConfusionMatrix', 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]


Expand Down
4 changes: 3 additions & 1 deletion python/ee/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
# TODO: Make a better type for a list of keys.
_EeKeyListType = _EeAnyType
_IntegerType = Union[int, 'ee_number.Number', computedobject.ComputedObject]
_ListType = Union[List[Any], Tuple[Any, Any], computedobject.ComputedObject]
_ListType = Union[
List[Any], Tuple[Any, Any], 'ee_list.List', computedobject.ComputedObject
]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]
# TODO: Make a better type for a list of strings.
# Or is this the same as _EeKeyListType?
Expand Down
4 changes: 3 additions & 1 deletion python/ee/ee_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
]
_EeAnyType = Union[Any, computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]

Expand Down
5 changes: 4 additions & 1 deletion python/ee/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ee import dictionary
from ee import ee_array
from ee import ee_exception
from ee import ee_list
from ee import ee_number
from ee import ee_string
from ee import element
Expand All @@ -26,7 +27,9 @@
]
_GeometryType = Union[Any, computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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,
Expand Down
4 changes: 3 additions & 1 deletion python/ee/featurecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
computedobject.ComputedObject,
]
_IntegerType = Union[int, 'ee_number.Number', 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]
_ReducerType = Union[reducer.Reducer, computedobject.ComputedObject]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]
Expand Down
5 changes: 4 additions & 1 deletion python/ee/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ee import computedobject
from ee import ee_date
from ee import ee_exception
from ee import ee_list
from ee import ee_number
from ee import ee_string
from ee import errormargin
Expand All @@ -37,7 +38,9 @@
_FilterType = Union['Filter', computedobject.ComputedObject]
_GeometryType = Union[Any, computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]

Expand Down
4 changes: 3 additions & 1 deletion python/ee/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
]
_GeometryType = Union[Any, computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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,
Expand Down
4 changes: 3 additions & 1 deletion python/ee/imagecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
Any, 'ImageCollection', computedobject.ComputedObject
]
_IntegerType = Union[int, ee_number.Number, 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,
Expand Down
5 changes: 4 additions & 1 deletion python/ee/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from ee import apifunction
from ee import computedobject
from ee import dictionary
from ee import ee_list
from ee import ee_number
from ee import ee_string
from ee import featurecollection
Expand All @@ -24,7 +25,9 @@
]
_ImageType = Union[Any, image.Image, computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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,
Expand Down
4 changes: 3 additions & 1 deletion python/ee/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
_EeBoolType = Union[Any, computedobject.ComputedObject]
_ImageType = Union[Any, 'image.Image', computedobject.ComputedObject]
_IntegerType = Union[int, 'ee_number.Number', 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]
_ReducerType = Union['Reducer', computedobject.ComputedObject]
_StringType = Union[str, 'ee_string.String', computedobject.ComputedObject]
Expand Down

0 comments on commit 56b2004

Please sign in to comment.