From 9971402a3e93f44781cc99cdd3b8bd628ed3b0a5 Mon Sep 17 00:00:00 2001 From: Noa Aviel Dove Date: Wed, 28 Jun 2023 22:22:24 -0700 Subject: [PATCH] Fix line wrapping --- src/azul/__init__.py | 6 +++++- src/azul/indexer/document.py | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/azul/__init__.py b/src/azul/__init__.py index 4cfa6983f..c839962cb 100644 --- a/src/azul/__init__.py +++ b/src/azul/__init__.py @@ -929,7 +929,11 @@ def integration_test_catalogs(self) -> Mapping[CatalogName, Catalog]: if catalog.is_integration_test_catalog } - def es_index_name(self, catalog: CatalogName, entity_type: str, aggregate: bool) -> str: + def es_index_name(self, + catalog: CatalogName, + entity_type: str, + aggregate: bool + ) -> str: return str(IndexName(prefix=self._index_prefix, version=2, deployment=self.deployment_stage, diff --git a/src/azul/indexer/document.py b/src/azul/indexer/document.py index 0ffb1e54d..fa4642281 100644 --- a/src/azul/indexer/document.py +++ b/src/azul/indexer/document.py @@ -139,7 +139,9 @@ def _from_index(cls, ) -> 'DocumentCoordinates[CataloguedEntityReference]': raise NotImplementedError - def with_catalog(self, catalog: Optional[CatalogName]) -> 'DocumentCoordinates[CataloguedEntityReference]': + def with_catalog(self, + catalog: Optional[CatalogName] + ) -> 'DocumentCoordinates[CataloguedEntityReference]': """ Return coordinates for the given catalog. Only works for instances that have no catalog or ones having the same catalog in which case `self` is @@ -187,8 +189,10 @@ def document_id(self) -> str: )) @classmethod - def _from_index(cls, index_name: IndexName, - document_id: str) -> 'ContributionCoordinates[CataloguedEntityReference]': + def _from_index(cls, + index_name: IndexName, + document_id: str + ) -> 'ContributionCoordinates[CataloguedEntityReference]': entity_type = index_name.entity_type assert index_name.aggregate is False entity_id, bundle_uuid, bundle_version, deleted = document_id.split('_') @@ -222,7 +226,10 @@ class AggregateCoordinates(DocumentCoordinates[CataloguedEntityReference]): aggregate: bool = attr.ib(init=False, default=True) @classmethod - def _from_index(cls, index_name: IndexName, document_id: str) -> 'AggregateCoordinates': + def _from_index(cls, + index_name: IndexName, + document_id: str + ) -> 'AggregateCoordinates': entity_type = index_name.entity_type assert index_name.aggregate is True return cls(entity=CataloguedEntityReference(catalog=index_name.catalog,