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 e512af7 commit f851d67
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/fake_bpy_module/transformer/data_type_refiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
REGEX_MATCH_DATA_TYPE_LIST_OF_PARENTHESES_VALUE = re.compile(r"^list of \(([a-zA-Z.,` ]+)\)") # noqa: E501
REGEX_MATCH_DATA_TYPE_PAIR_OF_VALUE = re.compile(r"^pair of `([A-Za-z0-9_.]+)`")
REGEX_MATCH_DATA_TYPE_BMELEMSEQ_OF_VALUE = re.compile(r"`BMElemSeq` of `([a-zA-Z0-9]+)`$") # noqa: E501
REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_VALUE = re.compile(r"`BMLayerCollection` of ([a-zA-Z0-9]+)$") # noqa: E501
REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_CLASS = re.compile(r"`BMLayerCollection` of `([a-zA-Z0-9]+)`$") # noqa: E501
REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_VALUE = re.compile(r"`BMLayerCollection` of ([a-zA-Z0-9_]+)$") # noqa: E501
REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_CLASS = re.compile(r"`BMLayerCollection` of `([a-zA-Z0-9._]+)`$") # noqa: E501
REGEX_MATCH_DATA_TYPE_TUPLE_OF_VALUE = re.compile(r"^tuple of `([a-zA-Z0-9.]+)`('s)*$") # noqa: E501
REGEX_MATCH_DATA_TYPE_LIST_OR_DICT_OR_SET_OR_TUPLE = re.compile(r"^`*(list|dict|set|tuple)`*\.*$") # noqa: E501
REGEX_MATCH_DATA_TYPE_OT = re.compile(r"^`([A-Z]+)_OT_([A-Za-z_]+)`$")
Expand Down Expand Up @@ -167,7 +167,7 @@ def _parse_custom_data_type(

return None

# pylint: disable=R0911,R0912,R0913
# pylint: disable=R0911,R0912,R0913,R0915
def _get_refined_data_type_fast( # noqa: C901, PLR0911, PLR0912
self, dtype_str: str, uniq_full_names: set[str],
uniq_module_names: set[str], module_name: str,
Expand Down Expand Up @@ -476,15 +476,19 @@ def _get_refined_data_type_fast( # noqa: C901, PLR0911, PLR0912
# [Ex] BMLayerCollection of float
if m := REGEX_MATCH_DATA_TYPE_BMLAYERCOLLECTION_OF_VALUE.match(dtype_str):

Check failure on line 477 in src/fake_bpy_module/transformer/data_type_refiner.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E501)

src/fake_bpy_module/transformer/data_type_refiner.py:477:81: E501 Line too long (82 > 80)
return [
make_data_type_node(f"`bmesh.types.BMLayerCollection`[{m.group(1)}]")
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):

Check failure on line 484 in src/fake_bpy_module/transformer/data_type_refiner.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E501)

src/fake_bpy_module/transformer/data_type_refiner.py:484:81: E501 Line too long (82 > 80)
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}`]")
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):
Expand Down

0 comments on commit f851d67

Please sign in to comment.