Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

unskipped built-in function (time.monotonic) by typesafety/sphinxautodoc.py #29

Open
nyirog opened this issue Aug 4, 2016 · 0 comments

Comments

@nyirog
Copy link

nyirog commented Aug 4, 2016

The sphinx plugin fails becasue typesafety tries to get the function signature of the built-in function time.monotonic.

Traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.5/inspect.py", line 1089, in getfullargspec
    sigcls=Signature)
  File "/usr/lib/python3.5/inspect.py", line 2230, in _signature_from_callable
    skip_bound_arg=skip_bound_arg)
  File "/usr/lib/python3.5/inspect.py", line 2060, in _signature_from_builtin
    raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <built-in function monotonic>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/cmdline.py", line 244, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 267, in build
    self.builder.build_update()
  File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 265, in build
    self.doctreedir, self.app))
  File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 547, in update
    self._read_serial(docnames, app)
  File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 567, in _read_serial
    self.read_doc(docname, app)
  File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 720, in read_doc
    pub.publish()
  File "/usr/lib/python3/dist-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/usr/lib/python3/dist-packages/sphinx/io.py", line 46, in read
    self.parse()
  File "/usr/lib/python3/dist-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/__init__.py", line 172, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 171, in run
    input_source=document['source'])
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2962, in text
    self.section(title.lstrip(), source, style, lineno + 1, messages)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 328, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 396, in new_subsection
    node=section_node, match_titles=True)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 283, in nested_parse
    node=node, match_titles=match_titles)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2727, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 328, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 396, in new_subsection
    node=section_node, match_titles=True)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 283, in nested_parse
    node=node, match_titles=match_titles)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/usr/lib/python3/dist-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2300, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2312, in explicit_construct
    return method(self, expmatch)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2055, in directive
    directive_class, match, type_name, option_presets)
  File "/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py", line 2104, in run_directive
    result = directive_instance.run()
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 1472, in run
    documenter.generate(more_content=self.content)
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 831, in generate
    self.document_members(all_members)
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 753, in document_members
    check_module=members_check_module and not isattr)
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 818, in generate
    sig = self.format_signature()
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 1014, in format_signature
    return Documenter.format_signature(self)
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 480, in format_signature
    self.object, self.options, args, retann)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 513, in emit_firstresult
    for result in self.emit(event, *args):
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 509, in emit
    results.append(callback(self, *args))
  File "/usr/local/lib/python3.5/dist-packages/typesafety/sphinxautodoc.py", line 44, in add_annotations_to_signature
    arg_spec = inspect.getfullargspec(func)
  File "/usr/lib/python3.5/inspect.py", line 1095, in getfullargspec
    raise TypeError('unsupported callable') from ex
TypeError: unsupported callable
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant