PySimultan 0.4.11__py3-none-any.whl → 0.4.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PySimultan2/__about__.py +1 -1
- PySimultan2/object_mapper.py +16 -1
- {pysimultan-0.4.11.dist-info → pysimultan-0.4.12.dist-info}/METADATA +1 -1
- {pysimultan-0.4.11.dist-info → pysimultan-0.4.12.dist-info}/RECORD +6 -6
- {pysimultan-0.4.11.dist-info → pysimultan-0.4.12.dist-info}/WHEEL +0 -0
- {pysimultan-0.4.11.dist-info → pysimultan-0.4.12.dist-info}/licenses/LICENSE.txt +0 -0
PySimultan2/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = '0.4.
|
1
|
+
version = '0.4.12'
|
PySimultan2/object_mapper.py
CHANGED
@@ -40,6 +40,8 @@ class PythonMapper(object):
|
|
40
40
|
|
41
41
|
def __init__(self, *args, **kwargs):
|
42
42
|
|
43
|
+
self._mapped_classes = {}
|
44
|
+
|
43
45
|
self.name = kwargs.get('name', 'PythonMapper')
|
44
46
|
self.registered_classes: dict[str: SimultanObject] = copy(default_registered_classes) # dict with all registered classes: {taxonomy: class}
|
45
47
|
|
@@ -58,6 +60,19 @@ class PythonMapper(object):
|
|
58
60
|
self.re_register = False
|
59
61
|
self.load_undefined = False
|
60
62
|
|
63
|
+
@property
|
64
|
+
def mapped_classes(self):
|
65
|
+
if len(self.registered_classes) > len(self._mapped_classes):
|
66
|
+
for taxonomy in self.registered_classes.keys():
|
67
|
+
if self._mapped_classes.get(taxonomy, None) is None:
|
68
|
+
self.create_mapped_class(taxonomy, self.registered_classes[taxonomy])
|
69
|
+
|
70
|
+
return self._mapped_classes
|
71
|
+
|
72
|
+
@mapped_classes.setter
|
73
|
+
def mapped_classes(self, value):
|
74
|
+
self._mapped_classes = value
|
75
|
+
|
61
76
|
def register(self, taxonomy, cls, taxonomy_map=None):
|
62
77
|
if not self.re_register and taxonomy in self.registered_classes.keys():
|
63
78
|
return
|
@@ -95,7 +110,7 @@ class PythonMapper(object):
|
|
95
110
|
new_class_dict.update(self.get_properties(taxonomy))
|
96
111
|
new_class = type(cls.__name__, bases, new_class_dict)
|
97
112
|
|
98
|
-
self.
|
113
|
+
self._mapped_classes[taxonomy] = new_class
|
99
114
|
|
100
115
|
return new_class
|
101
116
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: PySimultan
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.12
|
4
4
|
Project-URL: Documentation, https://github.com/Bühler Maximilian/PySimultan2#readme
|
5
5
|
Project-URL: Issues, https://github.com/Bühler Maximilian/PySimultan2/issues
|
6
6
|
Project-URL: Source, https://github.com/Bühler Maximilian/PySimultan2
|
@@ -1,10 +1,10 @@
|
|
1
|
-
PySimultan2/__about__.py,sha256=
|
1
|
+
PySimultan2/__about__.py,sha256=MkMmPeqymacyZEBg90eZ65LwKDDZpJmbjay0tT_M-4Q,20
|
2
2
|
PySimultan2/__init__.py,sha256=cabTN1Oz8xtFM31ouBKg5lwLqW5vtexDP669PYyNLnA,3224
|
3
3
|
PySimultan2/data_model.py,sha256=3O6O2Lw0lQJtlwNa7_NuTjp4gpdHiusjXHyWtmmHtlU,27214
|
4
4
|
PySimultan2/default_types.py,sha256=v_4awsUURLbu4Sfw7J_7BoQKirXbKdU9s7-wqgA4nNE,23112
|
5
5
|
PySimultan2/files.py,sha256=gx3BA6WYjNVplqqes7jkPopp6O50pgLvantXgmitx54,12657
|
6
6
|
PySimultan2/multi_values.py,sha256=ZFXlTLuZo32x7_7diYAp2XEjp5uwgHLgNOzN7v74-5I,13650
|
7
|
-
PySimultan2/object_mapper.py,sha256=
|
7
|
+
PySimultan2/object_mapper.py,sha256=_uGFykv3zhlxyezJD1UGesDgnXHNU8uezzLGj69LM7M,12964
|
8
8
|
PySimultan2/simultan_object.py,sha256=Plr9nwgRmKzdkTO7l8ksWekEow9pT-MgjjAfLlChgDI,17208
|
9
9
|
PySimultan2/taxonomy_maps.py,sha256=IYpIat6ZJi5MyCbsjAxWvVOWDRp_VvSMWUY3CApKSik,8061
|
10
10
|
PySimultan2/utils.py,sha256=J3T7KDfONFeLWBulXmGMCaaOu5sfkDSHmI92JWO8dW4,62553
|
@@ -75,7 +75,7 @@ PySimultan2/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
75
75
|
PySimultan2/resources/assimp.dll,sha256=HwfDwXqoPDTFRyoQpA3qmgZoUdFtziJkV5fNtktEZEU,6081536
|
76
76
|
PySimultan2/resources/defaultsettings.xml,sha256=s6Tk1tubLz5UYqXZWpD42EDHzedemRY1nEneoIVcUfg,392
|
77
77
|
PySimultan2/resources/setup.bat,sha256=fjvvYfVM6TalS-QTSiKAbAId5nTsk8kGGo06ba-wWaY,32
|
78
|
-
pysimultan-0.4.
|
79
|
-
pysimultan-0.4.
|
80
|
-
pysimultan-0.4.
|
81
|
-
pysimultan-0.4.
|
78
|
+
pysimultan-0.4.12.dist-info/METADATA,sha256=KuAlLSL--I3f7tTfNUgODVUH6RoRLdx6k8aZJECDkpg,2483
|
79
|
+
pysimultan-0.4.12.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
80
|
+
pysimultan-0.4.12.dist-info/licenses/LICENSE.txt,sha256=pmSr98k6N005KMojnZxzLGRuRlDjDx3PUrK1lFj53HA,1126
|
81
|
+
pysimultan-0.4.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|