Fix return annotations of several methods that return self at runtime (#7070)

This commit is contained in:
Alex Waygood
2022-01-29 01:37:49 +00:00
committed by GitHub
parent 749d3db815
commit 33ecb68603
8 changed files with 19 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
import sys
from _typeshed import Self
from typing import Any
MAXGROUPS: int
@@ -15,7 +16,7 @@ class error(Exception):
class _NamedIntConstant(int):
name: Any
def __new__(cls, value: int, name: str) -> _NamedIntConstant: ...
def __new__(cls: type[Self], value: int, name: str) -> Self: ...
MAXREPEAT: _NamedIntConstant
OPCODES: list[_NamedIntConstant]