earthengine-api 1.5.23__tar.gz → 1.5.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of earthengine-api might be problematic. Click here for more details.

Files changed (113) hide show
  1. {earthengine_api-1.5.23/earthengine_api.egg-info → earthengine_api-1.5.24}/PKG-INFO +1 -1
  2. {earthengine_api-1.5.23 → earthengine_api-1.5.24/earthengine_api.egg-info}/PKG-INFO +1 -1
  3. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/__init__.py +3 -3
  4. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/_arg_types.py +6 -6
  5. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/_cloud_api_utils.py +35 -35
  6. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/_helpers.py +2 -2
  7. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/apifunction.py +10 -10
  8. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/apitestcase.py +9 -9
  9. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/batch.py +39 -39
  10. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/blob.py +2 -2
  11. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/cli/commands.py +15 -15
  12. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/cli/utils.py +5 -5
  13. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/collection.py +3 -3
  14. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/computedobject.py +6 -6
  15. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/confusionmatrix.py +2 -2
  16. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/customfunction.py +8 -8
  17. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/data.py +55 -55
  18. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/daterange.py +2 -2
  19. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/deprecation.py +4 -4
  20. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/dictionary.py +2 -2
  21. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_array.py +2 -2
  22. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_date.py +2 -2
  23. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_list.py +2 -3
  24. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/element.py +3 -3
  25. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/errormargin.py +2 -2
  26. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/feature.py +5 -5
  27. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/featurecollection.py +5 -5
  28. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/function.py +5 -5
  29. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/geometry.py +10 -10
  30. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/image.py +19 -19
  31. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/image_converter.py +2 -2
  32. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/imagecollection.py +7 -7
  33. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/oauth.py +4 -4
  34. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/pixeltype.py +2 -2
  35. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/projection.py +2 -2
  36. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/serializer.py +5 -5
  37. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/table_converter.py +4 -4
  38. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/blob_test.py +3 -3
  39. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/classifier_test.py +3 -3
  40. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/clusterer_test.py +3 -3
  41. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/confusionmatrix_test.py +3 -3
  42. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/daterange_test.py +4 -4
  43. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/deprecation_test.py +2 -2
  44. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/dictionary_test.py +3 -3
  45. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_array_test.py +3 -3
  46. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_date_test.py +4 -4
  47. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_list_test.py +3 -3
  48. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_number_test.py +3 -3
  49. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_string_test.py +3 -3
  50. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/feature_test.py +4 -4
  51. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/featurecollection_test.py +3 -3
  52. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/filter_test.py +4 -4
  53. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/geometry_point_test.py +3 -3
  54. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/image_test.py +3 -3
  55. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/imagecollection_test.py +3 -3
  56. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/join_test.py +3 -3
  57. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/kernel_test.py +3 -3
  58. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/model_test.py +5 -5
  59. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/pixeltype_test.py +5 -5
  60. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/projection_test.py +3 -3
  61. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/reducer_test.py +3 -3
  62. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/serializer_test.py +4 -4
  63. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/table_converter_test.py +3 -3
  64. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/terrain_test.py +3 -3
  65. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/pyproject.toml +1 -1
  66. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/LICENSE +0 -0
  67. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/MANIFEST.in +0 -0
  68. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/README.md +0 -0
  69. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/earthengine_api.egg-info/SOURCES.txt +0 -0
  70. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/earthengine_api.egg-info/dependency_links.txt +0 -0
  71. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/earthengine_api.egg-info/entry_points.txt +0 -0
  72. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/earthengine_api.egg-info/requires.txt +0 -0
  73. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/earthengine_api.egg-info/top_level.txt +0 -0
  74. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/_utils.py +0 -0
  75. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/classifier.py +0 -0
  76. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/cli/__init__.py +0 -0
  77. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/cli/eecli.py +0 -0
  78. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/cli/eecli_wrapper.py +0 -0
  79. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/clusterer.py +0 -0
  80. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/deserializer.py +0 -0
  81. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_exception.py +0 -0
  82. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_number.py +0 -0
  83. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_string.py +0 -0
  84. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/ee_types.py +0 -0
  85. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/encodable.py +0 -0
  86. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/filter.py +0 -0
  87. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/join.py +0 -0
  88. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/kernel.py +0 -0
  89. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/mapclient.py +0 -0
  90. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/model.py +0 -0
  91. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/py.typed +0 -0
  92. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/reducer.py +0 -0
  93. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/terrain.py +0 -0
  94. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/_cloud_api_utils_test.py +0 -0
  95. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/_helpers_test.py +0 -0
  96. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/_utils_test.py +0 -0
  97. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/algorithms.json +0 -0
  98. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/apifunction_test.py +0 -0
  99. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/batch_test.py +0 -0
  100. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/cloud_api_discovery_document.json +0 -0
  101. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/collection_test.py +0 -0
  102. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/computedobject_test.py +0 -0
  103. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/data_test.py +0 -0
  104. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/deserializer_test.py +0 -0
  105. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_test.py +0 -0
  106. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/ee_types_test.py +0 -0
  107. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/element_test.py +0 -0
  108. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/errormargin_test.py +0 -0
  109. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/function_test.py +0 -0
  110. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/geometry_test.py +0 -0
  111. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/image_converter_test.py +0 -0
  112. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/ee/tests/oauth_test.py +0 -0
  113. {earthengine_api-1.5.23 → earthengine_api-1.5.24}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.5.23
