Skip to content

Commit 2a3ff63

Browse files
authored
Fix return type of ParserBase.error (python#6666)
As this is an abstract method, NoReturn is problematic as deriving classes (for example in beautifulsoup4 or fpdf2) have an incompatible return type.
1 parent d6f0623 commit 2a3ff63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎stdlib/_markupbase.pyi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import NoReturn
2+
from typing import Any
33

44
class ParserBase:
55
def __init__(self) -> None: ...
@@ -12,6 +12,6 @@ class ParserBase:
1212
def updatepos(self, i: int, j: int) -> int: ... # undocumented
1313
if sys.version_info < (3, 10):
1414
# Removed from ParserBase: https://bugs.python.org/issue31844
15-
def error(self, message: str) -> NoReturn: ... # undocumented
15+
def error(self, message: str) -> Any: ... # undocumented
1616
lineno: int # undocumented
1717
offset: int # undocumented

0 commit comments

Comments
 (0)