odxtools 5.2.5__py3-none-any.whl → 5.2.6__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.
- odxtools/nameditemlist.py +6 -15
- odxtools/version.py +2 -2
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/METADATA +1 -1
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/RECORD +8 -8
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/LICENSE +0 -0
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/WHEEL +0 -0
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/entry_points.txt +0 -0
- {odxtools-5.2.5.dist-info → odxtools-5.2.6.dist-info}/top_level.txt +0 -0
odxtools/nameditemlist.py
CHANGED
@@ -4,7 +4,7 @@ from keyword import iskeyword
|
|
4
4
|
from typing import (Callable, Collection, Generic, Iterable, List, Optional, Protocol, Tuple,
|
5
5
|
TypeVar, Union, cast, overload, runtime_checkable)
|
6
6
|
|
7
|
-
from .exceptions import
|
7
|
+
from .exceptions import odxraise
|
8
8
|
|
9
9
|
|
10
10
|
@runtime_checkable
|
@@ -168,7 +168,7 @@ def short_name_as_key(obj: OdxNamed) -> str:
|
|
168
168
|
|
169
169
|
Although short names are almost identical to python identifiers,
|
170
170
|
their first character is allowed to be a number. This method
|
171
|
-
prepends an underscore to such
|
171
|
+
prepends an underscore to such shortnames.
|
172
172
|
"""
|
173
173
|
if not isinstance(obj, OdxNamed):
|
174
174
|
odxraise()
|
@@ -176,21 +176,12 @@ def short_name_as_key(obj: OdxNamed) -> str:
|
|
176
176
|
if not isinstance(sn, str):
|
177
177
|
odxraise()
|
178
178
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
f"Encountered name '{sn}' which is not an identifier!"),
|
184
|
-
)
|
185
|
-
|
186
|
-
if sn[0].isdigit():
|
179
|
+
# make sure that the name of the item in question:
|
180
|
+
# * is not a python keyword (this would lead to syntax errors)
|
181
|
+
# * does not starts with a digit
|
182
|
+
if sn[0].isdigit() or iskeyword(sn):
|
187
183
|
return f"_{sn}"
|
188
184
|
|
189
|
-
# make sure that the name of the item in question is not a
|
190
|
-
# python keyword (this would lead to syntax errors)
|
191
|
-
if iskeyword(sn):
|
192
|
-
return f"{sn}_"
|
193
|
-
|
194
185
|
return sn
|
195
186
|
|
196
187
|
|
odxtools/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odxtools
|
3
|
-
Version: 5.2.
|
3
|
+
Version: 5.2.6
|
4
4
|
Summary: Utilities to work with the ODX standard for automotive diagnostics
|
5
5
|
Author-email: Katrin Bauer <katrin.bauer@mbition.io>, Andreas Lauser <andreas.lauser@mbition.io>, Ayoub Kaanich <kayoub5@live.com>
|
6
6
|
Maintainer-email: Andreas Lauser <andreas.lauser@mbition.io>, Ayoub Kaanich <kayoub5@live.com>
|
@@ -57,7 +57,7 @@ odxtools/multiplexer.py,sha256=7_-wyB8WqIC1H6LVp1jnzmElRhcy-Cr7dXz9T98X0ZY,7536
|
|
57
57
|
odxtools/multiplexercase.py,sha256=yCUY9s1DAvZS_YcMlZ66cLDH7p02eMWt66BBvJNRsW8,1683
|
58
58
|
odxtools/multiplexerdefaultcase.py,sha256=j_W4dPkpAD48DKqjqBxQ_JOGwJ_iftdqGAXzqC0eZAw,1506
|
59
59
|
odxtools/multiplexerswitchkey.py,sha256=i-rQtMsAH7mhVB0xlBwIMDsX-zbXH7F3LI8ainENoBs,1899
|
60
|
-
odxtools/nameditemlist.py,sha256=
|
60
|
+
odxtools/nameditemlist.py,sha256=nEnZPYDIQ0jnriFNOI6VmJUnLR3rOfectwcyyUq2b8U,6154
|
61
61
|
odxtools/negoutputparam.py,sha256=QJ4X4Nlo2MbBi7VbOjBvD32gTDLPpF1l6NjChzikh-k,1407
|
62
62
|
odxtools/obd.py,sha256=5mjjnnlq2ejaJ6wESvoJevkLdYUihQXLxjf4MGFpeDg,1175
|
63
63
|
odxtools/odxlink.py,sha256=UJdmIDwFRmg2woZsppgPYPA-g7d-h74anusw8LEHVtA,8782
|
@@ -89,7 +89,7 @@ odxtools/unit.py,sha256=VdiwIljfCB9zeXu8yKuAjfTwsMrpd7pXqqAqhMabyj0,3626
|
|
89
89
|
odxtools/unitgroup.py,sha256=Mf7QhlFDKkUB38shWCCB8i7XLbzV8JAfnAmafUmxon0,2093
|
90
90
|
odxtools/unitspec.py,sha256=M6QcufeitAslb_1DEmSfrMCn_s_lZN_X-NPPX31g0Y4,2959
|
91
91
|
odxtools/utils.py,sha256=cbcNql5ahfdJfENAn_waHgGWg9XOtWblx5mMaWoKL8U,1898
|
92
|
-
odxtools/version.py,sha256=
|
92
|
+
odxtools/version.py,sha256=beFNNYXNofyL8rkkXR2tRuV17CM4Pad2qJfkxSogEnk,160
|
93
93
|
odxtools/write_pdx_file.py,sha256=FfGkvYpzPBE-xsDrN40IyK354G5APp6WX2N3Vhl2bAw,5895
|
94
94
|
odxtools/xdoc.py,sha256=pUYo6l60ns9LOEdutE06WMcNy25yNVl1Ni4lMpYt1pY,1467
|
95
95
|
odxtools/cli/__init__.py,sha256=T7ano_FIyzBASxYpmcA5VJXU5bQLIy_Qk0HE_SDKelY,106
|
@@ -155,9 +155,9 @@ odxtools/templates/macros/printStructure.xml.jinja2,sha256=_id63IQ9uwd7AvNltyj5x
|
|
155
155
|
odxtools/templates/macros/printTable.xml.jinja2,sha256=C6DVCNMVyFjA_nRjSDMmbKvonFKTbxoUyRu0QAwj52A,1568
|
156
156
|
odxtools/templates/macros/printUnitSpec.xml.jinja2,sha256=jEqmlJTt95BO5psIxdaQiawaL4-YtCezDXl3GUB2Z2Q,2762
|
157
157
|
odxtools/templates/macros/printVariant.xml.jinja2,sha256=tW4lQ0zC46Ot7TBHQMYpHQAzm3F5gXXzerL3rfSPFbU,6032
|
158
|
-
odxtools-5.2.
|
159
|
-
odxtools-5.2.
|
160
|
-
odxtools-5.2.
|
161
|
-
odxtools-5.2.
|
162
|
-
odxtools-5.2.
|
163
|
-
odxtools-5.2.
|
158
|
+
odxtools-5.2.6.dist-info/LICENSE,sha256=NeGPFQdTa6EKeON3aShVlPAIquJnbbiOfj0suz6rzyQ,1074
|
159
|
+
odxtools-5.2.6.dist-info/METADATA,sha256=YgVa6Abvl019iLJMKM74cfRSrS3hZl6fNAbz9hxbO-g,25486
|
160
|
+
odxtools-5.2.6.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
161
|
+
odxtools-5.2.6.dist-info/entry_points.txt,sha256=_sBDzuNoT8LbbCjfc-OJiUt5WPrtOq_x-rr9txhrPjY,53
|
162
|
+
odxtools-5.2.6.dist-info/top_level.txt,sha256=pdS02kE5ZdgsaBRZDpX3NBFlaSx3zotsqX4E4V6tXEI,9
|
163
|
+
odxtools-5.2.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|