3
+ Version: 1.5.24
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.5.23
3
+ Version: 1.5.24
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.5.23'
3
+ __version__ = '1.5.24'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
@@ -10,7 +10,7 @@ import datetime
10
10
  import inspect
11
11
  import os
12
12
  import re
13
- from typing import Any, Hashable, List as ListType, Optional, Sequence, Tuple, Type, Union
13
+ from typing import Any, Hashable, Optional, Sequence, Type, Union
14
14
 
15
15
  from google.oauth2 import service_account
16
16
 
@@ -66,7 +66,7 @@ from .terrain import Terrain
66
66
  _HAS_DYNAMIC_ATTRIBUTES = True
67
67
 
68
68
  # A list of autogenerated class names added by _InitializeGeneratedClasses.
69
- _generatedClasses: ListType[str] = []
69
+ _generatedClasses: list[str] = []
70
70
 
71
71
  NO_PROJECT_EXCEPTION = ('ee.Initialize: no project found. Call with project='
72
72
  ' or see http://goo.gle/ee-auth.')
@@ -2,7 +2,7 @@
2
2
  from __future__ import annotations
3
3
 
4
4
  import datetime
5
- from typing import Any as AnyType, Dict, List as ListType, Sequence, Tuple, Union
5
+ from typing import Any as AnyType, Sequence, Union
6
6
 
7
7
  from ee import classifier
8
8
  from ee import clusterer
@@ -27,7 +27,7 @@ from ee import reducer
27
27
 
