Skip to content
Snippets Groups Projects
Commit cd760f35 authored by Eva Bardou's avatar Eva Bardou :frog:
Browse files

Properly pluralize logs in list_corpus_entities/entity_types

parent 862ee6ce
No related branches found
No related tags found
1 merge request!515Properly pluralize logs in list_corpus_entities/entity_types
Pipeline #165061 passed
......@@ -380,8 +380,9 @@ class EntityMixin:
"ListCorpusEntities", id=self.corpus_id, **query_params
)
}
count = len(self.entities)
logger.info(
f"Loaded {len(self.entities)} entities in corpus ({self.corpus_id})"
f'Loaded {count} entit{"ies" if count > 1 else "y"} in corpus ({self.corpus_id})'
)
def list_corpus_entity_types(
......@@ -396,6 +397,7 @@ class EntityMixin:
"ListCorpusEntityTypes", id=self.corpus_id
)
}
count = len(self.entity_types)
logger.info(
f"Loaded {len(self.entity_types)} entity types in corpus ({self.corpus_id})."
f'Loaded {count} entity type{"s"[:count>1]} in corpus ({self.corpus_id}).'
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment