mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Allow stubs to depend on numpy (#9499)
This commit is contained in:
@@ -8,7 +8,7 @@ import subprocess
|
||||
import sys
|
||||
import venv
|
||||
from collections.abc import Iterable, Mapping
|
||||
from functools import cache
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from typing import NamedTuple
|
||||
from typing_extensions import Annotated
|
||||
@@ -25,6 +25,10 @@ except ImportError:
|
||||
return text
|
||||
|
||||
|
||||
# A backport of functools.cache for Python <3.9
|
||||
# This module is imported by mypy_test.py, which needs to run on 3.7 in CI
|
||||
cache = lru_cache(None)
|
||||
|
||||
# Used to install system-wide packages for different OS types:
|
||||
METADATA_MAPPING = {"linux": "apt_dependencies", "darwin": "brew_dependencies", "win32": "choco_dependencies"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user