Skip to content

Commit 9ab66ad

Browse files
committed
fix formatting error
1 parent 28a6b3b commit 9ab66ad

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

tensorflow_data_validation/utils/schema_util.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,19 @@ def set_domain(
175175
if feature.WhichOneof("domain_info") is not None:
176176
logging.warning('Replacing existing domain of feature "%s".', feature_path)
177177

178-
for d_type, d_name in feature_domains.items():
179-
if isinstance(domain, d_type):
180-
if d_type is str:
181-
found_domain = False
182-
for global_domain in schema.string_domain:
183-
if global_domain.name == domain:
184-
found_domain = True
185-
break
186-
if not found_domain:
187-
raise ValueError(f'Invalid global string domain "{domain}".')
188-
feature.domain = domain
189-
else:
190-
getattr(feature, d_name).CopyFrom(domain)
178+
for d_type, d_name in feature_domains.items():
179+
if isinstance(domain, d_type):
180+
if d_type is str:
181+
found_domain = False
182+
for global_domain in schema.string_domain:
183+
if global_domain.name == domain:
184+
found_domain = True
185+
break
186+
if not found_domain:
187+
raise ValueError(f'Invalid global string domain "{domain}".')
188+
feature.domain = domain
189+
else:
190+
getattr(feature, d_name).CopyFrom(domain)
191191

192192

193193
def write_schema_text(schema: schema_pb2.Schema, output_path: str) -> None:

0 commit comments

Comments
 (0)