mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-04 22:31:26 +08:00
Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -27,14 +27,14 @@ class Expression(StrAndRepr):
|
||||
|
||||
class Literal(Expression):
|
||||
literal: str
|
||||
identity_tuple: tuple[str, str] # type: ignore
|
||||
identity_tuple: tuple[str, str] # type: ignore[assignment]
|
||||
def __init__(self, literal: str, name: str = ...) -> None: ...
|
||||
|
||||
class TokenMatcher(Literal): ...
|
||||
|
||||
class Regex(Expression):
|
||||
re: Pattern[str]
|
||||
identity_tuple: tuple[str, Pattern[str]] # type: ignore
|
||||
identity_tuple: tuple[str, Pattern[str]] # type: ignore[assignment]
|
||||
def __init__(
|
||||
self,
|
||||
pattern: str,
|
||||
|
||||
@@ -44,7 +44,7 @@ class RuleVisitor(NodeVisitor):
|
||||
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> Literal: ...
|
||||
def visit_regex(self, node: Node, regex: typing.Sequence[Any]) -> Regex: ...
|
||||
def visit_parenthesized(self, node: Node, parenthesized: typing.Sequence[Any]) -> Expression: ...
|
||||
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore
|
||||
def generic_visit(self, node: Node, visited_children: typing.Sequence[Any]) -> typing.Sequence[Any] | Node: ... # type: ignore[override]
|
||||
|
||||
class TokenRuleVisitor(RuleVisitor):
|
||||
def visit_spaceless_literal(self, spaceless_literal: Node, visited_children: typing.Sequence[Any]) -> TokenMatcher: ...
|
||||
|
||||
Reference in New Issue
Block a user