pep8 compliance: E231 missing whitespace after ','

This commit is contained in:
David Sowder 2012-02-19 20:38:22 -06:00
parent a7e9c0217d
commit 4cfa0ebd2b

View File

@ -1095,7 +1095,7 @@ class CameraViewport(GLViewport):
def drawCeiling(self): def drawCeiling(self):
glMatrixMode(GL_MODELVIEW) glMatrixMode(GL_MODELVIEW)
# glPushMatrix() # glPushMatrix()
x,y,z = self.cameraPosition x, y, z = self.cameraPosition
x -= x % 16 x -= x % 16
z -= z % 16 z -= z % 16
y = self.editor.level.Height y = self.editor.level.Height
@ -1313,7 +1313,7 @@ class ChunkViewport(CameraViewport):
def zoom(self, f): def zoom(self, f):
x, y, z = self.cameraPosition x, y, z = self.cameraPosition
mx,my,mz = self.blockFaceUnderCursor[0] mx, my, mz = self.blockFaceUnderCursor[0]
dx, dz = mx-x, mz-z dx, dz = mx-x, mz-z
s = min(4.0, max(1/16., self.defaultScale / f)) s = min(4.0, max(1/16., self.defaultScale / f))
if s != self.defaultScale: if s != self.defaultScale:
@ -1995,8 +1995,8 @@ class LevelEditor(GLViewport):
menu = Menu("", dimensionsMenu) menu = Menu("", dimensionsMenu)
def presentMenu(): def presentMenu():
x,y = self.netherPanel.topleft x, y = self.netherPanel.topleft
dimIdx = menu.present(self, (x,y - menu.height)) dimIdx = menu.present(self, (x, y - menu.height))
if dimIdx == -1: if dimIdx == -1:
return return
dimNo = int(dimensionsMenu[dimIdx][1]) dimNo = int(dimensionsMenu[dimIdx][1])
@ -2013,7 +2013,7 @@ class LevelEditor(GLViewport):
if len(list(self.level.allChunks)) == 0: if len(list(self.level.allChunks)) == 0:
resp = ask("It looks like this level is completely empty! You'll have to create some chunks before you can get started.", responses = ["Create Chunks", "Cancel"]) resp = ask("It looks like this level is completely empty! You'll have to create some chunks before you can get started.", responses = ["Create Chunks", "Cancel"])
if resp == "Create Chunks": if resp == "Create Chunks":
x,y,z = self.mainViewport.cameraPosition x, y, z = self.mainViewport.cameraPosition
box = BoundingBox((x-128, 0, z-128), (256, self.level.Height, 256)) box = BoundingBox((x-128, 0, z-128), (256, self.level.Height, 256))
self.selectionTool.setSelection(box) self.selectionTool.setSelection(box)
self.toolbar.selectTool(8) self.toolbar.selectTool(8)
@ -2373,7 +2373,7 @@ class LevelEditor(GLViewport):
fractionalReachAdjustment = True fractionalReachAdjustment = True
def postMouseMoved(self): def postMouseMoved(self):
evt = event.Event(MOUSEMOTION, rel=(0,0), pos=mouse.get_pos(), buttons=mouse.get_pressed()) evt = event.Event(MOUSEMOTION, rel=(0, 0), pos=mouse.get_pos(), buttons=mouse.get_pressed())
event.post(evt) event.post(evt)
def resetReach(self): def resetReach(self):
@ -3239,7 +3239,7 @@ class LevelEditor(GLViewport):
def updateInspectionString(self, blockPosition): def updateInspectionString(self, blockPosition):
self.inspectionString += str(blockPosition) + ": " self.inspectionString += str(blockPosition) + ": "
x,y,z = blockPosition x, y, z = blockPosition
try: try:
if self.debug: if self.debug:
@ -3283,13 +3283,13 @@ class LevelEditor(GLViewport):
except: except:
pass pass
try: try:
tp = self.level.getChunk(cx,cz).TerrainPopulated tp = self.level.getChunk(cx, cz).TerrainPopulated
self.inspectionString += ", TP: %d" % tp self.inspectionString += ", TP: %d" % tp
except: except:
pass pass
if isinstance(self.level, pymclevel.pocket.PocketWorld): if isinstance(self.level, pymclevel.pocket.PocketWorld):
ch = self.level.getChunk(cx,cz) ch = self.level.getChunk(cx, cz)
self.inspectionString += ", DC: %s" % ch.DirtyColumns[z & 15, x & 15] self.inspectionString += ", DC: %s" % ch.DirtyColumns[z & 15, x & 15]
self.inspectionString += ", Ch(%d, %d): %s" % (cx, cz, path) self.inspectionString += ", Ch(%d, %d): %s" % (cx, cz, path)
@ -3391,9 +3391,9 @@ class LevelEditor(GLViewport):
def idleHandler(evt): def idleHandler(evt):
x,y,z = self.blockFaceUnderCursor[0] x, y, z = self.blockFaceUnderCursor[0]
cx, cz = x//16, z//16 cx, cz = x//16, z//16
cr = self.renderer.chunkRenderers.get((cx,cz)) cr = self.renderer.chunkRenderers.get((cx, cz))
if None is cr: if None is cr:
return return