Skip to content

Commit 6fc1fb3

Browse files
committed
Add minor fixes
1 parent 9ea13c8 commit 6fc1fb3

File tree

1 file changed

+2
-4
lines changed
  • cognite/extractorutils/unstable/core

1 file changed

+2
-4
lines changed

cognite/extractorutils/unstable/core/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,8 @@ def _load_metrics(self, metrics_class: type[BaseMetrics] | None = None) -> BaseM
283283
if Extractor._metrics_singleton is not None:
284284
return Extractor._metrics_singleton
285285

286-
if metrics_class:
287-
metrics_instance = safe_get(metrics_class)
288-
else:
289-
metrics_instance = BaseMetrics(extractor_name=self.EXTERNAL_ID, extractor_version=self.VERSION)
286+
cls_to_use = metrics_class or BaseMetrics
287+
metrics_instance = safe_get(cls_to_use, extractor_name=self.EXTERNAL_ID, extractor_version=self.VERSION)
290288

291289
Extractor._metrics_singleton = metrics_instance
292290
return metrics_instance

0 commit comments

Comments
 (0)