Fix a non-pep695-generic-function ruff warning (#3218)

This commit is contained in:
correctmost 2025-03-02 06:01:56 -05:00 committed by GitHub
parent ddbd465a34
commit d9ac33dbe8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -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: