Skip to content

Change file names in documentation and fix redirects #6651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,21 @@


# Single file redirects are handled in this file and can be done by a pylint
# contributor if no englobing full directory redirect is applied first. See:
# contributor. We use the following extension:
# https://documatt.gitlab.io/sphinx-reredirects/usage.html
# Directory redirects are handled in ReadTheDoc admin interface and can only be done
# by pylint maintainers at the following URL:
# https://readthedocs.org/dashboard/pylint/redirects/
DIRECTORY_REDIRECT = [
# This list has no effect it must be manually updated from the Read the doc conf
"messages/",
]
redirects: dict[str, str] = {
# "<source>": "<target>"
"intro": "index.html",
"support": "contact.html",
"user_guide/ide-integration": "installation.html",
"user_guide/message-control": "user_guide/messages/message_control.html",
"additional_commands/index": "../index.html",
"messages/messages_introduction": "../user_guide/messages/index.html",
"messages/messages_list": "../user_guide/messages/messages_overview.html",
"user_guide/message-control": "messages/message_control.html",
}
for m in redirects:
for r in DIRECTORY_REDIRECT:
assert not m.startswith(r), (
f"Redirection will silentely fail: '{m}' start with '{r}' and "
"the whole directory is redirected by ReadtheDoc conf already."
)

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
2 changes: 1 addition & 1 deletion doc/exts/pylint_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _write_messages_list_page(
messages_dict: MessagesDict, old_messages_dict: OldMessagesDict
) -> None:
"""Create or overwrite the page with the list of all messages."""
messages_file = os.path.join(PYLINT_MESSAGES_PATH, "messages_list.rst")
messages_file = os.path.join(PYLINT_MESSAGES_PATH, "messages_overview.rst")
with open(messages_file, "w", encoding="utf-8") as stream:
# Write header of file
title = "Messages overview"
Expand Down
2 changes: 1 addition & 1 deletion doc/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ User Guide
installation
run
output
messages/messages_introduction
messages/index
options
ide_integration/ide-integration
pre-commit-integration
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Messages
:maxdepth: 1
:hidden:

messages_list.rst
messages_overview.rst
message_control.rst

Messages categories
Expand Down