GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-docs-theme/python_docs_theme/__init__.py at 2025.9.1 · python/python-docs-theme

Expand file tree

/

__init__.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
35 lines (24 loc) · 984 Bytes
/

__init__.py

Copy path

File metadata and controls

35 lines (24 loc) · 984 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from __future__ import annotations
from pathlib import Path
from sphinx.locale import get_translation
TYPE_CHECKING = False
if TYPE_CHECKING:
from sphinx.application import Sphinx
from sphinx.util.typing import ExtensionMetadata
__version__ = "2025.9.1"
THEME_PATH = Path(__file__).resolve().parent
LOCALE_DIR = THEME_PATH / "locale"
MESSAGE_CATALOG_NAME = "python-docs-theme"
def setup(app: Sphinx) -> ExtensionMetadata:
app.require_sphinx("7.3")
app.add_html_theme("python_docs_theme", str(THEME_PATH))
app.add_message_catalog(MESSAGE_CATALOG_NAME, LOCALE_DIR)
def add_translation_to_context(app, pagename, templatename, context, doctree):
_ = get_translation(MESSAGE_CATALOG_NAME)
context["_"] = context["gettext"] = context["ngettext"] = _
app.connect("html-page-context", add_translation_to_context)
return {
"version": __version__,
"parallel_read_safe": True,
"parallel_write_safe": True,
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.