@@ -31,7 +31,6 @@ def generate(self, *args, **kwargs) -> Any: ...
3131
3232class ParsingPhaseExtraContext (_ExtraContext ):
3333 """Extra context generated during the :py:data:`~Phase.Parsing` phase.
34-
3534 The ``generate`` method receives the current directive or role being executed.
3635 """
3736
@@ -43,7 +42,6 @@ def generate(self, directive: SphinxDirective | SphinxRole) -> Any: ...
4342
4443class ParsedPhaseExtraContext (_ExtraContext ):
4544 """Extra context generated during the :py:data:`~Phase.Parsed` phase.
46-
4745 The ``generate`` method receives the current Sphinx transform.
4846 """
4947
@@ -55,7 +53,6 @@ def generate(self, transform: SphinxTransform) -> Any: ...
5553
5654class ResolvingPhaseExtraContext (_ExtraContext ):
5755 """Extra context generated during the :py:data:`~Phase.Resolving` phase.
58-
5956 The ``generate`` method receives the current Sphinx transform.
6057 """
6158
@@ -67,10 +64,11 @@ def generate(self, transform: SphinxTransform) -> Any: ...
6764
6865class GlobalExtraContext (_ExtraContext ):
6966 """Extra context available in all phases.
70-
7167 The ``generate`` method receives the Sphinx build environment.
7268 """
7369
70+ phase = None
71+
7472 @abstractmethod
7573 def generate (self , env : BuildEnvironment ) -> Any : ...
7674
@@ -177,8 +175,10 @@ def __init__(self, node: pending_node) -> None:
177175 if nonexist := requested - total :
178176 self .report .text (f'Extra contexts { nonexist } are non-exist.' )
179177 if nonavail := requested - nonexist :
180- self .report .text (f'Extra contexts { nonavail } are not available '
181- f'at pahse { node .template .phase } .' )
178+ self .report .text (
179+ f'Extra contexts { nonavail } are not available '
180+ f'at pahse { node .template .phase } .'
181+ )
182182
183183 def on_anytime (self , env : BuildEnvironment ) -> None :
184184 self ._generate (GlobalExtraContext , lambda ctx : ctx .generate (env ))
0 commit comments