refactor(ingest): make code pythonic (#2941)

This commit is contained in:
aseembansal-gogo 2021-07-23 10:17:08 +05:30 committed by GitHub
parent 51bd2c6a81
commit d39030dab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -585,10 +585,10 @@ def get_column_type(
}
type_class = None
if field_type in field_type_mapping.keys():
if field_type in field_type_mapping:
type_class = field_type_mapping[field_type]
else:
for key in field_starts_type_mapping.keys():
for key in field_starts_type_mapping:
if field_type.startswith(key):
type_class = field_starts_type_mapping[key]
break