10
10
11
11
from untangle import Element
12
12
13
+ from codeallybasic .SecureConversions import SecureConversions
14
+
13
15
from pyutmodelv2 .PyutField import PyutField
14
16
from pyutmodelv2 .PyutField import PyutFields
15
17
41
43
from untanglepyut import XmlConstants
42
44
43
45
from untanglepyut .XmlVersion import XmlVersion
44
- from untanglepyut .Common import secureInteger
45
- from untanglepyut .Common import str2bool
46
+
46
47
from untanglepyut .Types import Elements
47
48
48
49
@@ -158,7 +159,7 @@ def classToPyutClass(self, graphicClass: Element) -> PyutClass:
158
159
159
160
def textToPyutText (self , graphicText : Element ) -> PyutText :
160
161
"""
161
- Parses Text elements
162
+ Parses the Text elements
162
163
Args:
163
164
graphicText: Of the form: <Text id="3" content="I am standalone text"/>
164
165
@@ -249,7 +250,7 @@ def useCaseToPyutUseCase(self, graphicUseCase: Element) -> PyutUseCase:
249
250
"""
250
251
251
252
Args:
252
- graphicUseCase: An untangle Element in the above format
253
+ graphicUseCase: An ` untangle` Element in the above format
253
254
254
255
Returns: PyutUseCase
255
256
"""
@@ -270,7 +271,7 @@ def linkToPyutLink(self, singleLink: Element, source: PyutClass, destination: Py
270
271
linkType : PyutLinkType = PyutLinkType .toEnum (linkTypeStr )
271
272
cardSrc : str = singleLink [self ._attrCardinalitySource ]
272
273
cardDest : str = singleLink [self ._attrCardinalityDestination ]
273
- bidir : bool = str2bool (singleLink [self ._attrBidirectional ])
274
+ bidir : bool = SecureConversions . secureBoolean (singleLink [self ._attrBidirectional ])
274
275
linkDescription : str = singleLink ['name' ]
275
276
276
277
pyutLink : PyutLink = PyutLink (name = linkDescription ,
@@ -292,7 +293,7 @@ def sdInstanceToPyutSDInstance(self, oglSDInstanceElement: Element) -> PyutSDIns
292
293
293
294
pyutSDInstance .id = int (instanceElement ['id' ])
294
295
pyutSDInstance .instanceName = instanceElement ['instanceName' ]
295
- pyutSDInstance .instanceLifeLineLength = secureInteger (instanceElement ['lifeLineLength' ])
296
+ pyutSDInstance .instanceLifeLineLength = SecureConversions . secureInteger (instanceElement ['lifeLineLength' ])
296
297
297
298
return pyutSDInstance
298
299
@@ -414,7 +415,7 @@ def _modifierToPyutMethodModifiers(self, methodElement: Element) -> PyutModifier
414
415
Args:
415
416
methodElement:
416
417
417
- Returns: PyutModifiers if not exist returns an empty
418
+ Returns: A PyutModifiers object that may be empty.
418
419
"""
419
420
420
421
modifierElements = methodElement .get_elements ('Modifier' )
0 commit comments