diff --git a/tools/python/maps_generator/checks/check_categories.py b/tools/python/maps_generator/checks/check_categories.py index 19b64c4676..3eb37c5286 100644 --- a/tools/python/maps_generator/checks/check_categories.py +++ b/tools/python/maps_generator/checks/check_categories.py @@ -1,8 +1,8 @@ from collections import defaultdict from maps_generator.checks import check -from mwm.types import NAME_TO_INDEX_TYPE_MAPPING from maps_generator.checks.check_mwm_types import count_all_types +from mwm import NAME_TO_INDEX_TYPE_MAPPING def parse_groups(path): diff --git a/tools/python/maps_generator/checks/check_mwm_types.py b/tools/python/maps_generator/checks/check_mwm_types.py index a9c371a990..e5f37d8284 100644 --- a/tools/python/maps_generator/checks/check_mwm_types.py +++ b/tools/python/maps_generator/checks/check_mwm_types.py @@ -4,9 +4,9 @@ from typing import Union from maps_generator.checks import check from mwm import Mwm -from mwm.types import NAME_TO_INDEX_TYPE_MAPPING -from mwm.types import readable_type -from mwm.types import type_index +from mwm import NAME_TO_INDEX_TYPE_MAPPING +from mwm import readable_type +from mwm import type_index @lru_cache(maxsize=None) diff --git a/tools/python/mwm/__init__.py b/tools/python/mwm/__init__.py index bcf5e15eb8..451cb17a61 100644 --- a/tools/python/mwm/__init__.py +++ b/tools/python/mwm/__init__.py @@ -11,10 +11,14 @@ if not os.path.exists(resource_path): os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "data", ) -from mwm.types import init as _init +from mwm.feature_types import init as _init _init(resource_path) +from mwm.feature_types import INDEX_TO_NAME_TYPE_MAPPING +from mwm.feature_types import NAME_TO_INDEX_TYPE_MAPPING +from mwm.feature_types import readable_type +from mwm.feature_types import type_index from mwm.mwm_interface import GeomType from mwm.mwm_interface import MapType from mwm.mwm_interface import MetadataField @@ -23,8 +27,6 @@ from mwm.mwm_interface import Rect from mwm.mwm_interface import RegionDataField from mwm.mwm_interface import Triangle from mwm.mwm_python import get_region_info -from mwm.types import readable_type -from mwm.types import type_index from mwm.utils import EnumAsStrEncoder try: diff --git a/tools/python/mwm/types.py b/tools/python/mwm/feature_types.py similarity index 100% rename from tools/python/mwm/types.py rename to tools/python/mwm/feature_types.py diff --git a/tools/python/mwm/mwm_interface.py b/tools/python/mwm/mwm_interface.py index b3bdc29f6c..391c92547d 100644 --- a/tools/python/mwm/mwm_interface.py +++ b/tools/python/mwm/mwm_interface.py @@ -7,7 +7,7 @@ from typing import Iterable from typing import List from typing import Union -from mwm.types import readable_type +from mwm.feature_types import readable_type # See coding/string_utf8_multilang.cpp to synchronize languages. LANGS = (