Skip to content

Commit

Permalink
Move the extension logic to the .ext submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Sep 3, 2022
1 parent 0b522bd commit 37cdf28
Show file tree
Hide file tree
Showing 7 changed files with 429 additions and 412 deletions.
9 changes: 5 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ max-line-length = 79
# Allow certain violations in certain files:
per-file-ignores =

# E800 reports a lot of false-positives for legit
# tool-related comments;
# WPS412 logic of an extension is in __init__.py file;
# WPS412 logic of an extension is in __init__.py file
# F401 imported but unused
src/sphinxcontrib/towncrier/__init__.py: F401, WPS412
# FIXME: WPS201 too many imports
# FIXME: WPS402 too many `noqa`s
src/sphinxcontrib/towncrier/__init__.py: E800, WPS201, WPS402, WPS412
src/sphinxcontrib/towncrier/ext.py: WPS201, WPS402

# There are multiple `assert`s (S101)
# and subprocesses (import – S404; call – S603) in tests;
Expand All @@ -94,6 +94,7 @@ pytest-parametrize-values-row-type = tuple
rst-roles =
# Built-in Sphinx roles:
class,
file,
py:class,
py:meth,
# Sphinx's internal role:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ How to use this?
.. code-block:: python
extensions = ['sphinxcontrib.towncrier']
extensions = ['sphinxcontrib.towncrier.ext']
# Options: draft/sphinx-version/sphinx-release
towncrier_draft_autoversion_mode = 'draft'
Expand Down
2 changes: 1 addition & 1 deletion docs/change-notes-layout.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ with ``towncrier_draft_``.
'sphinx.ext.intersphinx',
# Third-party extensions:
'sphinxcontrib.towncrier', # provides `towncrier-draft-entries` directive
'sphinxcontrib.towncrier.ext', # provides `.. towncrier-draft-entries::`
]
exclude_patterns = [
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
'sphinxcontrib.apidoc',

# Tree-local extensions:
'sphinxcontrib.towncrier', # provides `towncrier-draft-entries` directive
'sphinxcontrib.towncrier.ext', # provides `.. towncrier-draft-entries::`
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
Loading

0 comments on commit 37cdf28

Please sign in to comment.