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 <campbell@blender.org>2022-02-22 02:28:01 +0300
committerCampbell Barton <campbell@blender.org>2022-02-22 02:28:01 +0300
commitfcda858e3200551a7ae12605c34e5931f6ee3c2e (patch)
tree27eaa9823c92e16f30b647f18a378ebe485eb059 /release/scripts/startup/bl_operators/wm.py
parentca12696257ac0acd34dd5481b74f33feca9a4c14 (diff)
Cleanup: remove Python 3.9 annotation workarounds
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 9ba5480cf5a..fd0671a2369 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -963,21 +963,19 @@ class WM_OT_url_open(Operator):
return {'FINISHED'}
-# NOTE: needed for Python 3.10 since there are name-space issues with annotations.
-# This can be moved into the class as a static-method once Python 3.9x is dropped.
-def _wm_url_open_preset_type_items(_self, _context):
- return [item for (item, _) in WM_OT_url_open_preset.preset_items]
-
-
class WM_OT_url_open_preset(Operator):
"""Open a preset website in the web browser"""
bl_idname = "wm.url_open_preset"
bl_label = "Open Preset Website"
bl_options = {'INTERNAL'}
+ @staticmethod
+ def _wm_url_open_preset_type_items(_self, _context):
+ return [item for (item, _) in WM_OT_url_open_preset.preset_items]
+
type: EnumProperty(
name="Site",
- items=_wm_url_open_preset_type_items,
+ items=WM_OT_url_open_preset._wm_url_open_preset_type_items,
)
id: StringProperty(
@@ -1283,12 +1281,6 @@ rna_vector_subtype_items = (
)
-# NOTE: needed for Python 3.10 since there are name-space issues with annotations.
-# This can be moved into the class as a static-method once Python 3.9x is dropped.
-def _wm_properties_edit_subtype_items(_self, _context):
- return WM_OT_properties_edit.subtype_items
-
-
class WM_OT_properties_edit(Operator):
"""Change a custom property's type, or adjust how it is displayed in the interface"""
bl_idname = "wm.properties_edit"
@@ -1395,7 +1387,7 @@ class WM_OT_properties_edit(Operator):
)
subtype: EnumProperty(
name="Subtype",
- items=_wm_properties_edit_subtype_items,
+ items=WM_OT_properties_edit.subtype_items,
)
# String properties.