Commit f94538fe authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

[PyCharm Inspector] Avoid list 'optimizations'

parent 67d985f7
File mode changed from 100755 to 100644
......@@ -54,6 +54,7 @@ def usage():
msg += '\t-verbose\t\tDisplay more debug output\n'
# noinspection PyListCreation
class Printer(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -52,6 +52,7 @@ def usage():
msg += '\t-verbose\t\tDisplay more debug output\n'
# noinspection PyListCreation
class Printer(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -41,6 +41,7 @@ def Version():
print("Code generator: " + "$Id: smp2_A_mapper.py 1932 2010-06-15 13:41:15Z ttsiodras $") # pragma: no cover
# noinspection PyDefaultArgument
def getUID(strIdentifier, idStore={}): # pylint: disable=dangerous-default-value
def h(digits):
ret = ""
......
File mode changed from 100755 to 100644
......@@ -50,6 +50,7 @@ def Version():
print("Code generator: " + "$Id: c_B_mapper.py 2390 2012-07-19 12:39:17Z ttsiodras $")
# noinspection PyListCreation
class FromCtoOSS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -139,6 +140,7 @@ class FromCtoOSS(RecursiveMapper):
return self.MapSequenceOf(srcCVariable, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromOSStoC(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -102,6 +102,7 @@ def Version():
print("Code generator: " + "$Id: og_B_mapper.py 2390 2012-07-19 12:39:17Z ttsiodras $")
# noinspection PyListCreation
class FromObjectGeodeToASN1SCC(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -206,6 +207,7 @@ class FromObjectGeodeToASN1SCC(RecursiveMapper):
return self.MapSequenceOf(srcSDLVariable, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromObjectGeodeToOSS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -308,6 +310,7 @@ class FromObjectGeodeToOSS(RecursiveMapper):
return self.MapSequenceOf(srcSDLVariable, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromASN1SCCtoObjectGeode(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -425,6 +428,7 @@ class FromASN1SCCtoObjectGeode(RecursiveMapper):
return self.MapSequenceOf(srcVar, dstSDLVariable, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromOSStoObjectGeode(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -45,6 +45,7 @@ def Version():
print("Code generator: " + "$Id: rtds_B_mapper.py 2390 2012-07-19 12:39:17Z ttsiodras $")
# noinspection PyListCreation
class FromRTDSToASN1SCC(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -140,6 +141,7 @@ class FromRTDSToASN1SCC(RecursiveMapper):
panic("The PragmaDev mapper does not support SETOF. Please use SEQUENCEOF instead (%s)" % node.Location()) # pragma: nocover
# noinspection PyListCreation
class FromRTDSToOSS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -242,6 +244,7 @@ class FromRTDSToOSS(RecursiveMapper):
panic("The PragmaDev mapper does not support SETOF. Please use SEQUENCEOF instead (%s)" % node.Location()) # pragma: nocover
# noinspection PyListCreation
class FromASN1SCCtoRTDS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -342,6 +345,7 @@ class FromASN1SCCtoRTDS(RecursiveMapper):
panic("The PragmaDev mapper does not support SETOF. Please use SEQUENCEOF instead (%s)" % node.Location()) # pragma: nocover
# noinspection PyListCreation
class FromOSStoRTDS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -51,6 +51,7 @@ def Version():
"$Id: scade6_B_mapper.py 2390 2012-07-19 12:39:17Z ttsiodras $")
# noinspection PyListCreation
class FromSCADEtoASN1SCC(RecursiveMapper):
def MapInteger(self, srcScadeMacro, destVar, _, __, ___):
return ["%s = (asn1SccSint) %s;\n" % (destVar, srcScadeMacro)]
......@@ -229,6 +230,7 @@ class FromASN1SCCtoSCADE(RecursiveMapper):
return self.MapSequenceOf(srcVar, dstScadeMacro, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromSCADEtoOSS(RecursiveMapper):
def MapInteger(self, srcScadeMacro, destVar, _, __, ___):
return ["%s = %s;\n" % (destVar, srcScadeMacro)]
......@@ -309,6 +311,7 @@ class FromSCADEtoOSS(RecursiveMapper):
return self.MapSequenceOf(srcScadeMacro, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromOSStoSCADE(RecursiveMapper):
def __init__(self):
self._seqIndex = 1
......
......@@ -102,6 +102,7 @@ def Version():
print(("Code generator: " + "$Id: og_B_mapper.py 2390 2012-07-19 12:39:17Z ttsiodras $"))
# noinspection PyListCreation
class FromObjectGeodeToASN1SCC(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -206,6 +207,7 @@ class FromObjectGeodeToASN1SCC(RecursiveMapper):
return self.MapSequenceOf(srcSDLVariable, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromObjectGeodeToOSS(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -308,6 +310,7 @@ class FromObjectGeodeToOSS(RecursiveMapper):
return self.MapSequenceOf(srcSDLVariable, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromASN1SCCtoObjectGeode(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......@@ -425,6 +428,7 @@ class FromASN1SCCtoObjectGeode(RecursiveMapper):
return self.MapSequenceOf(srcVar, dstSDLVariable, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromOSStoObjectGeode(RecursiveMapper):
def __init__(self):
self.uniqueID = 0
......
......@@ -154,6 +154,7 @@ class VHDL_Circuit:
# return isinstance(contained, AsnInt) or isinstance(contained, AsnReal) or isinstance(contained, AsnBool) or isinstance(contained, AsnEnumerated)
# noinspection PyListCreation
class FromVHDLToASN1SCC(RecursiveMapper):
def MapInteger(self, srcVHDL, destVar, _, __, ___):
register = srcVHDL[0] + srcVHDL[1]
......@@ -286,6 +287,7 @@ class FromVHDLToASN1SCC(RecursiveMapper):
return self.MapSequenceOf(srcVHDL, destVar, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class FromASN1SCCtoVHDL(RecursiveMapper):
def MapInteger(self, srcVar, dstVHDL, _, __, ___):
register = dstVHDL[0] + dstVHDL[1]
......@@ -490,6 +492,7 @@ static int g_bInitialized = 0;
hex(int(VHDL_Circuit.lookupSP[sp._id]._offset)))
# noinspection PyListCreation
class MapASN1ToVHDLCircuit(RecursiveMapper):
def MapInteger(self, direction, dstVHDL, node, _, __):
if not node._range:
......@@ -548,6 +551,7 @@ class MapASN1ToVHDLCircuit(RecursiveMapper):
return self.MapSequenceOf(direction, dstVHDL, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class MapASN1ToVHDLregisters(RecursiveMapper):
def MapInteger(self, _, dstVHDL, node, __, ___):
if not node._range:
......@@ -606,6 +610,7 @@ class MapASN1ToVHDLregisters(RecursiveMapper):
return self.MapSequenceOf(_, dstVHDL, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class MapASN1ToVHDLreadinputdata(RecursiveMapper):
def MapInteger(self, reginfo, dstVHDL, node, _, __):
if not node._range:
......@@ -676,6 +681,7 @@ class MapASN1ToVHDLreadinputdata(RecursiveMapper):
return self.MapSequenceOf(reginfo, dstVHDL, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class MapASN1ToVHDLwriteoutputdata(RecursiveMapper):
def MapInteger(self, reginfo, dstVHDL, node, _, __):
if not node._range:
......@@ -746,6 +752,7 @@ class MapASN1ToVHDLwriteoutputdata(RecursiveMapper):
return self.MapSequenceOf(reginfo, dstVHDL, node, leafTypeDict, names) # pragma: nocover
# noinspection PyListCreation
class MapASN1ToSystemCconnections(RecursiveMapper):
def MapInteger(self, srcRegister, dstCircuitPort, _, __, ___):
return [dstCircuitPort + ' => ' + srcRegister]
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment