Skip to content

Commit 51604c0

Browse files
committed
Review comments
1 parent ec348a0 commit 51604c0

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

doc/_ext/dfetch_style.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import sys
44
import types
5+
from typing import MutableMapping, cast
56

67
import pygments.styles
78
from pygments.style import Style
@@ -18,7 +19,7 @@
1819
)
1920

2021

21-
class DfetchStyle(Style):
22+
class DfetchStyle(Style): # pylint: disable=too-few-public-methods
2223
"""Brand-matched Pygments style — mirrors the website palette."""
2324

2425
background_color = "#fef8f0" # --bg-tint
@@ -61,4 +62,6 @@ def register() -> None:
6162
mod = types.ModuleType("pygments.styles.dfetch")
6263
mod.DfetchStyle = DfetchStyle # type: ignore[attr-defined]
6364
sys.modules["pygments.styles.dfetch"] = mod
64-
pygments.styles.STYLE_MAP["dfetch"] = "dfetch::DfetchStyle"
65+
cast(MutableMapping[str, str], pygments.styles.STYLE_MAP)[
66+
"dfetch"
67+
] = "dfetch::DfetchStyle"

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ext_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext"))
1919
sys.path.insert(0, ext_path)
2020

21-
import dfetch_style
21+
import dfetch_style # noqa: E402
2222

2323
dfetch_style.register()
2424

doc/dfetch_preamble.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
\renewcommand{\vline}{} % suppress all vertical column rules
7373
\renewcommand{\arraystretch}{1.35} % generous row height (website 0.5rem top/bottom)
7474
\setlength{\tabcolsep}{8pt} % horizontal cell padding (website 0.875rem)
75-
\BeforeBeginEnvironment{tabulary}{\small}
76-
\BeforeBeginEnvironment{longtable}{\small}
75+
\AtBeginEnvironment{tabulary}{\small}
76+
\AtBeginEnvironment{longtable}{\small}
7777
\providecommand{\sphinxstyletheadfamily}{\sffamily}
7878
\renewcommand{\sphinxstyletheadfamily}{\small\bfseries}
7979

0 commit comments

Comments
 (0)