diff --git a/stubs/pycountry/METADATA.toml b/stubs/pycountry/METADATA.toml deleted file mode 100644 index 2d900a5a2489..000000000000 --- a/stubs/pycountry/METADATA.toml +++ /dev/null @@ -1,3 +0,0 @@ -version = "24.6.*" -upstream_repository = "https://github.com/pycountry/pycountry" -obsolete_since = "23.12.11" # Released on 2023-12-11 diff --git a/stubs/pycountry/pycountry/__init__.pyi b/stubs/pycountry/pycountry/__init__.pyi deleted file mode 100644 index 471a1127b439..000000000000 --- a/stubs/pycountry/pycountry/__init__.pyi +++ /dev/null @@ -1,63 +0,0 @@ -import pycountry.db - -LOCALES_DIR: str -DATABASE_DIR: str -__version__: str | None - -def resource_filename(package_or_requirement: str, resource_name: str) -> str: ... -def get_version(distribution_name: str) -> str | None: ... -def remove_accents(input_str: str) -> str: ... - -class ExistingCountries(pycountry.db.Database): - data_class: type - root_key: str - def search_fuzzy(self, query: str) -> list[pycountry.db.Country]: ... - -class HistoricCountries(ExistingCountries): - data_class: type - root_key: str - -class Scripts(pycountry.db.Database): - data_class: str - root_key: str - -class Currencies(pycountry.db.Database): - data_class: str - root_key: str - -class Languages(pycountry.db.Database): - no_index: list[str] - data_class: str - root_key: str - -class LanguageFamilies(pycountry.db.Database): - data_class: str - root_key: str - -class SubdivisionHierarchy(pycountry.db.Data): - country_code: str - parent_code: str | None - def __init__(self, **kw: str) -> None: ... - @property - def country(self) -> pycountry.db.Country | None: ... - @property - def parent(self) -> SubdivisionHierarchy | None: ... - -class Subdivisions(pycountry.db.Database): - data_class: type - no_index: list[str] - root_key: str - def get( # type: ignore[override] - self, *, default: SubdivisionHierarchy | None = ..., **kw: str - ) -> SubdivisionHierarchy | None | list[SubdivisionHierarchy]: ... - def match(self, query: str) -> list[SubdivisionHierarchy]: ... - def partial_match(self, query: str) -> list[SubdivisionHierarchy]: ... - def search_fuzzy(self, query: str) -> list[SubdivisionHierarchy]: ... - -countries: ExistingCountries -subdivisions: Subdivisions -historic_countries: HistoricCountries -currencies: Currencies -languages: Languages -language_families: LanguageFamilies -scripts: Scripts diff --git a/stubs/pycountry/pycountry/db.pyi b/stubs/pycountry/pycountry/db.pyi deleted file mode 100644 index 150488eecf23..000000000000 --- a/stubs/pycountry/pycountry/db.pyi +++ /dev/null @@ -1,45 +0,0 @@ -import logging -from collections.abc import Callable, Iterator -from typing import TypeVar -from typing_extensions import ParamSpec - -logger: logging.Logger - -_P = ParamSpec("_P") -_R = TypeVar("_R") - -class Data: - def __init__(self, **fields: str) -> None: ... - def __getattr__(self, key: str) -> str: ... - def __setattr__(self, key: str, value: str) -> None: ... - def __dir__(self) -> list[str]: ... - def __iter__(self) -> Iterator[tuple[str, str]]: ... - -class Country(Data): ... -class Subdivision(Data): ... - -def lazy_load(f: Callable[_P, _R]) -> Callable[_P, _R]: ... - -class Database: - data_class: type | str - root_key: str | None - no_index: list[str] - filename: str - factory: type - objects: list[Data] - index_names: set[str] - indices: dict[str, dict[str, Data]] - - def __init__(self, filename: str) -> None: ... - @lazy_load - def add_entry(self, **kw: str) -> None: ... - @lazy_load - def remove_entry(self, **kw: str) -> None: ... - @lazy_load - def __iter__(self) -> Iterator[Data]: ... - @lazy_load - def __len__(self) -> int: ... - @lazy_load - def get(self, *, default: Data | None = ..., **kw: str) -> Data | None: ... - @lazy_load - def lookup(self, value: str) -> Data: ...