8000 Documentation: Modernize Sphinx and update `autodoc` references by amotl · Pull Request #1709 · prompt-toolkit/python-prompt-toolkit · GitHub
[go: up one dir, main page]

Skip to content

Documentation: Modernize Sphinx and update autodoc references #1709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ docs/_build

# pycharm metadata
.idea

# virtualenvs
.venv*
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ sphinx:
python:
install:
- requirements: docs/requirements.txt
- method: setuptools
- method: pip
path: .
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False

# autodoc configuration
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
autodoc_inherit_docstrings = False
autodoc_mock_imports = [
"prompt_toolkit.eventloop.win32",
"prompt_toolkit.input.win32",
"prompt_toolkit.output.win32",
]

# -- Options for HTML output ----------------------------------------------

Expand Down
19 changes: 5 additions & 14 deletions docs/pages/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,13 @@ Eventloop
---------

.. automodule:: prompt_toolkit.eventloop
:members: EventLoop, get_traceback_from_context, From, Return,
ensure_future, create_event_loop, create_asyncio_event_loop,
get_event_loop, set_event_loop, run_in_executor, call_from_executor,
run_until_complete, Future, InvalidStateError
:members: run_in_executor_with_context, call_soon_threadsafe,
get_traceback_from_context, get_event_loop

.. automodule:: prompt_toolkit.eventloop.posix
.. automodule:: prompt_toolkit.eventloop.inputhook
:members:

.. automodule:: prompt_toolkit.eventloop.win32
:members:

.. automodule:: prompt_toolkit.eventloop.asyncio_win32
:members:

.. automodule:: prompt_toolkit.eventloop.asyncio_posix
.. automodule:: prompt_toolkit.eventloop.utils
:members:


Expand All @@ -373,8 +365,7 @@ Output
------

.. automodule:: prompt_toolkit.output
:members: Output, DummyOutput, ColorDepth, create_output,
get_default_output, set_default_output
:members: Output, DummyOutput, ColorDepth, create_output

.. automodule:: prompt_toolkit.output.vt100
:members:
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==4.1.2
wcwidth==0.2.5
pyperclip==1.8.2
sphinx_rtd_theme==0.5.2
Sphinx<7
wcwidth<1
pyperclip<2
sphinx_rtd_theme<2
0