Skip to content

Commit 070a70e

Browse files
committed
Improve docs layout.
1 parent 06dd1c6 commit 070a70e

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

doc-source/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ flake8-encodings
99

1010
.. end short_desc
1111
12-
.. seealso:: :pep:`597` -- Add optional EncodingWarning
12+
.. only:: html
13+
14+
.. seealso:: :pep:`597` -- Add optional EncodingWarning
1315

1416
.. start shields
1517
@@ -180,6 +182,8 @@ which can be used in conjunction with this tool to identify issues at runtime.
180182
Contents
181183
-------------
182184

185+
.. html-section::
186+
183187
.. toctree::
184188
:hidden:
185189

@@ -213,6 +217,8 @@ Contents
213217
Footnotes
214218
-------------
215219

220+
.. html-section::
221+
216222
.. [1] "Packages can't be installed when encoding is not UTF-8"
217223
(https://github.com/methane/pep597-pypi-ascii)
218224

doc-source/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental
12
autodocsumm>=0.2.0
23
default-values>=0.4.2
34
extras-require>=0.2.0

doc-source/usage.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This library provides the Flake8 plugin ``flake8-encodings`` to identify incorr
88
Flake8 codes
99
--------------
1010

11-
**ENC00X**: checks for :func:`open`, :func:`builtins.open <open>` and :func:`io.open`.
11+
:bold-title:`ENC00X`: checks for :func:`open`, :func:`builtins.open <open>` and :func:`io.open`.
1212

1313
.. flake8-codes:: flake8_encodings
1414

@@ -19,17 +19,19 @@ Flake8 codes
1919

2020
``ENC003`` and ``ENC004`` are used in cases where the encoding is omitted (or is explicitly :py:obj:`None`) but the mode cannot be determined. The file might be opened in binary mode, in which case the encoding argument is ignored, or in text mode, in which case an encoding should be given.
2121

22-
**ENC01X**: checks for :meth:`configparser.ConfigParser.read`.
22+
23+
:bold-title:`ENC01X`: checks for :meth:`configparser.ConfigParser.read`.
2324

2425
.. flake8-codes:: flake8_encodings
2526

2627
ENC011
2728
ENC012
2829

2930
.. versionadded:: 0.2.0
30-
.. versionchanged:: 0.4.0 These codes now require the classes extra to be installed [1]_.
31+
.. versionchanged:: 0.4.0 These codes now require the ``classes`` extra to be installed [1]_.
32+
3133

32-
**ENC02X**: checks for :meth:`pathlib.Path.open`, :meth:`read_text() <pathlib.Path.read_text>` and :meth:`write_text() <pathlib.Path.write_text>`.
34+
:bold-title:`ENC02X`: checks for :meth:`pathlib.Path.open`, :meth:`read_text() <pathlib.Path.read_text>` and :meth:`write_text() <pathlib.Path.write_text>`.
3335

3436
.. flake8-codes:: flake8_encodings
3537

@@ -41,7 +43,7 @@ Flake8 codes
4143
ENC026
4244

4345
.. versionadded:: 0.3.0
44-
.. versionchanged:: 0.4.0 These codes now require the classes extra to be installed [1]_.
46+
.. versionchanged:: 0.4.0 These codes now require the ``classes`` extra to be installed [1]_.
4547

4648
.. [1] Install using ``python3 -m pip install flake8-encodings[classes]``
4749

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ extensions = [
7676
"seed_intersphinx_mapping",
7777
"sphinx_toolbox.pre_commit",
7878
"sphinx_toolbox.flake8",
79+
"sphinx_toolbox_experimental.html_section",
7980
]
8081
sphinxemoji_style = "twemoji"
8182
gitstamp_fmt = "%d %b %Y"

repo_helper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ classifiers:
3838
extra_sphinx_extensions:
3939
- sphinx_toolbox.pre_commit
4040
- sphinx_toolbox.flake8
41+
- sphinx_toolbox_experimental.html_section
4142

4243
entry_points:
4344
flake8.extension:

0 commit comments

Comments
 (0)