Skip to content

Commit 0383ff3

Browse files
committed
gis-9415 add global alternative mappings
1 parent 8e606ca commit 0383ff3

File tree

2 files changed

+440
-0
lines changed

2 files changed

+440
-0
lines changed

uncoder-core/app/translator/core/mapping.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ class BasePlatformMappings:
113113
is_strict_mapping: bool = False
114114
skip_load_default_mappings: bool = True
115115
extend_default_mapping_with_all_fields: bool = False
116+
global_mappings: list[str] = []
116117

117118
def __init__(self, platform_dir: str, platform_details: PlatformDetails):
118119
self._loader = LoaderFileMappings()
119120
self.details = platform_details
120121
self._source_mappings = self.prepare_mapping(platform_dir)
121122
self._alternative_mappings = self.prepare_alternative_mapping(platform_dir)
123+
global_alternative_mappings = self.prepare_global_alternative_mapping()
122124

123125
def update_default_source_mapping(self, default_mapping: SourceMapping, fields_mapping: FieldsMapping) -> None:
124126
default_mapping.fields_mapping.update(fields_mapping)
@@ -129,6 +131,10 @@ def prepare_alternative_mapping(self, platform_dir: str) -> dict[str, dict[str,
129131
alternative_mappings[name] = self.prepare_mapping(platform_dir)
130132
return alternative_mappings
131133

134+
def prepare_global_alternative_mapping(self) -> dict[str, dict[str, SourceMapping]]:
135+
globa_alternative_mappings = {}
136+
return globa_alternative_mappings
137+
132138
def prepare_mapping(self, platform_dir: str) -> dict[str, SourceMapping]:
133139
source_mappings = {}
134140
default_mapping = SourceMapping(source_id=DEFAULT_MAPPING_NAME)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy