Further reduce use of deprecated contextlib aliases (#6370)

This commit is contained in:
Alex Waygood
2021-11-23 23:25:39 +00:00
committed by GitHub
parent b459329cec
commit a9cfd23fc3
5 changed files with 18 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
import sys
from _typeshed import ReadableBuffer
from typing import ContextManager, Iterable, Iterator, NoReturn, Sized, overload
from contextlib import AbstractContextManager
from typing import Iterable, Iterator, NoReturn, Sized, overload
ACCESS_DEFAULT: int
ACCESS_READ: int
@@ -24,7 +25,7 @@ if sys.platform != "win32":
PAGESIZE: int
class mmap(ContextManager[mmap], Iterable[int], Sized):
class mmap(AbstractContextManager[mmap], Iterable[int], Sized):
if sys.platform == "win32":
def __init__(self, fileno: int, length: int, tagname: str | None = ..., access: int = ..., offset: int = ...) -> None: ...
else: