From 68e0465b9fd3c95c980fc5092b36b78274f71ad2 Mon Sep 17 00:00:00 2001 From: Avasam Date: Wed, 11 Jan 2023 02:26:10 -0500 Subject: [PATCH] Fix Any subclassing in pyinstaller --- stubs/pyinstaller/PyInstaller/utils/hooks/conda.pyi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/stubs/pyinstaller/PyInstaller/utils/hooks/conda.pyi b/stubs/pyinstaller/PyInstaller/utils/hooks/conda.pyi index 6801203e888a..e4a52784b09a 100644 --- a/stubs/pyinstaller/PyInstaller/utils/hooks/conda.pyi +++ b/stubs/pyinstaller/PyInstaller/utils/hooks/conda.pyi @@ -3,14 +3,17 @@ import sys from _typeshed import StrOrBytesPath from collections.abc import Iterable -from pathlib import Path -from typing import Any -from typing_extensions import TypeAlias, TypedDict +from pathlib import Path, PurePosixPath +from typing_extensions import TypedDict if sys.version_info >= (3, 8): from importlib.metadata import PackagePath as _PackagePath else: - _PackagePath: TypeAlias = Any + # Same as importlib_metadata.PackagePath + class _PackagePath(PurePosixPath): + def read_text(self, encoding: str = ...) -> str: ... + def read_binary(self) -> str: ... + def locate(self) -> Path: ... CONDA_ROOT: Path CONDA_META_DIR: Path