We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9383329 commit f350cceCopy full SHA for f350cce
auto_labeling_pipeline/mappings.py
@@ -1,6 +1,6 @@
1
import json
2
import pathlib
3
-from typing import Any, Dict, Optional, Type
+from typing import Any, Dict, Type
4
5
from jinja2 import Template
6
@@ -13,11 +13,10 @@ class MappingTemplate:
13
label_collection: Type[Labels]
14
template_file: str = ''
15
16
- def __init__(self, label_collection: Type[Labels] = Labels, template: Optional[str] = ''):
+ def __init__(self, label_collection: Type[Labels] = Labels, template: str = ''):
17
if self.template_file:
18
template = self.load()
19
- if template:
20
- self.template = template
+ self.template = template
21
if label_collection is not Labels:
22
self.label_collection = label_collection
23
0 commit comments