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:
Diffstat (limited to 'doc/python_api/examples')
-rw-r--r--doc/python_api/examples/bpy.props.5.py2
-rw-r--r--doc/python_api/examples/bpy.types.Operator.5.py2
-rw-r--r--doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py1
-rw-r--r--doc/python_api/examples/mathutils.Euler.py2
4 files changed, 3 insertions, 4 deletions
diff --git a/doc/python_api/examples/bpy.props.5.py b/doc/python_api/examples/bpy.props.5.py
index d2ace54de27..4e9d61d5385 100644
--- a/doc/python_api/examples/bpy.props.5.py
+++ b/doc/python_api/examples/bpy.props.5.py
@@ -75,7 +75,7 @@ print(scene.test_float)
scene.test_array = (True, False)
print([x for x in scene.test_array])
-#scene.test_date = "blah" # this would fail, property is read-only
+# scene.test_date = "blah" # this would fail, property is read-only
print(scene.test_date)
scene.test_enum = 'BLUE'
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index 4a0abcb62c3..78030c7d7c4 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
self.execute(context)
elif event.type == 'LEFTMOUSE': # Confirm
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
+ elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
context.object.location.x = self.init_loc_x
return {'CANCELLED'}
diff --git a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
index 05163b332a9..a83b23e84f9 100644
--- a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
+++ b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_get.py
@@ -8,4 +8,3 @@ collection.foreach_get(attr, some_seq)
# Python equivalent
for i in range(len(seq)):
some_seq[i] = getattr(collection[i], attr)
-
diff --git a/doc/python_api/examples/mathutils.Euler.py b/doc/python_api/examples/mathutils.Euler.py
index 3f87cc0ab04..bfd2a3ed5a0 100644
--- a/doc/python_api/examples/mathutils.Euler.py
+++ b/doc/python_api/examples/mathutils.Euler.py
@@ -5,7 +5,7 @@ import math
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')
# rotate the euler
-eul.rotate_axis(math.radians(10.0), 'Z')
+eul.rotate_axis('Z', math.radians(10.0))
# you can access its components by attribute or index
print("Euler X", eul.x)