# HG changeset patch # User Andrey Skvortsov # Date 1502953464 -10800 # Node ID 56e7f4a11046a822332615a77cae0230b62976a2 # Parent 845ca626db09507b7e0c68b2668a06b0bac323db clean-up: fix PEP8 E712 comparison to True should be 'if cond is True:' or 'if cond:' diff -r 845ca626db09 -r 56e7f4a11046 editors/Viewer.py --- a/editors/Viewer.py Thu Aug 17 09:55:39 2017 +0300 +++ b/editors/Viewer.py Thu Aug 17 10:04:24 2017 +0300 @@ -3714,11 +3714,11 @@ comment.Draw(dc) for wire in self.Wires.iterkeys(): if wire != self.SelectedElement and (wire.IsVisible() or printing): - if not self.Debug or wire.GetValue() != True: + if not self.Debug or not wire.GetValue(): wire.Draw(dc) if self.Debug: for wire in self.Wires.iterkeys(): - if wire != self.SelectedElement and (wire.IsVisible() or printing) and wire.GetValue() == True: + if wire != self.SelectedElement and (wire.IsVisible() or printing) and wire.GetValue(): wire.Draw(dc) for block in self.Blocks.itervalues(): if block != self.SelectedElement and (block.IsVisible() or printing): diff -r 845ca626db09 -r 56e7f4a11046 graphics/GraphicCommons.py --- a/graphics/GraphicCommons.py Thu Aug 17 09:55:39 2017 +0300 +++ b/graphics/GraphicCommons.py Thu Aug 17 10:04:24 2017 +0300 @@ -2631,7 +2631,7 @@ scalex, scaley = dc.GetUserScale() dc.SetUserScale(1, 1) # If user trying to connect wire with wrong input, highlight will become red. - if self.ErrHighlight == True and not (self.EndConnected): + if self.ErrHighlight and not (self.EndConnected): highlightcolor = wx.RED else: highlightcolor = HIGHLIGHTCOLOR diff -r 845ca626db09 -r 56e7f4a11046 plcopen/plcopen.py --- a/plcopen/plcopen.py Thu Aug 17 09:55:39 2017 +0300 +++ b/plcopen/plcopen.py Thu Aug 17 10:04:24 2017 +0300 @@ -1678,7 +1678,7 @@ for variable in instance.inputVariables.getvariable(): connections = variable.connectionPointIn.getconnections() if connections and len(connections) == 1: - if (self.checkedBlocksDict.has_key(connections[0].getrefLocalId()) == False): + if not self.checkedBlocksDict.has_key(connections[0].getrefLocalId()): self.compileelementExecutionOrder(connections[0]) if instance.getexecutionOrderId() == 0: instance.setexecutionOrderId(self.getnewExecutionOrderId()) diff -r 845ca626db09 -r 56e7f4a11046 util/ProcessLogger.py --- a/util/ProcessLogger.py Thu Aug 17 09:55:39 2017 +0300 +++ b/util/ProcessLogger.py Thu Aug 17 10:04:24 2017 +0300 @@ -124,7 +124,7 @@ "stderr": subprocess.PIPE } - if no_gui == True and wx.Platform == '__WXMSW__': + if no_gui and wx.Platform == '__WXMSW__': self.startupinfo = subprocess.STARTUPINFO() self.startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW popenargs["startupinfo"] = self.startupinfo diff -r 845ca626db09 -r 56e7f4a11046 xmlclass/xmlclass.py --- a/xmlclass/xmlclass.py Thu Aug 17 09:55:39 2017 +0300 +++ b/xmlclass/xmlclass.py Thu Aug 17 10:04:24 2017 +0300 @@ -598,7 +598,7 @@ "extract": ExtractTag, "generate": GenerateTag, "initial": lambda: None, - "check": lambda x: x is None or infos["minOccurs"] == 0 and value == True + "check": lambda x: x is None or infos["minOccurs"] == 0 and value }