eodag 4.0.0a3__py3-none-any.whl → 4.0.0a4__py3-none-any.whl

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.
eodag/api/collection.py CHANGED
@@ -130,7 +130,7 @@ class Collection(BaseModel):
130
130
 
131
131
  @model_validator(mode="after")
132
132
  def set_id_from_alias(self) -> Self:
133
- """if an alias exists, use it to update id attribute"""
133
+ """If an alias exists, use it to update ``id`` attribute"""
134
134
  if self.alias is not None:
135
135
  self._id = self.id
136
136
  self.id = self.alias
@@ -141,9 +141,9 @@ class Collection(BaseModel):
141
141
  def validate_collection(
142
142
  cls, values: dict[str, Any] | Self, handler: ModelWrapValidatorHandler[Self]
143
143
  ) -> Self:
144
- """Allow to create a collection instance with bad formatted attributes (except "id").
145
- Set incorrectly formatted attributes to None and ignore extra attributes.
146
- Log a warning about validation errors if EODAG_VALIDATE_COLLECTIONS is set to True.
144
+ """Allow to create a collection instance with bad formatted attributes (except ``id``).
145
+ Set incorrectly formatted attributes to ``None`` and ignore extra attributes.
146
+ Log a warning about validation errors if ``EODAG_VALIDATE_COLLECTIONS`` environment variable is set to ``True``.
147
147
  """
148
148
  errors: list[ErrorDetails] = []
149
149
  continue_validation: bool = True
@@ -237,7 +237,7 @@ class Collection(BaseModel):
237
237
  return self._dag
238
238
 
239
239
  def search(self, **kwargs: Any) -> SearchResult:
240
- """Look for products of this collection matching criteria using the `dag` attribute of the instance.
240
+ """Look for products of this collection matching criteria using the ``dag`` attribute of the instance.
241
241
 
242
242
  :param kwargs: Some other criteria that will be used to do the search,
243
243
  using parameters compatible with the provider
@@ -257,12 +257,12 @@ class Collection(BaseModel):
257
257
  return dag.search(collection=self.id, **kwargs)
258
258
 
259
259
  def list_queryables(self, **kwargs: Any) -> QueryablesDict:
260
- """Fetch the queryable properties for this collection using the `dag` attribute of the instance.
260
+ """Fetch the queryable properties for this collection using the ``dag`` attribute of the instance.
261
261
 
262
262
  :param kwargs: additional filters for queryables
263
263
 
264
264
  :returns: A :class:`~eodag.api.product.queryables.QuerybalesDict` containing the EODAG queryable
265
- properties, associating parameters to their annotated type, and a additional_properties attribute
265
+ properties, associating parameters to their annotated type, and an ``additional_properties`` attribute
266
266
  :raises: :class:`~eodag.utils.exceptions.ValidationError`: If the `collection` argument is set in `kwargs`,
267
267
  since it is already defined by the instance
268
268
  """
@@ -278,7 +278,7 @@ class Collection(BaseModel):
278
278
 
279
279
 
280
280
  class CollectionsDict(UserDict[str, Collection]):
281
- """A UserDict object which values are :class:`~eodag.api.collection.Collection` objects, keyed by provider id.
281
+ """A UserDict object which values are :class:`~eodag.api.collection.Collection` objects, keyed by provider ``id``.
282
282
 
283
283
  :param collections: A list of collections
284
284