code: def test_autodoc_typehints_format_fully_qualified(app):
      if sys.version_info[:2] <= (3, 10):
          type_o = "typing.Any | None"
      else:
          type_o = "typing.Any"
  
      options = {"members": None, "undoc-members": None}
      actual = do_autodoc(app, "module", "target.typehints", options)
      assert list(actual) == [
          "",
          ".. py:module:: target.typehints",
          "",
          "",
          ".. py:data:: CONST1",
          "   :module: target.typehints",
          "   :type: int",
          "",
          "",
          ".. py:data:: CONST2",
          "   :module: target.typehints",
          "   :type: int",
          "   :value: 1",
          "",
          "   docstring",
          "",
          "",
          ".. py:data:: CONST3",
          "   :module: target.typehints",
          "   :type: pathlib.PurePosixPath",
          "   :value: PurePosixPath('/a/b/c')",
          "",
          "   docstring",
          "",
          "",
          ".. py:class:: Math(s: str, o: %s = None)" % type_o,
          "   :module: target.typehints",
          "",
          "",
          "   .. py:attribute:: Math.CONST1",
          "      :module: target.typehints",
          "      :type: int",
          "",
          "",
          "   .. py:attribute:: Math.CONST2",
          "      :module: target.typehints",
          "      :type: int",
          "      :value: 1",
          "",
          "",
          "   .. py:attribute:: Math.CONST3",
          "      :module: target.typehints",
          "      :type: pathlib.PurePosixPath",
          "      :value: PurePosixPath('/a/b/c')",
          "",
          "",
          "   .. py:method:: Math.decr(a: int, b: int = 1) -> int",
          "      :module: target.typehints",
          "",
          "",
          "   .. py:method:: Math.horse(a: str, b: int) -> None",
          "      :module: target.typehints",
          "",
          "",
          "   .. py:method:: Math.incr(a: int, b: int = 1) -> int",
          "      :module: target.typehints",
          "",
          "",
          "   .. py:method:: Math.nothing() -> None",
          "      :module: target.typehints",
          "",
          "",
          "   .. py:property:: Math.path",
          "      :module: target.typehints",
          "      :type: pathlib.PurePosixPath",
          "",
          "",
          "   .. py:property:: Math.prop",
          "      :module: target.typehints",
          "      :type: int",
          "",
          "",
          ".. py:class:: NewAnnotation(i: int)",
          "   :module: target.typehints",
          "",
          "",
          ".. py:class:: NewComment(i: int)",
          "   :module: target.typehints",
          "",
          "",
          ".. py:class:: SignatureFromMetaclass(a: int)",
          "   :module: target.typehints",
          "",
          "",
          ".. py:class:: T",
          "   :module: target.typehints",
          "",
          "   docstring",
          "",
          "   alias of TypeVar('T', bound=\\ :py:class:`pathlib.PurePosixPath`)",
          "",
          "",
          ".. py:function:: complex_func(arg1: str, arg2: List[int], arg3: Tuple[int, "
          "Union[str, Unknown]] = None, *args: str, **kwargs: str) -> None",
          "   :module: target.typehints",
          "",
          "",
          ".. py:function:: decr(a: int, b: int = 1) -> int",
          "   :module: target.typehints",
          "",
          "",
          ".. py:function:: incr(a: int, b: int = 1) -> int",
          "   :module: target.typehints",
          "",
          "",
          ".. py:function:: missing_attr(c, a: str, b: Optional[str] = None) -> str",
          "   :module: target.typehints",
          "",
          "",
          ".. py:function:: tuple_args(x: tuple[int, int | str]) -> tuple[int, int]",
          "   :module: target.typehints",
          "",
      ]
  
imports: import platform
  import sys
  from contextlib import contextmanager
  import pytest
  from sphinx.testing import restructuredtext
  from tests.test_extensions.test_ext_autodoc import do_autodoc
label_desc: Use image node_id 28 for calling a global function with example usage: test_autodoc_typehints_format_fully_qualified(app) without return types