mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Annotate `BaseParser.fail()
as
NoReturn
`
This commit is contained in:
parent
df3d94ffda
commit
27102db959
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING, NoReturn
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ class BaseParser:
|
|||||||
indicator = '-' * self.pos + '^'
|
indicator = '-' * self.pos + '^'
|
||||||
logger.debug(f'{msg}\n{self.definition}\n{indicator}') # NoQA: G004
|
logger.debug(f'{msg}\n{self.definition}\n{indicator}') # NoQA: G004
|
||||||
|
|
||||||
def fail(self, msg: str) -> None:
|
def fail(self, msg: str) -> NoReturn:
|
||||||
errors = []
|
errors = []
|
||||||
indicator = '-' * self.pos + '^'
|
indicator = '-' * self.pos + '^'
|
||||||
msg = (
|
msg = (
|
||||||
|
Loading…
Reference in New Issue
Block a user