Remove Python 3.6 branches from typeshed (#8269)

This commit is contained in:
Alex Waygood
2022-07-11 09:55:17 +01:00
committed by GitHub
parent 29c17ffb47
commit edc0ecd857
114 changed files with 1016 additions and 2642 deletions

View File

@@ -96,21 +96,20 @@ class FileLoader(ResourceLoader, ExecutionLoader, metaclass=ABCMeta):
def get_filename(self, name: str | None = ...) -> _Path: ...
def load_module(self, name: str | None = ...) -> types.ModuleType: ...
if sys.version_info >= (3, 7):
class ResourceReader(metaclass=ABCMeta):
class ResourceReader(metaclass=ABCMeta):
@abstractmethod
def open_resource(self, resource: StrOrBytesPath) -> IO[bytes]: ...
@abstractmethod
def resource_path(self, resource: StrOrBytesPath) -> str: ...
if sys.version_info >= (3, 10):
@abstractmethod
def open_resource(self, resource: StrOrBytesPath) -> IO[bytes]: ...
def is_resource(self, path: str) -> bool: ...
else:
@abstractmethod
def resource_path(self, resource: StrOrBytesPath) -> str: ...
if sys.version_info >= (3, 10):
@abstractmethod
def is_resource(self, path: str) -> bool: ...
else:
@abstractmethod
def is_resource(self, name: str) -> bool: ...
def is_resource(self, name: str) -> bool: ...
@abstractmethod
def contents(self) -> Iterator[str]: ...
@abstractmethod
def contents(self) -> Iterator[str]: ...
if sys.version_info >= (3, 9):
@runtime_checkable

View File

@@ -1,6 +1,5 @@
import importlib.abc
import importlib.machinery
import sys
import types
from _typeshed import StrOrBytesPath
from collections.abc import Callable
@@ -39,5 +38,4 @@ class LazyLoader(importlib.abc.Loader):
def create_module(self, spec: importlib.machinery.ModuleSpec) -> types.ModuleType | None: ...
def exec_module(self, module: types.ModuleType) -> None: ...
if sys.version_info >= (3, 7):
def source_hash(source_bytes: bytes) -> int: ...
def source_hash(source_bytes: bytes) -> int: ...