From 7aa25b20403d6951588f985de24363f657e780c2 Mon Sep 17 00:00:00 2001 From: Google Earth Engine Authors Date: Thu, 24 Aug 2023 21:48:05 +0000 Subject: [PATCH] v0.1.367 PiperOrigin-RevId: 559876320 --- javascript/build/ee_api_js.js | 2 +- javascript/build/ee_api_js_debug.js | 12 +++++++----- javascript/build/ee_api_js_npm.js | 12 +++++++----- javascript/package.json | 2 +- javascript/src/apiclient.js | 2 +- javascript/src/data.js | 6 ++++-- javascript/src/serializer.js | 15 +++++++++++++++ python/ee/__init__.py | 2 +- python/ee/ee_types.py | 4 ++-- python/ee/featurecollection.py | 4 ++-- 10 files changed, 41 insertions(+), 20 deletions(-) diff --git a/javascript/build/ee_api_js.js b/javascript/build/ee_api_js.js index 2999c9593..0a22f5c16 100644 --- a/javascript/build/ee_api_js.js +++ b/javascript/build/ee_api_js.js @@ -440,7 +440,7 @@ Tc(q,f[m]))});return b?b(l):l};return this.callback?(tj(d,null,function(f,l){ret uj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=wj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]}; var xj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: ]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},qj=function(){var a=yj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Aj=function(a,b,c){var d=[];a&&(d=d.concat(zj)); b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};cg)break;v++}return Vj(B.status,function(D){try{return B.getResponseHeader(D)}catch(Q){return null}},B.responseText,f,void 0,e,d)},Tj=function(a,b,c,d,e,g){var f=0,l={url:a,method:c,content:d,headers:e},m=Nj,q=null!=g?g:10;l.callback= function(v){v=v.target;if(429==v.getStatus()&&f None: _registered_classes = classes -def classToName(a_class: type[Any]) -> str: +def classToName(a_class: Type[Any]) -> str: """Converts a class to the API-friendly type name. Args: diff --git a/python/ee/featurecollection.py b/python/ee/featurecollection.py index f6803a25b..5b32535d5 100644 --- a/python/ee/featurecollection.py +++ b/python/ee/featurecollection.py @@ -4,7 +4,7 @@ # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Type, Union from ee import apifunction from ee import collection @@ -216,5 +216,5 @@ def name() -> str: return 'FeatureCollection' @staticmethod - def elementType() -> type[feature.Feature]: + def elementType() -> Type[feature.Feature]: return feature.Feature