@@ -101,7 +101,8 @@ class Direction(Enum):
101
101
DownTo = 1
102
102
103
103
def __str__ (self ):
104
- return ("to" , "downto" )[self .value ] # TODO: check performance
104
+ index : int = self .value
105
+ return ("to" , "downto" )[index ] # TODO: check performance
105
106
106
107
107
108
@export
@@ -121,7 +122,8 @@ class Mode(Enum):
121
122
Linkage = 5
122
123
123
124
def __str__ (self ):
124
- return ("" , "in" , "out" , "inout" , "buffer" , "linkage" )[self .value ] # TODO: check performance
125
+ index : int = self .value
126
+ return ("" , "in" , "out" , "inout" , "buffer" , "linkage" )[index ] # TODO: check performance
125
127
126
128
127
129
@export
@@ -445,10 +447,10 @@ def __init__(self, subTypeName: Name):
445
447
class ConstrainedScalarSubTypeSymbol (SubTypeSymbol ):
446
448
_range : 'Range'
447
449
448
- def __init__ (self , subTypeName : Name , r : 'Range' = None ):
450
+ def __init__ (self , subTypeName : Name , rng : 'Range' = None ):
449
451
super ().__init__ (subTypeName )
450
452
self ._subType = None
451
- self ._range = r
453
+ self ._range = rng
452
454
453
455
@property
454
456
def Range (self ) -> 'Range' :
@@ -734,6 +736,7 @@ def __init__(self, name: str):
734
736
@export
735
737
class BaseType (ModelEntity , NamedEntity ):
736
738
"""``BaseType`` is the base class of all type entities in this model."""
739
+
737
740
def __init__ (self , name : str ):
738
741
"""
739
742
Initializes underlying ``BaseType``.
@@ -1618,16 +1621,6 @@ class BaseConstraint(ModelEntity):
1618
1621
pass
1619
1622
1620
1623
1621
- # FIXME: exists 2 times
1622
- @export
1623
- class RangeExpression (BaseConstraint ):
1624
- _range : Range
1625
-
1626
- @property
1627
- def Range (self ):
1628
- return self ._range
1629
-
1630
-
1631
1624
# FIXME: Is this used?
1632
1625
@export
1633
1626
class RangeAttribute (BaseConstraint ):
0 commit comments