Remove setuptools/pkg_resources (#13369)

This commit is contained in:
Avasam
2025-03-04 12:11:10 +01:00
committed by GitHub
parent e4a8707e9c
commit 641ca188ef
12 changed files with 23 additions and 746 deletions
+11 -3
View File
@@ -1,7 +1,7 @@
from collections.abc import Generator, Iterable
import sys
from collections.abc import Generator
from typing import Any
from pkg_resources import EntryPoint
from pygments.filter import Filter
from pygments.formatter import Formatter
from pygments.lexer import Lexer
@@ -12,7 +12,15 @@ FORMATTER_ENTRY_POINT: str
STYLE_ENTRY_POINT: str
FILTER_ENTRY_POINT: str
def iter_entry_points(group_name: str) -> Iterable[EntryPoint]: ...
if sys.version_info >= (3, 10):
from importlib.metadata import EntryPoints
def iter_entry_points(group_name: str) -> EntryPoints: ...
else:
from importlib.metadata import EntryPoint
def iter_entry_points(group_name: str) -> tuple[EntryPoint, ...] | list[EntryPoint]: ...
def find_plugin_lexers() -> Generator[type[Lexer], None, None]: ...
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter[Any]]], None, None]: ...
def find_plugin_styles() -> Generator[tuple[str, type[Style]], None, None]: ...