Skip to content

Update: add handling for .. details:: section#445

Open
Andrej730 wants to merge 3 commits into
nutti:mainfrom
Andrej730:support-details
Open

Update: add handling for .. details:: section#445
Andrej730 wants to merge 3 commits into
nutti:mainfrom
Andrej730:support-details

Conversation

@Andrej730

@Andrej730 Andrej730 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixing issue with the latest build, see https://github.com/nutti/fake-bpy-module/actions/runs/26812382083/job/79045490819


  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2660, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
    return method(self, expmatch)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2107, in directive
    return self.unknown_directive(type_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2288, in unknown_directive
    error = self.reporter.error('Unknown directive type "%s".' % type_name,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/utils/__init__.py", line 231, in error
    return self.system_message(self.ERROR_LEVEL, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/utils/__init__.py", line 197, in system_message
    raise SystemMessage(msg, level)
docutils.utils.SystemMessage: <string>:97: (ERROR/3) Unknown directive type "details".

.. details:: Special Methods

   .. method:: __repr__()

      :rtype: str

First I've added actual handling for details, but they're in conflict with how we approach adding our mod files - see details in 7c48cf2.
For now I've added a documented skip, so our stubs still will be usable, until we figure what to do next.


Regarding second error below I've submitted a fix upstream - https://projects.blender.org/blender/blender/pulls/159506


  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
                                  ^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2776, in underline
    msg = self.reporter.severe(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/utils/__init__.py", line 239, in severe
    return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docutils/utils/__init__.py", line 197, in system_message
    raise SystemMessage(msg, level)
docutils.utils.SystemMessage: <string>:183: (SEVERE/4) Unexpected section title.

@Andrej730 Andrej730 marked this pull request as draft June 3, 2026 07:35
@Andrej730 Andrej730 marked this pull request as ready for review June 3, 2026 07:59

@nutti nutti left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for attempting this @Andrej730

It is better to follow the official document instead of mod file.
In case, is it possible to restrict the version (like 5.1-) for applying the mod file?
https://github.com/nutti/fake-bpy-module/tree/main/src/mods/blender/3.3%2B

@Andrej730

Copy link
Copy Markdown
Contributor Author

It is better to follow the official document instead of mod file.
In case, is it possible to restrict the version (like 5.1-) for applying the mod file?
https://github.com/nutti/fake-bpy-module/tree/main/src/mods/blender/3.3%2B

You mean to actually support .. details::? I think that can be a separate change, because I'm not sure exactly what's the right way to reconcile the conflicts between upstream dunder methods and our mod files. Some methods are implemented upstream, but I don't know how accurately and some mod files are probably will be needed still.

My intention here was to just unblock fake-bpy-module building for now, to keep stubs usable the way they were and to see if there are any other build issues.

https://github.com/Andrej730/fake-bpy-module/blob/b97446ca2e4feaca10c35c282b9420b369b42338/src/fake_bpy_module/analyzer/directives.py#L700-L712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants