Skip to content

Commit

Permalink
small doc changes
Browse files Browse the repository at this point in the history
- don't treat warnings as errors, i'm not sure what the problem
  is here, like "Callable" is not found as a reference, even if
  I import it from typing module.
- remove sphinx_paramlinks sphinx extension, doesn't seem to
  work anymore not worth figuring it out, we hardly used it
- set requirements-docs.txt and tox.ini to better match rtfd.org
  • Loading branch information
jquast committed Nov 28, 2022
1 parent 891ef64 commit 7ebe72c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"github",
"sphinx_paramlinks",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
3 changes: 1 addition & 2 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Sphinx<4
sphinx-paramlinks<1
Sphinx<2 # match version constraint of readthedocs.org
sphinx-rtd-theme<1
Jinja2<3.1
10 changes: 5 additions & 5 deletions telnetlib3/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def send_charset(self, offered):
:param list offered: list of CHARSET options offered by server.
:returns: character encoding agreed to be used.
:rtype: Union[str, None]
:rtype: str or None
"""
selected = ""
for offer in offered:
Expand Down Expand Up @@ -305,10 +305,10 @@ async def open_connection(
:rfc:`1079`.
:param str xdisploc: String transmitted in response for request of
XDISPLOC, :rfc:`1086` by server (X11).
:param Callable shell: A async function that is called after
negotiation completes, receiving arguments ``(reader, writer)``.
The reader is a :class:`~.TelnetReader` instance, the writer is
a :class:`~.TelnetWriter` instance.
:param shell: A async function that is called after negotiation completes,
receiving arguments ``(reader, writer)``. The reader is a
:class:`~.TelnetReader` instance, the writer is a
:class:`~.TelnetWriter` instance.
:param float connect_minwait: The client allows any additional telnet
negotiations to be demanded by the server within this period of time
before launching the shell. Servers should assert desired negotiation
Expand Down
2 changes: 1 addition & 1 deletion telnetlib3/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def on_timeout(self):
Default implementation writes "Timeout." bound by CRLF and closes.
This can be disabled by calling :meth:`set_timeout` with
:paramref:`~.set_timeout.duration` value of ``0`` or value of
:meth:`set_timeout` parameter `duration` value of ``0``, or, value of
the same for keyword argument ``timeout``.
"""
logger.debug("Timeout after {self.idle:1.2f}s".format(self=self))
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ commands = {envbindir}/pytest \
} telnetlib3/tests

[testenv:develop]
basepython = python3.8
basepython = python3.11
commands = {posargs:{envbindir}/pytest \
--capture=no \
--looponfail \
Expand Down Expand Up @@ -55,9 +55,10 @@ commands = python -m compileall -fq {toxinidir}/telnetlib3
[testenv:docs]
# build html documentation
whitelist_externals = echo
basepython = python3.8
# readthedocs.org uses python3.7 still :(
basepython = python3.7
deps = -rrequirements-docs.txt
commands = {envbindir}/sphinx-build -W -E -v -n \
commands = {envbindir}/sphinx-build -E -v -n \
-d {toxinidir}/docs/_build/doctrees \
{posargs:-b html} docs \
{toxinidir}/docs/_build/html
Expand Down

0 comments on commit 7ebe72c

Please sign in to comment.