From eeb0bc72d460ee51569b9ddc63aed4f37cd48bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 4 Feb 2023 21:02:37 +0100 Subject: [PATCH] Apply sphinx-lint to documentation --- .gitlab-ci.yml | 6 ++++++ modules/product_cost_warehouse/doc/usage.rst | 2 +- modules/stock_supply/doc/index.rst | 2 +- trytond/doc/ref/backend.rst | 6 +++--- trytond/doc/ref/fields.rst | 2 +- trytond/doc/ref/transaction.rst | 2 +- trytond/doc/topics/configuration.rst | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34523bc191..4b4f364a46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,9 +53,15 @@ documentation: variables: DOC_BASE_URL: ${CI_PROJECT_DIR}/docs DOC_DIR: doc + cache: + paths: + - .cache/pip/http + before_script: + - pip install sphinx-lint script: - cd "${PACKAGE}" - python -m sphinx -T -E -W -n -b html ${DOC_DIR} _build/html + - python -m sphinxlint ${DOC_DIR} - | if [ "${CHECK_LINK}" ]; then python -m sphinx -T -E -W -n -b linkcheck ${DOC_DIR} _build; diff --git a/modules/product_cost_warehouse/doc/usage.rst b/modules/product_cost_warehouse/doc/usage.rst index e0421d71f2..f404126196 100644 --- a/modules/product_cost_warehouse/doc/usage.rst +++ b/modules/product_cost_warehouse/doc/usage.rst @@ -27,7 +27,7 @@ prices is configured to run for each different warehouse. .. _Viewing product cost prices: Viewing product cost prices -=========================== +=========================== With this module activated each `Product's ` cost price is shown based on your current `Company ` diff --git a/modules/stock_supply/doc/index.rst b/modules/stock_supply/doc/index.rst index 4242b81b73..07cb4f6875 100644 --- a/modules/stock_supply/doc/index.rst +++ b/modules/stock_supply/doc/index.rst @@ -14,7 +14,7 @@ location. process will be triggered. * The maximum quantity is the threshold quantity above which the overflowing - process will be triggered. + process will be triggered. * The target quantity is the quantity that will be found in the location after the provisioning / overflowing process has been completed. diff --git a/trytond/doc/ref/backend.rst b/trytond/doc/ref/backend.rst index 691aa951ae..6f729f9412 100644 --- a/trytond/doc/ref/backend.rst +++ b/trytond/doc/ref/backend.rst @@ -29,7 +29,7 @@ Database .. method:: Database.get_connection([autocommit[, readonly]]) - Retrieve a connection object as defined by :pep:249#connection. + Retrieve a connection object as defined by :pep:`249#connection`. If autocommit is set, the connection is committed after each statement. If readonly is set, the connection is read only. @@ -172,8 +172,8 @@ Database .. method:: Database.sequence_update(connection, name[, number_increment[, start_value]]) - Modify the named sequence with ``number_increment`` and ``start_value``using - the ``connection``. + Modify the named sequence with ``number_increment`` and ``start_value`` + using the ``connection``. .. method:: Database.sequence_rename(connection, old_name, new_name) diff --git a/trytond/doc/ref/fields.rst b/trytond/doc/ref/fields.rst index de2011e0ce..692813ecfb 100644 --- a/trytond/doc/ref/fields.rst +++ b/trytond/doc/ref/fields.rst @@ -601,7 +601,7 @@ Class methods: .. classmethod:: Selection.get_selection(model, name, inst) - Returns a :py:class`dictionary ` mapping the selection value to its + Returns a :py:class:`dictionary ` mapping the selection value to its human-readable value. .. classmethod:: Selection.get_selection_string(selection, value) diff --git a/trytond/doc/ref/transaction.rst b/trytond/doc/ref/transaction.rst index afbe6bb0aa..991bc10ca2 100644 --- a/trytond/doc/ref/transaction.rst +++ b/trytond/doc/ref/transaction.rst @@ -72,7 +72,7 @@ Transaction .. staticmethod:: Transaction.monotonic_time - Return a monotonic time used to populate :attr:~Transaction.started_at. + Return a monotonic time used to populate :attr:`~Transaction.started_at`. .. method:: Transaction.start(database_name, user[, readonly[, context[, close[, autocommit, \**extras]]]]) diff --git a/trytond/doc/topics/configuration.rst b/trytond/doc/topics/configuration.rst index d350fca6aa..9a0bd00d98 100644 --- a/trytond/doc/topics/configuration.rst +++ b/trytond/doc/topics/configuration.rst @@ -639,7 +639,7 @@ The space separated list of TinyMCE plugins to load. It can be overridden for specific models and fields using the names: ``plugins--`` or ``plugins-``. -Default: `` +Default: ``''`` css ~~~