28
28
  Array = Union[
29
29
  AnyType,
30
- ListType[AnyType],
30
+ list[AnyType],
31
31
  ee_array.Array,
32
32
  ee_list.List,
33
33
  computedobject.ComputedObject,
@@ -43,7 +43,7 @@ Date = Union[
43
43
  ]
44
44
  DateRange = Union[daterange.DateRange, computedobject.ComputedObject]
45
45
  Dictionary = Union[
46
- Dict[AnyType, AnyType],
46
+ dict[AnyType, AnyType],
47
47
  Sequence[AnyType],
48
48
  dictionary.Dictionary,
49
49
  computedobject.ComputedObject,
@@ -68,9 +68,9 @@ ImageCollection = Union[
68
68
  Integer = Union[int, ee_number.Number, computedobject.ComputedObject]
69
69
  Kernel = Union[kernel.Kernel, computedobject.ComputedObject]
70
70
  List = Union[
71
- ListType[AnyType],
72
- Tuple[()],
73
- Tuple[AnyType, AnyType],
71
+ list[AnyType],
72
+ tuple[()],
73
+ tuple[AnyType, AnyType],
74
74
  ee_list.List,
75
75
  computedobject.ComputedObject,
76
76
  ]
@@ -11,7 +11,7 @@ import datetime
11
11
  import json
12
12
  import os
13
13
  import re
14
- from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
14
+ from typing import Any, Callable, Optional, Sequence, Type, Union
15
15
  import warnings
16
16
 
17
17
  import google_auth_httplib2
@@ -54,10 +54,10 @@ class _Http:
54
54
  uri: str,
55
55
  method: str = 'GET',
56
56
  body: Optional[str] = None,
57
- headers: Optional[Dict[str, str]] = None,
57
+ headers: Optional[dict[str, str]] = None,
58
58
  redirections: Optional[int] = None,
59
59
  connection_type: Optional[Type[Any]] = None,
60
- ) -> Tuple[httplib2.Response, Any]:
60
+ ) -> tuple[httplib2.Response, Any]:
61
61
  """Makes an HTTP request using httplib2 semantics."""
62
62
  del connection_type # Ignored
63
63
  del redirections # Ignored
@@ -84,7 +84,7 @@ class _Http:
84
84
 
85
85
 
86
86
  def _wrap_request(
87
- headers_supplier: Callable[[], Dict[str, Any]],
87
+ headers_supplier: Callable[[], dict[str, Any]],
88
88
  response_inspector: Callable[[Any], None],
89
89
  ) -> Callable[..., http.HttpRequest]:
90
90
  """Builds a callable that wraps an API request.
@@ -147,7 +147,7 @@ def build_cloud_resource(
147
147
  credentials: Optional[Any] = None,
148
148
  timeout: Optional[float] = None,
149
149
  num_retries: int = 1,
150
- headers_supplier: Optional[Callable[[], Dict[str, Any]]] = None,
150
+ headers_supplier: Optional[Callable[[], dict[str, Any]]] = None,
151
151
  response_inspector: Optional[Callable[[Any], None]] = None,
152
152
  http_transport: Optional[Any] = None,
153
153
  raw: Optional[bool] = False,
@@ -256,12 +256,12 @@ def build_cloud_resource_from_document(
256
256
 
257
257
 
258
258
  def _convert_dict(
259
- to_convert: Dict[str, Any],
260
- conversions: Dict[str, Any],
261
- defaults: Optional[Dict[str, Any]] = None,
259
+ to_convert: dict[str, Any],
260
+ conversions: dict[str, Any],
261
+ defaults: Optional[dict[str, Any]] = None,
262
262
  key_warnings: bool = False,
263
263
  retain_keys: bool = False,
264
- ) -> Dict[str, Any]:
264
+ ) -> dict[str, Any]:
265
265
  """Applies a set of conversion rules to a dict.
266
266
 
267
267
  Args:
@@ -294,7 +294,7 @@ def _convert_dict(
294
294
  The "to_convert" dict with keys renamed, values converted, and defaults
295
295
  added.
296
296
  """
297
- result: Dict[str, Any] = {}
297
+ result: dict[str, Any] = {}
298
298
  for key, value in to_convert.items():
299
299
  if key in conversions:
300
300
  conversion = conversions[key]
@@ -319,7 +319,7 @@ def _convert_dict(
319
319
 
320
320
 
321
321
  def _convert_value(
322
- value: str, conversions: Dict[str, Any], default: Any) -> Any:
322
+ value: str, conversions: dict[str, Any], default: Any) -> Any:
323
323
  """Converts a value using a set of value mappings.
324
324
 
325
325
  Args:
@@ -382,7 +382,7 @@ def _convert_bounding_box_to_geo_json(bbox: Sequence[float]) -> str:
382
382
  lng_min, lat_min, lng_max, lat_max))
383
383
 
384
384
 
385
- def convert_get_list_params_to_list_assets_params(params) -> Dict[str, Any]:
385
+ def convert_get_list_params_to_list_assets_params(params) -> dict[str, Any]:
386
386
  """Converts a getList params dict to something usable with listAssets."""
