Skip to content

Commit 0aed3c0

Browse files
committed
📝 Fix some intersphinx issues
1 parent 1903a7a commit 0aed3c0

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
'sphinx.ext.napoleon', 'sphinxcontrib.mermaid', 'sphinx.ext.intersphinx']
3939
todo_include_todos = True
4040
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
41-
'python2': ('https://docs.python.org/2', None)}
41+
'python2': ('https://docs.python.org/2', None),
42+
'pyserial': ('https://pythonhosted.org/pyserial', None)}
4243

4344
# Add any paths that contain templates here, relative to this directory.
4445
templates_path = ['_templates']

docs/configuration/logging_yaml.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ used for the ``serial.log`` and the ``console`` handler used for the output to s
8181
maxBytes: 2097152 # 2 * 1024 * 1024 = 2 MB in bytes
8282
filename: /path/to/octoprints/logs/serial.log
8383
84-
You can find more information on the used logging handlers in the
85-
`Python documentation on logging handlers <https://docs.python.org/2/library/logging.handlers.html>`_.
84+
You can find more information on the used logging handlers in the Python documentation on
85+
:py:mod:`logging.handlers`.
8686

8787
Changing logging formatters
8888
---------------------------
@@ -97,4 +97,4 @@ expressed in YAML as follows:
9797
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
9898
9999
The possible keys for the logging format can be found in the
100-
`Python documentation on LogRecord attributes <https://docs.python.org/2/library/logging.html#logrecord-attributes>`_.
100+
:ref:`Python documentation on LogRecord attributes <logrecord-attributes>`.

docs/features/custom_controls.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@ Controls
210210
* - ``input.slider.step``
211211
- (Optional) Step size per slider "tick", defaults to 1.
212212
* - ``regex``
213-
- (Optional) A `regular expression <https://docs.python.org/2/library/re.html#regular-expression-syntax>`_ to
213+
- (Optional) A :ref:`regular expression <re-syntax>` to
214214
match against lines received from the printer to retrieve information from it (e.g. specific output). Together
215215
with ``template`` this allows rendition of received data from the printer within the UI.
216216
* - ``template``
217217
- (Optional) A template to use for rendering the match of ``regex``. May contain placeholders in
218-
`Python Format String Syntax <https://docs.python.org/2/library/string.html#format-string-syntax>`_ for either named
218+
:ref:`Python Format String Syntax <formatstrings>` for either named
219219
groups within the regex (e.g. ``Temperature: {temperature}`` for a regex ``T:\s*(?P<temperature>\d+(\.\d*)``)
220220
or positional groups within the regex (e.g. ``Position: X={0}, Y={1}, Z={2}, E={3}`` for a regex
221221
``X:([0-9.]+) Y:([0-9.]+) Z:([0-9.]+) E:([0-9.]+)``).

docs/plugins/hooks.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -926,21 +926,21 @@ octoprint.comm.transport.serial.factory
926926
closely if directly utilizing :class:`~octoprint.util.comm.MachineCom` functionality.
927927

928928
A valid serial instance is expected to provide the following methods, analogue to PySerial's
929-
`serial.Serial <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial>`_:
929+
:py:class:`serial.Serial`:
930930

931931
readline(size=None, eol='\n')
932-
Reads a line from the serial connection, compare `serial.Filelike.readline <https://pythonhosted.org//pyserial/pyserial_api.html#serial.FileLike.readline>`_.
932+
Reads a line from the serial connection, compare :py:meth:`serial.Serial.readline`.
933933
write(data)
934-
Writes data to the serial connection, compare `serial.Filelike.write <https://pythonhosted.org//pyserial/pyserial_api.html#serial.FileLike.write>`_.
934+
Writes data to the serial connection, compare :py:meth:`serial.Serial.write`.
935935
close()
936-
Closes the serial connection, compare `serial.Serial.close <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.close>`_.
936+
Closes the serial connection, compare :py:meth:`serial.Serial.close`.
937937

938938
Additionally setting the following attributes need to be supported if baudrate detection is supposed to work:
939939

940940
baudrate
941-
An integer describing the baudrate to use for the serial connection, compare `serial.Serial.baudrate <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.baudrate>`_.
941+
An integer describing the baudrate to use for the serial connection, compare :py:attr:`serial.Serial.baudrate`.
942942
timeout
943-
An integer describing the read timeout on the serial connection, compare `serial.Serial.timeout <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.timeout>`_.
943+
An integer describing the read timeout on the serial connection, compare :py:attr:`serial.Serial.timeout`.
944944

945945
**Example:**
946946

docs/plugins/injectedproperties.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ An overview of these properties follows.
2222
data files etc). Plugins should not access this property directly but instead utilize :func:`~octoprint.plugin.types.OctoPrintPlugin.get_plugin_data_folder`
2323
which will make sure the path actually does exist and if not create it before returning it.
2424
``self._logger``
25-
A `python logger instance <https://docs.python.org/2/library/logging.html>`_ logging to the log target
25+
A :py:class:`logging.Logger` instance logging to the log target
2626
``octoprint.plugin.<plugin identifier>``.
2727
``self._settings``
2828
The plugin's personalized settings manager, injected only into plugins that include the :class:`~octoprint.plugin.SettingsPlugin` mixin.

0 commit comments

Comments
 (0)