@@ -171,7 +171,7 @@ def oids_bygeom(
171171 "f" : self .client .outformat ,
172172 }
173173 if distance :
174- payload .update ({"distance" : f" { distance } " , "units" : "esriSRUnit_Meter" })
174+ payload .update ({"distance" : str ( int ( distance )) , "units" : "esriSRUnit_Meter" })
175175
176176 if sql_clause :
177177 payload .update ({"where" : sql_clause })
@@ -185,7 +185,9 @@ def oids_bygeom(
185185 msg = resp ["error" ]["message" ] if "error" in resp else "No matched records"
186186 raise ZeroMatchedError (msg ) from ex
187187
188- def oids_byfield (self , field : str , ids : str | list [str ]) -> Iterator [tuple [str , ...]]:
188+ def oids_byfield (
189+ self , field : str , ids : str | int | list [str ] | list [int ]
190+ ) -> Iterator [tuple [str , ...]]:
189191 """Get Object IDs based on a list of field IDs.
190192
191193 Parameters
@@ -208,7 +210,7 @@ def oids_byfield(self, field: str, ids: str | list[str]) -> Iterator[tuple[str,
208210 if "string" in self .client .field_types .get (field , "" ):
209211 fids = ", " .join (f"'{ i } '" for i in ids_ls )
210212 else :
211- fids = ", " .join (f" { i } " for i in ids_ls )
213+ fids = ", " .join (str ( i ) for i in ids_ls )
212214
213215 return self .oids_bysql (f"{ field } IN ({ fids } )" )
214216
@@ -451,7 +453,7 @@ def _get_payloads(
451453 if self .version != "1.1.1" and self .is_geographic and not always_xy :
452454 _bbox = (_bbox [1 ], _bbox [0 ], _bbox [3 ], _bbox [2 ])
453455 _payload = payload .copy ()
454- _payload ["bbox" ] = f' { "," .join (str (round (c , 6 )) for c in _bbox )} '
456+ _payload ["bbox" ] = "," .join (str (round (c , 6 )) for c in _bbox )
455457 _payload ["width" ] = str (_width )
456458 _payload ["height" ] = str (_height )
457459 _payload ["layers" ] = lyr
@@ -725,7 +727,7 @@ def getfeature_byid(
725727 if "str" in valid_features [featurename ]:
726728 feat_vals = ", " .join (f"'{ fid } '" for fid in set (featureids ))
727729 else :
728- feat_vals = ", " .join (f" { fid } " for fid in set (featureids ))
730+ feat_vals = ", " .join (str ( fid ) for fid in set (featureids ))
729731
730732 return self .getfeature_byfilter (
731733 f"{ featurename } IN ({ feat_vals } )" , method = "POST" , sort_attr = featurename
0 commit comments