Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Oct 10, 2024
1 parent f851d67 commit fe1897e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
26 changes: 11 additions & 15 deletions src/fake_bpy_module/transformer/data_type_refiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,26 +470,22 @@ def _get_refined_data_type_fast( # noqa: C901, PLR0911, PLR0912
s = self._parse_custom_data_type(
m.group(1), uniq_full_names, uniq_module_names, module_name)
if s:
return [
make_data_type_node(f"`bmesh.types.BMElemSeq`[`{s}`]")
]
return [make_data_type_node(f"`bmesh.types.BMElemSeq`[`{s}`]")]
# [Ex] BMLayerCollection of float
if m := REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_VALUE.match(dtype_str):
return [
make_data_type_node(
f"`bmesh.types.BMLayerCollection`[{m.group(1)}]"
)
]
if m := REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_VALUE.match(
dtype_str):
return [make_data_type_node(
f"`bmesh.types.BMLayerCollection`[{m.group(1)}]"
)]
# [Ex] BMLayerCollection of `mathutils.Vector`
if m := REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_CLASS.match(dtype_str):
if m := REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_CLASS.match(
dtype_str):
s = self._parse_custom_data_type(
m.group(1), uniq_full_names, uniq_module_names, module_name)
if s:
return [
make_data_type_node(
f"`bmesh.types.BMLayerCollection`[`{s}`]"
)
]
return [make_data_type_node(
f"`bmesh.types.BMLayerCollection`[`{s}`]"
)]
# [Ex] tuple of mathutils.Vector's
if m := REGEX_MATCH_DATA_TYPE_TUPLE_OF_VALUE.match(dtype_str):
s = self._parse_custom_data_type(
Expand Down
6 changes: 1 addition & 5 deletions src/mods/common/analyzer/update/bmesh.types.mod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

.. class:: BMLayerCollection

:mod-option base-class: skip-refine

.. attribute:: active

:type: :class:`bmesh.types.BMLayerItem`\ [_GenericType1]
Expand Down Expand Up @@ -44,9 +42,7 @@

.. class:: BMLayerItem

.. base-class:: typing.Generic[_GenericType1]

:mod-option base-class: skip-refine
:generic-types: _GenericType1

.. class:: BMVert

Expand Down

0 comments on commit fe1897e

Please sign in to comment.