mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-26 17:45:30 +00:00
refactor(ingest): make code pythonic (#2941)
This commit is contained in:
parent
51bd2c6a81
commit
d39030dab2
@ -585,10 +585,10 @@ def get_column_type(
|
|||||||
}
|
}
|
||||||
|
|
||||||
type_class = None
|
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]
|
type_class = field_type_mapping[field_type]
|
||||||
else:
|
else:
|
||||||
for key in field_starts_type_mapping.keys():
|
for key in field_starts_type_mapping:
|
||||||
if field_type.startswith(key):
|
if field_type.startswith(key):
|
||||||
type_class = field_starts_type_mapping[key]
|
type_class = field_starts_type_mapping[key]
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user