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