Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 09:23:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 09:23:14 +0400
commit50a06eccff48a2029fa085dc8459246ff8c6394e (patch)
tree8c7d733b9358317b425833e8a3497dd200446504
parent7ccfec1ff3ea0ee0ebdbdb91e3e44ab03ab81d6f (diff)
pep8 cleanup
-rw-r--r--build_files/buildbot/master.cfg37
-rw-r--r--build_files/buildbot/master_unpack.py2
-rw-r--r--build_files/buildbot/slave_compile.py3
-rw-r--r--build_files/buildbot/slave_pack.py3
-rw-r--r--build_files/buildbot/slave_test.py4
-rw-r--r--build_files/cmake/cmake_qtcreator_project.py1
-rwxr-xr-xbuild_files/package_spec/build_archive.py2
-rw-r--r--doc/python_api/sphinx_doc_gen.py1
-rw-r--r--release/scripts/modules/animsys_refactor.py6
-rw-r--r--release/scripts/modules/bpyml.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py2
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py4
-rw-r--r--source/tests/pep8.py2
13 files changed, 47 insertions, 32 deletions
diff --git a/build_files/buildbot/master.cfg b/build_files/buildbot/master.cfg
index f6aa6390e8c..6913ed2dab0 100644
--- a/build_files/buildbot/master.cfg
+++ b/build_files/buildbot/master.cfg
@@ -1,6 +1,8 @@
# -*- python -*-
# ex: set syntax=python:
+# <pep8 compliant>
+
# Dictionary that the buildmaster pays attention to.
c = BuildmasterConfig = {}
@@ -36,12 +38,12 @@ c['change_source'] = SVNPoller(
# only take place on one slave.
from buildbot.process.factory import BuildFactory
-from buildbot.steps.source import SVN
+from buildbot.steps.source import SVN
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test
from buildbot.steps.transfer import FileUpload
-from buildbot.steps.transfer import FileDownload
+# from buildbot.steps.transfer import FileDownload
from buildbot.steps.master import MasterShellCommand
from buildbot.config import BuilderConfig
@@ -50,6 +52,7 @@ from buildbot.config import BuilderConfig
c['builders'] = []
buildernames = []
+
def add_builder(c, name, libdir, factory):
slavenames = []
@@ -64,15 +67,18 @@ def add_builder(c, name, libdir, factory):
# common steps
+
def svn_step():
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
+
def lib_svn_step(dir):
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
# generic builder
-def generic_builder(id, libdir=''):
+
+def generic_builder(id, libdir=""):
filename = 'buildbot_upload_' + id + '.zip'
compile_script = '../blender/build_files/buildbot/slave_compile.py'
test_script = '../blender/build_files/buildbot/slave_test.py'
@@ -88,9 +94,9 @@ def generic_builder(id, libdir=''):
f.addStep(Test(command=['python', test_script, id]))
f.addStep(ShellCommand(name='package', command=['python', pack_script, id], description='packaging', descriptionDone='packaged'))
if id.find('cmake') != -1:
- f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024))
+ f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
else:
- f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100*1024*1024, workdir='install'))
+ f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
return f
@@ -107,7 +113,7 @@ add_builder(c, 'win32_scons', 'windows', generic_builder)
#
# Decide how to react to incoming changes.
-from buildbot.scheduler import Scheduler
+# from buildbot.scheduler import Scheduler
from buildbot.schedulers import timed
c['schedulers'] = []
@@ -132,18 +138,18 @@ c['schedulers'].append(timed.Nightly(name='nightly',
c['status'] = []
from buildbot.status import html
-from buildbot.status.web import auth, authz
+from buildbot.status.web import authz
-authz_cfg=authz.Authz(
+authz_cfg = authz.Authz(
# change any of these to True to enable; see the manual for more
# options
- gracefulShutdown = False,
- forceBuild = True, # use this to test your slave once it is set up
- forceAllBuilds = False,
- pingBuilder = False,
- stopBuild = False,
- stopAllBuilds = False,
- cancelPendingBuild = False,
+ gracefulShutdown=False,
+ forceBuild=True, # use this to test your slave once it is set up
+ forceAllBuilds=False,
+ pingBuilder=False,
+ stopBuild=False,
+ stopAllBuilds=False,
+ cancelPendingBuild=False,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
@@ -168,4 +174,3 @@ c['buildbotURL'] = "http://builder.blender.org/"
# installations.
c['db_url'] = "sqlite:///state.sqlite"
-
diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py
index 5e0c6beb962..f97e53384b0 100644
--- a/build_files/buildbot/master_unpack.py
+++ b/build_files/buildbot/master_unpack.py
@@ -19,6 +19,8 @@
# Runs on Buildbot master, to unpack incoming unload.zip into latest
# builds directory and remove older builds.
+# <pep8 compliant>
+
import os
import shutil
import sys
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py
index 708c2951272..54150a93e61 100644
--- a/build_files/buildbot/slave_compile.py
+++ b/build_files/buildbot/slave_compile.py
@@ -16,6 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
+# <pep8 compliant>
+
import os
import subprocess
import sys
@@ -56,4 +58,3 @@ else:
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)
-
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index 12171cf4003..74d00bf9249 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -16,6 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
+# <pep8 compliant>
+
# Runs on buildbot slave, creating a release package using the build
# system and zipping it into buildbot_upload.zip. This is then uploaded
# to the master in the next buildbot step.
@@ -83,4 +85,3 @@ try:
except Exception, ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)
-
diff --git a/build_files/buildbot/slave_test.py b/build_files/buildbot/slave_test.py
index 7e78f1ab5cd..f79ef7cf5c6 100644
--- a/build_files/buildbot/slave_test.py
+++ b/build_files/buildbot/slave_test.py
@@ -16,7 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
-import os
+# <pep8 compliant>
+
import subprocess
import sys
@@ -37,4 +38,3 @@ if builder.find('cmake') != -1:
else:
# scons
pass
-
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py
index cf1da2f666f..1bad1835434 100644
--- a/build_files/cmake/cmake_qtcreator_project.py
+++ b/build_files/cmake/cmake_qtcreator_project.py
@@ -126,7 +126,6 @@ def cmake_advanced_info():
defines = []
import os
- import sys
create_eclipse_project(CMAKE_DIR)
diff --git a/build_files/package_spec/build_archive.py b/build_files/package_spec/build_archive.py
index 2496c2295eb..0329d16b1ec 100755
--- a/build_files/package_spec/build_archive.py
+++ b/build_files/package_spec/build_archive.py
@@ -1,5 +1,7 @@
#!/usr/bin/python
+# <pep8 compliant>
+
import os
import shutil
import subprocess
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index bc190231e36..b479b19c297 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -110,6 +110,7 @@ if _BPY_PROP_COLLECTION_FAKE:
else:
_BPY_PROP_COLLECTION_ID = "collection"
+
def undocumented_message(module_name, type_name, identifier):
if str(type_name).startswith('<module'):
preloadtitle = '%s.%s' % (module_name, identifier)
diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py
index 9f2acc5e268..5336a8b2b35 100644
--- a/release/scripts/modules/animsys_refactor.py
+++ b/release/scripts/modules/animsys_refactor.py
@@ -27,10 +27,12 @@ The main function to use is: update_data_paths(...)
IS_TESTING = False
+
def drepr(string):
# is there a less crappy way to do this in python?, re.escape also escapes
# single quotes strings so cant use it.
- return '"%s"' % repr(string)[1:-1].replace("\"", "\\\"").replace("\\'","'")
+ return '"%s"' % repr(string)[1:-1].replace("\"", "\\\"").replace("\\'", "'")
+
class DataPathBuilder(object):
__slots__ = ("data_path", )
@@ -185,7 +187,7 @@ def update_data_paths(rna_update):
if data_path_new != data_path:
if not IS_TESTING:
fcurve.data_path = data_path_new
- fcurve.driver.is_valid = True; # reset to allow this to work again
+ fcurve.driver.is_valid = True # reset to allow this to work again
print("driver-fcurve (%s): %s -> %s" % (id_data.name, data_path, data_path_new))
for var in fcurve.driver.variables:
diff --git a/release/scripts/modules/bpyml.py b/release/scripts/modules/bpyml.py
index f1f72d50fd2..fdf5172a0b3 100644
--- a/release/scripts/modules/bpyml.py
+++ b/release/scripts/modules/bpyml.py
@@ -160,9 +160,9 @@ if __name__ == "__main__":
from bpyml_test import *
draw = [
- ui() [
- split() [
- column() [
+ ui()[
+ split()[
+ column()[
prop(data='context.scene.render', property='use_stamp_time', text='Time'),
prop(data='context.scene.render', property='use_stamp_date', text='Date'),
prop(data='context.scene.render', property='use_stamp_render_time', text='RenderTime'),
@@ -173,7 +173,7 @@ if __name__ == "__main__":
prop(data='context.scene.render', property='use_stamp_marker', text='Marker'),
prop(data='context.scene.render', property='use_stamp_sequencer_strip', text='Seq. Strip')
],
- column() [
+ column()[
active(expr='context.scene.render.use_stamp'),
prop(data='context.scene.render', property='stamp_foreground', slider=True),
prop(data='context.scene.render', property='stamp_background', slider=True),
@@ -181,9 +181,9 @@ if __name__ == "__main__":
prop(data='context.scene.render', property='stamp_font_size', text='Font Size')
]
],
- split(percentage=0.2) [
+ split(percentage=0.2)[
prop(data='context.scene.render', property='use_stamp_note', text='Note'),
- row() [
+ row()[
active(expr='context.scene.render.use_stamp_note'),
prop(data='context.scene.render', property='stamp_note_text', text='')
]
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 7aa1dee2721..4823d365633 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -20,6 +20,7 @@
import bpy
from rna_prop_ui import PropertyPanel
+
class ArmatureButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -264,6 +265,7 @@ from bl_ui.properties_animviz import (
OnionSkinButtonsPanel,
)
+
class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
#bl_label = "Bones Motion Paths"
bl_context = "data"
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index a2ba0948669..22d630643c9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1161,8 +1161,8 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.menu("VIEW3D_MT_transform")
layout.menu("VIEW3D_MT_pose_transform")
- layout.menu("VIEW3D_MT_pose_apply")
-
+ layout.menu("VIEW3D_MT_pose_apply")
+
layout.menu("VIEW3D_MT_snap")
layout.separator()
diff --git a/source/tests/pep8.py b/source/tests/pep8.py
index 3872d169a9a..67ef12261d0 100644
--- a/source/tests/pep8.py
+++ b/source/tests/pep8.py
@@ -42,7 +42,7 @@ SKIP_PREFIX = "./tools", "./config", "./scons", "./extern"
def file_list_py(path):
for dirpath, dirnames, filenames in os.walk(path):
for filename in filenames:
- if filename.endswith(".py"):
+ if filename.endswith(".py") or filename.endswith(".cfg"):
yield os.path.join(dirpath, filename)