From ea53570eefc2f215062aa750c37c77953abe340d Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Fri, 27 Jan 2006 01:00:28 +0000 Subject: [PATCH] formatting --- direct/src/actor/Actor.py | 4 +- direct/src/directscripts/gendocs.py | 62 +++++++++++++-------------- direct/src/fsm/SampleFSM.py | 6 +-- direct/src/gui/DirectCheckButton.py | 2 +- direct/src/gui/DirectDialog.py | 2 +- direct/src/gui/DirectGuiGlobals.py | 4 +- direct/src/gui/DirectOptionMenu.py | 2 +- direct/src/leveleditor/LevelEditor.py | 4 +- direct/src/pyinst/Builder.py | 12 +++--- direct/src/tkpanels/AnimPanel.py | 2 +- direct/src/tkpanels/MopathRecorder.py | 2 +- direct/src/tkpanels/NotifyPanel.py | 2 +- direct/src/tkpanels/ParticlePanel.py | 2 +- 13 files changed, 53 insertions(+), 53 deletions(-) diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index ae01b4a1a1..0bf8abbe66 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -47,7 +47,7 @@ class Actor(DirectObject, NodePath): # part dictionary {"head":"char/dogMM/dogMM_Shorts-head-mod", \ "torso":"char/dogMM/dogMM_Shorts-torso-mod", \ - "legs":"char/dogMM/dogMM_Shorts-legs-mod"} , \ + "legs":"char/dogMM/dogMM_Shorts-legs-mod"}, \ # dictionary of anim dictionaries {"head":{"walk":"char/dogMM/dogMM_Shorts-head-walk", \ @@ -1275,7 +1275,7 @@ class Actor(DirectObject, NodePath): """ assert partName not in self.__subpartDict - Actor.notify.debug("in loadModel: %s , part: %s, lod: %s, copy: %s" % \ + Actor.notify.debug("in loadModel: %s, part: %s, lod: %s, copy: %s" % \ (modelPath, partName, lodName, copy)) if isinstance(modelPath, NodePath): diff --git a/direct/src/directscripts/gendocs.py b/direct/src/directscripts/gendocs.py index 75698e66a5..0044518c5c 100644 --- a/direct/src/directscripts/gendocs.py +++ b/direct/src/directscripts/gendocs.py @@ -601,37 +601,37 @@ class CodeDatabase: ######################################################################## CLASS_RENAME_DICT = { - "Loader" : "PandaLoader" , - "String" : "CString" , - "LMatrix4f" : "Mat4" , - "LMatrix3f" : "Mat3" , - "LVecBase4f" : "VBase4" , - "LVector4f" : "Vec4" , - "LPoint4f" : "Point4" , - "LVecBase3f" : "VBase3" , - "LVector3f" : "Vec3" , - "LPoint3f" : "Point3" , - "LVecBase2f" : "VBase2" , - "LVector2f" : "Vec2" , - "LPoint2f" : "Point2" , - "LQuaternionf" : "Quat" , - "LMatrix4d" : "Mat4D" , - "LMatrix3d" : "Mat3D" , - "LVecBase4d" : "VBase4D" , - "LVector4d" : "Vec4D" , - "LPoint4d" : "Point4D" , - "LVecBase3d" : "VBase3D" , - "LVector3d" : "Vec3D" , - "LPoint3d" : "Point3D" , - "LVecBase2d" : "VBase2D" , - "LVector2d" : "Vec2D" , - "LPoint2d" : "Point2D" , - "LQuaterniond" : "QuatD" , - "Plane" : "PlaneBase" , - "Planef" : "Plane" , - "Planed" : "PlaneD" , - "Frustum" : "FrustumBase" , - "Frustumf" : "Frustum" , + "Loader" : "PandaLoader", + "String" : "CString", + "LMatrix4f" : "Mat4", + "LMatrix3f" : "Mat3", + "LVecBase4f" : "VBase4", + "LVector4f" : "Vec4", + "LPoint4f" : "Point4", + "LVecBase3f" : "VBase3", + "LVector3f" : "Vec3", + "LPoint3f" : "Point3", + "LVecBase2f" : "VBase2", + "LVector2f" : "Vec2", + "LPoint2f" : "Point2", + "LQuaternionf" : "Quat", + "LMatrix4d" : "Mat4D", + "LMatrix3d" : "Mat3D", + "LVecBase4d" : "VBase4D", + "LVector4d" : "Vec4D", + "LPoint4d" : "Point4D", + "LVecBase3d" : "VBase3D", + "LVector3d" : "Vec3D", + "LPoint3d" : "Point3D", + "LVecBase2d" : "VBase2D", + "LVector2d" : "Vec2D", + "LPoint2d" : "Point2D", + "LQuaterniond" : "QuatD", + "Plane" : "PlaneBase", + "Planef" : "Plane", + "Planed" : "PlaneD", + "Frustum" : "FrustumBase", + "Frustumf" : "Frustum", "Frustumd" : "FrustumD" } diff --git a/direct/src/fsm/SampleFSM.py b/direct/src/fsm/SampleFSM.py index 022232bdd9..2e03585ab9 100644 --- a/direct/src/fsm/SampleFSM.py +++ b/direct/src/fsm/SampleFSM.py @@ -10,9 +10,9 @@ class ClassicStyle(FSM.FSM): FSM.FSM.__init__(self, name) self.defaultTransitions = { - 'Red' : ['Green'], - 'Yellow' : ['Red'], - 'Green' : ['Yellow'], + 'Red': ['Green'], + 'Yellow': ['Red'], + 'Green': ['Yellow'], } def enterRed(self): diff --git a/direct/src/gui/DirectCheckButton.py b/direct/src/gui/DirectCheckButton.py index dd9f3718b8..af94647ab1 100644 --- a/direct/src/gui/DirectCheckButton.py +++ b/direct/src/gui/DirectCheckButton.py @@ -43,7 +43,7 @@ class DirectCheckButton(DirectButton): image_scale = self['boxImageScale'], image_color = self['boxImageColor'], state = 'disabled', - text = ('X' , 'X'), + text = ('X', 'X'), relief = self['boxRelief'], ) diff --git a/direct/src/gui/DirectDialog.py b/direct/src/gui/DirectDialog.py index db94a4b846..07c1a2ee0e 100644 --- a/direct/src/gui/DirectDialog.py +++ b/direct/src/gui/DirectDialog.py @@ -98,7 +98,7 @@ class DirectDialog(DirectFrame): ('button_borderWidth',(.01,.01), None), ('button_pad', (.01,.01), None), ('button_relief', RAISED, None), - ('button_text_scale' , 0.06, None), + ('button_text_scale', 0.06, None), ('buttonSize', None, INITOPT), ('topPad', 0.06, INITOPT), ('midPad', 0.12, INITOPT), diff --git a/direct/src/gui/DirectGuiGlobals.py b/direct/src/gui/DirectGuiGlobals.py index cda43c0a1a..7befe3d741 100644 --- a/direct/src/gui/DirectGuiGlobals.py +++ b/direct/src/gui/DirectGuiGlobals.py @@ -25,8 +25,8 @@ SUNKEN = PGFrameStyle.TBevelIn GROOVE = PGFrameStyle.TGroove RIDGE = PGFrameStyle.TRidge -FrameStyleDict = {'flat' : FLAT, 'raised' : RAISED, 'sunken': SUNKEN, - 'groove' : GROOVE, 'ridge' : RIDGE +FrameStyleDict = {'flat': FLAT, 'raised': RAISED, 'sunken': SUNKEN, + 'groove': GROOVE, 'ridge': RIDGE } # Orientation of DirectSlider and DirectScrollBar diff --git a/direct/src/gui/DirectOptionMenu.py b/direct/src/gui/DirectOptionMenu.py index 1798ad2e80..29c74db717 100644 --- a/direct/src/gui/DirectOptionMenu.py +++ b/direct/src/gui/DirectOptionMenu.py @@ -126,7 +126,7 @@ class DirectOptionMenu(DirectButton): # So entire extent of item's slot on popup is reactive to mouse item['frameSize'] = (self.minX, self.maxX, self.minZ, self.maxZ) # Move it to its correct position on the popup - item.setPos(-self.minX, 0 , -self.maxZ - i * self.maxHeight) + item.setPos(-self.minX, 0, -self.maxZ - i * self.maxHeight) item.bind(B1RELEASE, self.hidePopupMenu) # Highlight background when mouse is in item item.bind(WITHIN, diff --git a/direct/src/leveleditor/LevelEditor.py b/direct/src/leveleditor/LevelEditor.py index b0fedb60dd..d728e68b9c 100644 --- a/direct/src/leveleditor/LevelEditor.py +++ b/direct/src/leveleditor/LevelEditor.py @@ -2833,7 +2833,7 @@ class LevelEditor(NodePath, DirectObject): # Draw a line from start to end edgeLine = LineNodePath(parent) edgeLine.lineNode.setName('suitEdge') - edgeLine.setColor(VBase4(0.0, 0.0, 0.5 ,1)) + edgeLine.setColor(VBase4(0.0, 0.0, 0.5,1)) edgeLine.setThickness(1) edgeLine.reset() # We need to draw the arrow relative to the parent, but the @@ -3388,7 +3388,7 @@ class LevelEditor(NodePath, DirectObject): return newGroup def makeNewBuildingGroup(self, sequenceNum, side, curveName): - print "-------------------------- new building group %s curveName=%s------------------------" % (sequenceNum , curveName) + print "-------------------------- new building group %s curveName=%s------------------------" % (sequenceNum, curveName) # Now create a new group with just the buildings self.addGroup(self.NPToplevel) newGroup = self.NPParent diff --git a/direct/src/pyinst/Builder.py b/direct/src/pyinst/Builder.py index 44465b7fd9..dafce3cf7f 100644 --- a/direct/src/pyinst/Builder.py +++ b/direct/src/pyinst/Builder.py @@ -409,8 +409,8 @@ dispatch = { 'CARCHIVE': ArchiveTarget, 'COLLECT': CollectTarget, 'STANDALONE': ExeTarget, - 'INSTALL' : InstallTarget, - 'FULLEXE' : FullExeTarget, + 'INSTALL': InstallTarget, + 'FULLEXE': FullExeTarget, } @@ -428,13 +428,13 @@ optdefaults = { 'type':'PYZ', 'directories':'', # PYZ 'excludes':'', # PYZ, INSTALL, COLLECT 'expatterns': '', - 'exstdlib' : '0', - 'extypes' : '', + 'exstdlib': '0', + 'extypes': '', 'includes':'', # PYZ 'packages':'', # PYZ 'destdir':'', # COLLECT - 'pathprefix' : '', - 'trees' : '', + 'pathprefix': '', + 'trees': '', 'debug' : '0', 'support' : '1', # include python20.dll & exceptons.pyc at a minimum 'icon': '', diff --git a/direct/src/tkpanels/AnimPanel.py b/direct/src/tkpanels/AnimPanel.py index 16821e6e3d..4ba82a8554 100644 --- a/direct/src/tkpanels/AnimPanel.py +++ b/direct/src/tkpanels/AnimPanel.py @@ -413,7 +413,7 @@ class ActorControl(Pmw.MegaWidget): animMenu.pack(side = 'left', padx = 5, expand = 0) # Combo box to select frame rate - playRateList = ['1/24.0', '0.1', '0.5', '1.0', '2.0', '5.0' , '10.0'] + playRateList = ['1/24.0', '0.1', '0.5', '1.0', '2.0', '5.0', '10.0'] playRate = '%0.1f' % self['actor'].getPlayRate(self['active']) if playRate not in playRateList: def strCmp(a, b): diff --git a/direct/src/tkpanels/MopathRecorder.py b/direct/src/tkpanels/MopathRecorder.py index 37aad1debd..41eb41dfcd 100644 --- a/direct/src/tkpanels/MopathRecorder.py +++ b/direct/src/tkpanels/MopathRecorder.py @@ -1838,7 +1838,7 @@ class MopathRecorder(AppShell, DirectObject): command = None, **kw): # Set label's text kw['text'] = text - widget = apply(VectorWidgets.ColorEntry, (parent,) ,kw) + widget = apply(VectorWidgets.ColorEntry, (parent,),kw) # Do this after the widget so command isn't called on creation widget['command'] = command widget.pack(fill = X) diff --git a/direct/src/tkpanels/NotifyPanel.py b/direct/src/tkpanels/NotifyPanel.py index 6db4b35274..c89d11a34c 100644 --- a/direct/src/tkpanels/NotifyPanel.py +++ b/direct/src/tkpanels/NotifyPanel.py @@ -9,7 +9,7 @@ class NotifyPanel: notify levels for all available DIRECT and PANDA notify categories """ # Make sure TK mainloop is running - from direct.showbase.TkGlobal import Pmw, Toplevel, Frame, Label , Radiobutton + from direct.showbase.TkGlobal import Pmw, Toplevel, Frame, Label, Radiobutton from direct.showbase.TkGlobal import HORIZONTAL, X, W, NW, BOTH, LEFT, RIGHT, IntVar # To get severity levels from pandac.PandaModules import NSFatal, NSError, NSWarning, NSInfo diff --git a/direct/src/tkpanels/ParticlePanel.py b/direct/src/tkpanels/ParticlePanel.py index b326891ac9..6d7a52c5d4 100644 --- a/direct/src/tkpanels/ParticlePanel.py +++ b/direct/src/tkpanels/ParticlePanel.py @@ -970,7 +970,7 @@ class ParticlePanel(AppShell): command = None, **kw): # Set label's text kw['text'] = text - widget = apply(VectorWidgets.ColorEntry, (parent,) ,kw) + widget = apply(VectorWidgets.ColorEntry, (parent,),kw) # Do this after the widget so command isn't called on creation widget['command'] = command widget.pack(fill = X)