Fix a non-pep695-generic-function ruff warning (#3218)
This commit is contained in:
parent
ddbd465a34
commit
d9ac33dbe8
|
|
@ -1,7 +1,6 @@
|
|||
import json
|
||||
import ssl
|
||||
from functools import lru_cache
|
||||
from typing import TypeVar
|
||||
from urllib.error import HTTPError
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import urlopen
|
||||
|
|
@ -11,9 +10,6 @@ from ..exceptions import PackageError, SysCallError
|
|||
from ..models.gen import AvailablePackage, LocalPackage, PackageSearch, PackageSearchResult, Repository
|
||||
from ..pacman import Pacman
|
||||
|
||||
PackageType = TypeVar("PackageType", AvailablePackage, LocalPackage)
|
||||
|
||||
|
||||
BASE_URL_PKG_SEARCH = 'https://archlinux.org/packages/search/json/'
|
||||
# BASE_URL_PKG_CONTENT = 'https://archlinux.org/packages/search/json/'
|
||||
BASE_GROUP_URL = 'https://archlinux.org/groups/search/json/'
|
||||
|
|
@ -143,7 +139,7 @@ def list_available_packages(
|
|||
return packages
|
||||
|
||||
|
||||
def _parse_package_output(
|
||||
def _parse_package_output[PackageType: (AvailablePackage, LocalPackage)](
|
||||
package_meta: list[str],
|
||||
cls: type[PackageType]
|
||||
) -> PackageType:
|
||||
|
|
|
|||
Loading…
Reference in New Issue