387
387
  params = _convert_dict(
388
388
  params, {
@@ -401,7 +401,7 @@ def convert_get_list_params_to_list_assets_params(params) -> Dict[str, Any]:
401
401
  return convert_list_images_params_to_list_assets_params(params)
402
402
 
403
403
 
404
- def convert_list_assets_result_to_get_list_result(result) -> List[Any]:
404
+ def convert_list_assets_result_to_get_list_result(result) -> list[Any]:
405
405
  """Converts a listAssets result to something getList can return."""
406
406
  if 'assets' not in result:
407
407
  return []
@@ -452,8 +452,8 @@ def _convert_list_images_filter_params_to_list_assets_params(params) -> str:
452
452
 
453
453
 
454
454
  def convert_list_images_params_to_list_assets_params(
455
- params: Dict[str, Any]
456
- ) -> Dict[str, Any]:
455
+ params: dict[str, Any]
456
+ ) -> dict[str, Any]:
457
457
  """Converts a listImages params dict to something usable with listAssets."""
458
458
  params = params.copy()
459
459
  extra_filters = _convert_list_images_filter_params_to_list_assets_params(
@@ -470,14 +470,14 @@ def is_asset_root(asset_name: str) -> bool:
470
470
  return bool(re.match(ASSET_ROOT_PATTERN, asset_name))
471
471
 
472
472
 
473
- def convert_list_images_result_to_get_list_result(result) -> List[Any]:
473
+ def convert_list_images_result_to_get_list_result(result) -> list[Any]:
474
474
  """Converts a listImages result to something getList can return."""
475
475
  if 'images' not in result:
476
476
  return []
477
477
  return [_convert_image_for_get_list_result(i) for i in result['images']]
478
478
 
479
479
 
480
- def _convert_asset_for_get_list_result(asset) -> Dict[str, Any]:
480
+ def _convert_asset_for_get_list_result(asset) -> dict[str, Any]:
481
481
  """Converts an EarthEngineAsset to the format returned by getList."""
482
482
  result = _convert_dict(
483
483
  asset, {
@@ -488,7 +488,7 @@ def _convert_asset_for_get_list_result(asset) -> Dict[str, Any]:
488
488
  return result
489
489
 
490
490
 
491
- def _convert_image_for_get_list_result(asset) -> Dict[str, Any]:
491
+ def _convert_image_for_get_list_result(asset) -> dict[str, Any]:
492
492
  """Converts an Image to the format returned by getList."""
493
493
  result = _convert_dict(
494
494
  asset, {
@@ -539,7 +539,7 @@ def convert_asset_id_to_asset_name(asset_id: str) -> str:
539
539
  return 'projects/earthengine-public/assets/{}'.format(asset_id)
540
540
 
541
541
 
542
- def split_asset_name(asset_name: str) -> Tuple[str, str]:
542
+ def split_asset_name(asset_name: str) -> tuple[str, str]:
543
543
  """Splits an asset name into the parent and ID parts.
544
544
 
545
545
  Args:
@@ -564,7 +564,7 @@ def convert_task_id_to_operation_name(task_id: str) -> str:
564
564
  return 'projects/{}/operations/{}'.format(_cloud_api_user_project, task_id)
565
565
 
566
566
 
567
- def convert_params_to_image_manifest(params: Dict[str, Any]) -> Dict[str, Any]:
567
+ def convert_params_to_image_manifest(params: dict[str, Any]) -> dict[str, Any]:
568
568
  """Converts params to an ImageManifest for ingestion."""
569
569
  return _convert_dict(
570
570
  params, {
@@ -574,7 +574,7 @@ def convert_params_to_image_manifest(params: Dict[str, Any]) -> Dict[str, Any]:
574
574
  retain_keys=True)
575
575
 
576
576
 
577
- def convert_params_to_table_manifest(params: Dict[str, Any]) -> Dict[str, Any]:
577
+ def convert_params_to_table_manifest(params: dict[str, Any]) -> dict[str, Any]:
578
578
  """Converts params to a TableManifest for ingestion."""
579
579
  return _convert_dict(
580
580
  params, {
@@ -584,7 +584,7 @@ def convert_params_to_table_manifest(params: Dict[str, Any]) -> Dict[str, Any]:
584
584
  retain_keys=True)
585
585
 
586
586
 
587
- def convert_tilesets_to_one_platform_tilesets(tilesets: List[Any]) -> List[Any]:
587
+ def convert_tilesets_to_one_platform_tilesets(tilesets: list[Any]) -> list[Any]:
588
588
  """Converts a tileset to a one platform representation of a tileset."""
589
589
  converted_tilesets = []
590
590
  for tileset in tilesets:
@@ -596,7 +596,7 @@ def convert_tilesets_to_one_platform_tilesets(tilesets: List[Any]) -> List[Any]:
596
596
  return converted_tilesets
597
597
 
598
598
 
599
- def convert_sources_to_one_platform_sources(sources: List[Any]) -> List[Any]:
599
+ def convert_sources_to_one_platform_sources(sources: list[Any]) -> list[Any]:
600
600
  """Converts the sources to one platform representation of sources."""
601
601
  converted_sources = []
602
602
  for source in sources:
@@ -615,7 +615,7 @@ def convert_sources_to_one_platform_sources(sources: List[Any]) -> List[Any]:
615
615
  return converted_sources
616
616
 
617
617
 
618
- def encode_number_as_cloud_value(number: float) -> Dict[str, Union[float, str]]:
618
+ def encode_number_as_cloud_value(number: float) -> dict[str, Union[float, str]]:
619
619
  # Numeric values in constantValue-style nodes end up stored in doubles. If the
620
620
  # input is an integer that loses precision as a double, use the int64 slot
621
621
  # ("integerValue") in ValueNode.
@@ -625,7 +625,7 @@ def encode_number_as_cloud_value(number: float) -> Dict[str, Union[float, str]]:
625
625
  return {'constantValue': number}
626
626
 
627
627
 
628
- def convert_algorithms(algorithms) -> Dict[str, Any]:
628
+ def convert_algorithms(algorithms) -> dict[str, Any]:
629
629
  """Converts a ListAlgorithmsResult to the internal format.
630
630
 
631
631
  The internal code expects a dict mapping each algorithm's name to a dict
@@ -653,7 +653,7 @@ def convert_algorithms(algorithms) -> Dict[str, Any]:
653
653
  return dict(_convert_algorithm(algorithm) for algorithm in algs)
654
654
 
655
655
 
656
- def _convert_algorithm(algorithm: Dict[str, Any]) -> Tuple[str, Dict[str, Any]]:
656
+ def _convert_algorithm(algorithm: dict[str, Any]) -> tuple[str, dict[str, Any]]:
657
657
  """Converts an Algorithm to the internal format."""
658
658
  # Strip leading 'algorithms/' from the name.
659
659
  algorithm_name = algorithm['name'][11:]
@@ -677,11 +677,11 @@ def _convert_algorithm(algorithm: Dict[str, Any]) -> Tuple[str, Dict[str, Any]]:
677
677
 
678
678
 
679
679
  def _convert_algorithm_arguments(
680
- args: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
680
+ args: list[dict[str, Any]]) -> list[dict[str, Any]]:
681
681
  return [_convert_algorithm_argument(arg) for arg in args]
682
682
 
683
683
 
684
- def _convert_algorithm_argument(arg: Dict[str, Any]) -> Dict[str, Any]:
684
+ def _convert_algorithm_argument(arg: dict[str, Any]) -> dict[str, Any]:
685
685
  return _convert_dict(
686
686
  arg, {
687
687
  'argumentName': 'name',
@@ -746,7 +746,7 @@ def convert_to_table_file_format(format_str: Optional[str]) -> str:
746
746
  return format_str
747
747
 
748
748
 
749
- def convert_to_band_list(bands: Union[List[str], None, str]) -> List[str]:
749
+ def convert_to_band_list(bands: Union[list[str], None, str]) -> list[str]:
750
750
  """Converts a band list, possibly as CSV, to a real list of bands.
751
751
 
752
752
  Args:
@@ -766,7 +766,7 @@ def convert_to_band_list(bands: Union[List[str], None, str]) -> List[str]:
766
766
  raise ee_exception.EEException('Invalid band list ' + bands)
767
767
 
768
768
 
769
- def convert_to_visualization_options(params: Dict[str, Any]) -> Dict[str, Any]:
769
+ def convert_to_visualization_options(params: dict[str, Any]) -> dict[str, Any]:
770
770
  """Extracts a VisualizationOptions from a param dict.
771
771
 
772
772
  Args:
@@ -829,14 +829,14 @@ def convert_to_visualization_options(params: Dict[str, Any]) -> Dict[str, Any]:
829
829
  return result
830
830
 
831
831
 
832
- def _convert_csv_numbers_to_list(value: str) -> List[float]:
832
+ def _convert_csv_numbers_to_list(value: str) -> list[float]:
833
833
  """Converts a string containing CSV numbers to a list."""
834
834
  if not value:
835
835
  return []
836
836
  return [float(x) for x in value.split(',')]
837
837
 
838
838
 
839
- def convert_operation_to_task(operation: Dict[str, Any]) -> Dict[str, Any]:
839
+ def convert_operation_to_task(operation: dict[str, Any]) -> dict[str, Any]:
840
840
  """Converts an Operation to a legacy Task."""
841
841
  result = _convert_dict(
842
842
  operation['metadata'], {
@@ -872,7 +872,7 @@ def _convert_operation_state_to_task_state(state: str) -> str:
872
872
  }, 'UNKNOWN')
873
873
 
874
874
 
875
- def convert_iam_policy_to_acl(policy: Dict[str, Any]) -> Dict[str, Any]:
875
+ def convert_iam_policy_to_acl(policy: dict[str, Any]) -> dict[str, Any]:
876
876
  """Converts an IAM Policy proto to the legacy ACL format."""
877
877
  bindings = {
878
878
  binding['role']: binding.get('members', [])
@@ -892,7 +892,7 @@ def convert_iam_policy_to_acl(policy: Dict[str, Any]) -> Dict[str, Any]:
892
892
  return result
893
893
 
894
894
 
895
- def convert_acl_to_iam_policy(acl: Dict[str, Any]) -> Dict[str, Any]:
895
+ def convert_acl_to_iam_policy(acl: dict[str, Any]) -> dict[str, Any]:
896
896
  """Converts the legacy ACL format to an IAM Policy proto."""
897
897
  owners = acl.get('owners', [])
898
898
  readers = acl.get('readers', [])
@@ -911,7 +911,7 @@ def convert_acl_to_iam_policy(acl: Dict[str, Any]) -> Dict[str, Any]:
911
911
 
912
912
  def convert_to_grid_dimensions(
913
913
  dimensions: Union[float, Sequence[float]]
914
- ) -> Dict[str, float]:
914
+ ) -> dict[str, float]:
915
915
  """Converts an input value to GridDimensions.
916
916
 
917
917
  Args:
@@ -10,7 +10,7 @@ referenced from there (e.g., "ee.profilePrinting").
10
10
  import contextlib
11
11
  import json
12
12
  import sys
13
- from typing import Any, Dict, Iterator, Optional, TextIO, Union
13
+ from typing import Any, Iterator, Optional, TextIO, Union
14
14
 
15
15
  from google.auth import crypt
16
16
  from google.oauth2 import service_account
@@ -91,7 +91,7 @@ def call(
91
91
 
92
92
  # pylint: disable-next=redefined-builtin
93
93
  def apply(
94
- func: Union[str, apifunction.ApiFunction], named_args: Dict[str, Any]
94
+ func: Union[str, apifunction.ApiFunction], named_args: dict[str, Any]
95
95
  ) -> computedobject.ComputedObject:
96
96
  """Call a function with a dictionary of named arguments.
97
97
 
@@ -18,7 +18,7 @@ from __future__ import annotations
18
18
  import copy
19
19
  import keyword
20
20
  import re
21
- from typing import Any, Dict, Optional, Set, Type
21
+ from typing import Any, Optional, Type
22
22
 
23
23
  from ee import _utils
24
24
  from ee import computedobject
@@ -31,17 +31,17 @@ from ee import function
31
31
 
32
32
  class ApiFunction(function.Function):
33
33
  """An object representing an EE API Function."""
34
- _signature: Dict[str, Any]
34
+ _signature: dict[str, Any]
35
35
 
36
36
  # A dictionary of functions defined by the API server.
37
- _api: Dict[str, ApiFunction] = {}
37
+ _api: dict[str, ApiFunction] = {}
38
38
 
39
39
  # A set of algorithm names containing all algorithms that have been bound to
40
40
  # a function so far using importApi().
41
- _bound_signatures: Set[str] = set()
41
+ _bound_signatures: set[str] = set()
42
42
 
43
43
  @_utils.accept_opt_prefix('opt_signature')
44
- def __init__(self, name: str, signature: Optional[Dict[str, Any]] = None):
44
+ def __init__(self, name: str, signature: Optional[dict[str, Any]] = None):
45
45
  """Creates a function defined by the EE API.
46
46
 
47
47
  Args:
@@ -84,7 +84,7 @@ class ApiFunction(function.Function):
84
84
  return cls.lookup(name).call(*args, **kwargs)
85
85
 
86
86
  @classmethod
87
- def apply_(cls, name: str, named_args: Dict[str, Any]) -> Any:
87
+ def apply_(cls, name: str, named_args: dict[str, Any]) -> Any:
88
88
  """Call a named API function with a dictionary of named arguments.
89
89
 
90
90
  Args:
@@ -101,23 +101,23 @@ class ApiFunction(function.Function):
101
101
  del encoder # Unused.
102
102
  return self._signature['name']
103
103
 
104
- def encode_cloud_invocation(self, encoder: Any) -> Dict[str, Any]:
104
+ def encode_cloud_invocation(self, encoder: Any) -> dict[str, Any]:
105
105
  del encoder # Unused.
106
106
  return {'functionName': self._signature['name']}
107
107
 
108
- def getSignature(self) -> Dict[str, Any]:
108
+ def getSignature(self) -> dict[str, Any]:
109
109
  """Returns a description of the interface provided by this function."""
110
110
  return self._signature
111
111
 
112
112
  @classmethod
113
- def allSignatures(cls) -> Dict[str, Dict[str, Any]]:
113
+ def allSignatures(cls) -> dict[str, dict[str, Any]]:
114
114
  """Returns a map from the name to signature for all API functions."""
115
115
  cls.initialize()
116
116
  return dict([(name, func.getSignature())
117
117
  for name, func in cls._api.items()])
118
118
 
119
119
  @classmethod
120
- def unboundFunctions(cls) -> Dict[str, Any]:
120
+ def unboundFunctions(cls) -> dict[str, Any]:
121
121
  """Returns the functions that have not been bound using importApi() yet."""
122
122
  cls.initialize()
123
123
  return dict([(name, func) for name, func in cls._api.items()
@@ -3,7 +3,7 @@
3
3
  import contextlib
4
4
  import json
5
5
  import os
6
- from typing import Any, Dict, Iterable, Optional
6
+ from typing import Any, Iterable, Optional
7
7
 
8
8
  from googleapiclient import discovery
9
9
 
@@ -13,10 +13,10 @@ from ee import _cloud_api_utils
13
13
 
14
14
 
15
15
  # Cached algorithms list
16
- _algorithms_cache: Optional[Dict[str, Any]] = None
16
+ _algorithms_cache: Optional[dict[str, Any]] = None
17
17
 
18
18
 
19
- def GetAlgorithms() -> Dict[str, Any]:
19
+ def GetAlgorithms() -> dict[str, Any]:
20
20
  """Returns a static version of the ListAlgorithms call.
21
21
 
22
22
  After ApiTestCase.setUp is called, ee.data.getAlgorithms() is patched to use
@@ -102,30 +102,30 @@ class ApiTestCase(unittest.TestCase):
102
102
  ee.Initialize(None, '', project='my-project')
103
103
 
104
104
  # We are mocking the url here so the unit tests are happy.
105
- def _MockMapId(self, params: Dict[str, Any]) -> Dict[str, str]:
105
+ def _MockMapId(self, params: dict[str, Any]) -> dict[str, str]:
106
106
  self.last_mapid_call = {'url': '/mapid', 'data': params}
107
107
  return {'mapid': 'fakeMapId', 'token': 'fakeToken'}
108
108
 
109
- def _MockDownloadUrl(self, params: Dict[str, Any]) -> Dict[str, str]:
109
+ def _MockDownloadUrl(self, params: dict[str, Any]) -> dict[str, str]:
110
110
  self.last_download_call = {'url': '/download', 'data': params}
111
111
  return {'docid': '1', 'token': '2'}
112
112
 
113
113
  def _MockThumbUrl(
114
114
  self,
115
- params: Dict[str, Any],
115
+ params: dict[str, Any],
116
116
  # pylint: disable-next=invalid-name
117
117
  thumbType: Optional[str] = None,
118
- ) -> Dict[str, str]:
118
+ ) -> dict[str, str]:
119
119
  del thumbType # Unused.
120
120
  # Hang on to the call arguments.
121
121
  self.last_thumb_call = {'url': '/thumb', 'data': params}
122
122
  return {'thumbid': '3', 'token': '4'}
123
123
 
124
- def _MockTableDownload(self, params: Dict[str, Any]) -> Dict[str, str]:
124
+ def _MockTableDownload(self, params: dict[str, Any]) -> dict[str, str]:
125
125
  self.last_table_call = {'url': '/table', 'data': params}
126
126
  return {'docid': '5', 'token': '6'}
127
127
 
128
- def _MockFetchDataCatalogStac(self) -> Dict[str, Any]:
128
+ def _MockFetchDataCatalogStac(self) -> dict[str, Any]:
129
129
  return {}
130
130
 
131
131