Remove flake8-plugin-utils (#11339)

Closes: #6913
This commit is contained in:
Sebastian Rittau
2024-01-29 14:47:15 +01:00
committed by GitHub
parent ed97b42ee2
commit 3dbb2573e6
8 changed files with 0 additions and 82 deletions

View File

@@ -1,6 +0,0 @@
flake8_plugin_utils
flake8_plugin_utils.plugin
flake8_plugin_utils.utils
flake8_plugin_utils.utils.assertions
flake8_plugin_utils.utils.constants
flake8_plugin_utils.utils.equiv_nodes

View File

@@ -1,7 +0,0 @@
version = "1.3.*"
upstream_repository = "https://github.com/afonasev/flake8-plugin-utils"
partial_stub = true
obsolete_since = "1.3.3" # Released on 2023-06-26
[tool.stubtest]
ignore_missing_stub = true

View File

@@ -1,9 +0,0 @@
from .plugin import Error as Error, Plugin as Plugin, Visitor as Visitor
from .utils import (
assert_error as assert_error,
assert_not_error as assert_not_error,
check_equivalent_nodes as check_equivalent_nodes,
is_false as is_false,
is_none as is_none,
is_true as is_true,
)

View File

@@ -1,41 +0,0 @@
import argparse
import ast
from collections.abc import Iterable, Iterator
from typing import Any, Generic, TypeVar, overload
from typing_extensions import TypeAlias
FLAKE8_ERROR: TypeAlias = tuple[int, int, str, type[Any]]
TConfig = TypeVar("TConfig") # noqa: Y001 # Name of the TypeVar matches the name at runtime
class Error:
code: str
message: str
lineno: int
col_offset: int
def __init__(self, lineno: int, col_offset: int, **kwargs: Any) -> None: ...
@classmethod
def formatted_message(cls, **kwargs: Any) -> str: ...
class Visitor(ast.NodeVisitor, Generic[TConfig]):
errors: list[Error]
@overload
def __init__(self, config: None = None) -> None: ...
@overload
def __init__(self, config: TConfig) -> None: ...
@property
def config(self) -> TConfig: ...
def error_from_node(self, error: type[Error], node: ast.AST, **kwargs: Any) -> None: ...
class Plugin(Generic[TConfig]):
name: str
version: str
visitors: list[type[Visitor[TConfig]]]
config: TConfig
def __init__(self, tree: ast.AST) -> None: ...
def run(self) -> Iterable[FLAKE8_ERROR]: ...
@classmethod
def parse_options(cls, option_manager: Any, options: argparse.Namespace, args: list[str]) -> None: ...
@classmethod
def parse_options_to_config(cls, option_manager: Any, options: argparse.Namespace, args: list[str]) -> TConfig | None: ...
@classmethod
def test_config(cls, config: TConfig) -> Iterator[None]: ...

View File

@@ -1,3 +0,0 @@
from .assertions import assert_error as assert_error, assert_not_error as assert_not_error
from .constants import is_false as is_false, is_none as is_none, is_true as is_true
from .equiv_nodes import check_equivalent_nodes as check_equivalent_nodes

View File

@@ -1,8 +0,0 @@
from typing import Any
from ..plugin import Error as Error, TConfig as TConfig, Visitor as Visitor
def assert_error(
visitor_cls: type[Visitor[TConfig]], src: str, expected: type[Error], config: TConfig | None = None, **kwargs: Any
) -> None: ...
def assert_not_error(visitor_cls: type[Visitor[TConfig]], src: str, config: TConfig | None = None) -> None: ...

View File

@@ -1,5 +0,0 @@
import ast
def is_none(node: ast.AST) -> bool: ...
def is_false(node: ast.AST) -> bool: ...
def is_true(node: ast.AST) -> bool: ...

View File

@@ -1,3 +0,0 @@
import ast
def check_equivalent_nodes(node1: ast.AST, node2: ast.AST) -> bool: ...