Repository: spyder-ide/spyder

Issue:
Add link to Sphinx documentation from Preferences related to docstring
### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [x] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [x] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [x] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [x] Tried basic troubleshooting (if a bug/error)
    * [x] Restarted Spyder
    * [x] Reset preferences with ``spyder --reset``
    * [x] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [x] Tried the other applicable steps from the Troubleshooting Guide
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below

## Problem Description

In Preferences / Editor / Advanced settings / Docstring type the user can chose from three types, being Numpy, Google and Sphinx.

### What steps reproduce the problem?

1. Open Preferences / Editor / Advanced settings
2. Look at Docstring type there are two links to documentation between brackets for Numpy and Google, but a link for Sphinx is missing.

![Screenshot from 2023-09-20 23-13-44](https://github.com/spyder-ide/spyder/assets/198964/e30362b1-e551-452a-a70e-fd8d740658df)

### What is the expected output? What do you see instead?

Between brackets should be `(Numpy, Google or Sphinx)` with on Sphinx the link https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html

### Paste Traceback/Error Below (if applicable)
n/a

## Versions
* Spyder version: 5.4.5  (pip)
* Python version: 3.10.12 64-bit
* Qt version: 5.15.3
* PyQt5 version: 5.15.6
* Operating System: Linux-6.4.6-76060406-generic-x86_64-with-glibc2.35

### Dependencies
```# Mandatory:
atomicwrites >=1.2.0                                                        :  1.4.1 (OK)
chardet >=2.0.0                                                             :  4.0.0 (OK)
cloudpickle >=0.5.0                                                         :  2.2.1 (OK)
cookiecutter >=1.6.0                                                        :  2.3.0 (OK)
diff_match_patch >=20181111                                                 :  20230430 (OK)
intervaltree >=3.0.2                                                        :  3.1.0 (OK)
IPython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0,!=8.11.0,!=8.12.0,!=8.12.1 :  8.15.0 (OK)
jedi >=0.17.2,<0.19.0                                                       :  0.18.2 (OK)
jellyfish >=0.7                                                             :  1.0.0 (OK)
jsonschema >=3.2.0                                                          :  3.2.0 (OK)
keyring >=17.0.0                                                            :  23.5.0 (OK)
nbconvert >=4.0                                                             :  7.8.0 (OK)
numpydoc >=0.6.0                                                            :  1.5.0 (OK)
parso >=0.7.0,<0.9.0                                                        :  0.8.3 (OK)
pexpect >=4.4.0                                                             :  4.8.0 (OK)
pickleshare >=0.4                                                           :  0.7.5 (OK)
psutil >=5.3                                                                :  5.9.0 (OK)
pygments >=2.0                                                              :  2.16.1 (OK)
pylint >=2.5.0,<3.0                                                         :  2.17.5 (OK)
pylint_venv >=3.0.2                                                         :  3.0.2 (OK)
pyls_spyder >=0.4.0                                                         :  0.4.0 (OK)
pylsp >=1.7.4,<1.8.0                                                        :  1.7.4 (OK)
pylsp_black >=1.2.0,<3.0.0                                                  :  1.3.0 (OK)
qdarkstyle >=3.0.2,<3.2.0                                                   :  3.1 (OK)
qstylizer >=0.2.2                                                           :  0.2.2 (OK)
qtawesome >=1.2.1                                                           :  1.2.3 (OK)
qtconsole >=5.4.2,<5.5.0                                                    :  5.4.4 (OK)
qtpy >=2.1.0                                                                :  2.4.0 (OK)
rtree >=0.9.7                                                               :  1.0.1 (OK)
setuptools >=49.6.0                                                         :  59.6.0 (OK)
sphinx >=0.6.6                                                              :  7.2.6 (OK)
spyder_kernels >=2.4.4,<2.5.0                                               :  2.4.4 (OK)
textdistance >=4.2.0                                                        :  4.5.0 (OK)
three_merge >=0.1.1                                                         :  0.1.1 (OK)
watchdog >=0.10.3                                                           :  3.0.0 (OK)
xdg >=0.26                                                                  :  0.27 (OK)
zmq >=22.1.0                                                                :  25.1.1 (OK)

# Optional:
cython >=0.21                                                               :  3.0.2 (OK)
matplotlib >=3.0.0                                                          :  None (NOK)
numpy >=1.7                                                                 :  1.21.5 (OK)
pandas >=1.1.1                                                              :  1.3.5 (OK)
scipy >=0.17.0                                                              :  1.8.0 (OK)
sympy >=0.7.3                                                               :  None (NOK)```



Discussion:
Hey @PanderMusubi, this is a valid point, thanks for bringing it up. We'll address it in our next version (5.5.0), to be released next month.

Resolving patch:
diff --git a/spyder/plugins/editor/confpage.py b/spyder/plugins/editor/confpage.py
--- a/spyder/plugins/editor/confpage.py
+++ b/spyder/plugins/editor/confpage.py
@@ -18,7 +18,13 @@
 
 
 NUMPYDOC = "https://numpydoc.readthedocs.io/en/latest/format.html"
-GOOGLEDOC = "https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html"
+GOOGLEDOC = (
+    "https://sphinxcontrib-napoleon.readthedocs.io/en/latest/"
+    "example_google.html"
+)
+SPHINXDOC = (
+    "https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html"
+)
 DOCSTRING_SHORTCUT = CONF.get('shortcuts', 'editor/docstring')
 
 
@@ -247,12 +253,14 @@ def enable_tabwidth_spin(index):
 
         numpy_url = "<a href='{}'>Numpy</a>".format(NUMPYDOC)
         googledoc_url = "<a href='{}'>Google</a>".format(GOOGLEDOC)
+        sphinx_url = "<a href='{}'>Sphinx</a>".format(SPHINXDOC)
         docstring_label = QLabel(
-            _("Here you can select the type of docstrings ({} or {}) you "
+            _("Here you can select the type of docstrings ({}, {} or {}) you "
               "want the editor to automatically introduce when pressing "
-              "<tt>{}</tt> after a function/method/class "
+              "<tt>{}</tt> after a function, method or class "
               "declaration.").format(
-                  numpy_url, googledoc_url, DOCSTRING_SHORTCUT))
+                  numpy_url, googledoc_url, sphinx_url, DOCSTRING_SHORTCUT)
+        )
         docstring_label.setOpenExternalLinks(True)
         docstring_label.setWordWrap(True)
 
@@ -262,7 +270,8 @@ def enable_tabwidth_spin(index):
         docstring_combo = self.create_combobox(
             _("Type:"),
             docstring_combo_choices,
-            'docstring_type')
+            'docstring_type'
+        )
 
         docstring_layout = QVBoxLayout()
         docstring_layout.addWidget(docstring_label)


Test patch: