Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ ignore = [
"TRY003", # Avoid specifying long messages outside the exception class
# Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
"PLC0205", # Sometimes __slots__ really is a string at runtime
###
# False-positives, but already checked by type-checkers
###
Expand Down
1 change: 1 addition & 0 deletions stubs/PyMySQL/pymysql/protocol.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ UNSIGNED_INT64_COLUMN: Final[int]
def dump_packet(data) -> None: ...

class MysqlPacket:
__slots__ = ("_position", "_data")
def __init__(self, data, encoding) -> None: ...
def get_all_data(self): ...
def read(self, size): ...
Expand Down
1 change: 1 addition & 0 deletions stubs/PyYAML/yaml/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ class YAMLObjectMetaclass(type):
def __init__(cls, name, bases, kwds) -> None: ...

class YAMLObject(metaclass=YAMLObjectMetaclass):
__slots__ = ()
yaml_loader: Any
yaml_dumper: Any
yaml_tag: Any
Expand Down
1 change: 1 addition & 0 deletions stubs/WebOb/webob/cookies.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Cookie(dict[bytes, Morsel]):
def __str__(self, full: bool = True) -> str: ...

class Morsel(dict[bytes, bytes | bool | None]):
__slots__ = ("name", "value")
name: bytes
value: bytes
def __init__(self, name: str | bytes, value: str | bytes) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/aiofiles/aiofiles/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AsyncIndirectBase(AsyncBase[_T]):
) -> None: ...

class AiofilesContextManager(Awaitable[_V_co], AbstractAsyncContextManager[_V_co]):
__slots__ = ("_coro", "_obj")
def __init__(self, coro: Awaitable[_V_co]) -> None: ...
def __await__(self) -> Generator[Any, Any, _V_co]: ...
async def __aenter__(self) -> _V_co: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Lexer: Incomplete
class TokenStream: ...

class BufferedTokenStream(TokenStream):
__slots__ = ("tokenSource", "tokens", "index", "fetchedEOF")
tokenSource: Incomplete
tokens: Incomplete
index: int
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/CommonTokenFactory.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from antlr4.Token import CommonToken as CommonToken
class TokenFactory: ...

class CommonTokenFactory(TokenFactory):
__slots__ = "copyText"
DEFAULT: Incomplete
copyText: Incomplete
def __init__(self, copyText: bool = False) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/CommonTokenStream.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from antlr4.Lexer import Lexer as Lexer
from antlr4.Token import Token as Token

class CommonTokenStream(BufferedTokenStream):
__slots__ = "channel"
channel: Incomplete
def __init__(self, lexer: Lexer, channel: int = 0) -> None: ...
def adjustSeekIndex(self, i: int) -> int: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/FileStream.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ from _typeshed import Incomplete
from antlr4.InputStream import InputStream as InputStream

class FileStream(InputStream):
__slots__ = "fileName"
fileName: Incomplete
def __init__(self, fileName: str, encoding: str = "ascii", errors: str = "strict") -> None: ...
def readDataFrom(self, fileName: str, encoding: str, errors: str = "strict"): ...
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/InputStream.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ from _typeshed import Incomplete
from antlr4.Token import Token as Token

class InputStream:
__slots__ = ("name", "strdata", "_index", "data", "_size")
name: str
strdata: Incomplete
data: Incomplete
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/IntervalSet.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from antlr4.Token import Token as Token

class IntervalSet:
__slots__ = ("intervals", "readonly")
intervals: list[range] | None
readonly: bool
def __init__(self) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/LL1Analyzer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ from antlr4.RuleContext import RuleContext as RuleContext
from antlr4.Token import Token as Token

class LL1Analyzer:
__slots__ = "atn"
HIT_PRED: Incomplete
atn: Incomplete
def __init__(self, atn: ATN) -> None: ...
Expand Down
16 changes: 16 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/Lexer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ from antlr4.Token import Token as Token
class TokenSource: ...

class Lexer(Recognizer, TokenSource):
__slots__ = (
"_input",
"_output",
"_factory",
"_tokenFactorySourcePair",
"_token",
"_tokenStartCharIndex",
"_tokenStartLine",
"_tokenStartColumn",
"_hitEOF",
"_channel",
"_type",
"_modeStack",
"_mode",
"_text",
)
DEFAULT_MODE: int
MORE: int
SKIP: int
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/ListTokenSource.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from antlr4.Lexer import TokenSource as TokenSource
from antlr4.Token import Token as Token

class ListTokenSource(TokenSource):
__slots__ = ("tokens", "sourceName", "pos", "eofToken", "_factory")
tokens: Incomplete
sourceName: Incomplete
pos: int
Expand Down
12 changes: 12 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/Parser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,25 @@ from antlr4.tree.ParseTreePatternMatcher import ParseTreePatternMatcher as Parse
from antlr4.tree.Tree import ErrorNode as ErrorNode, ParseTreeListener as ParseTreeListener, TerminalNode as TerminalNode

class TraceListener(ParseTreeListener):
__slots__ = "_parser"
def __init__(self, parser) -> None: ...
def enterEveryRule(self, ctx) -> None: ...
def visitTerminal(self, node) -> None: ...
def visitErrorNode(self, node) -> None: ...
def exitEveryRule(self, ctx) -> None: ...

class Parser(Recognizer):
__slots__ = (
"_input",
"_output",
"_errHandler",
"_precedenceStack",
"_ctx",
"buildParseTrees",
"_tracer",
"_parseListeners",
"_syntaxErrors",
)
bypassAltsAtnCache: Incomplete
buildParseTrees: bool
def __init__(self, input: TokenStream, output: TextIO = ...) -> None: ...
Expand Down
10 changes: 10 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/ParserInterpreter.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ from antlr4.PredictionContext import PredictionContextCache as PredictionContext
from antlr4.Token import Token as Token

class ParserInterpreter(Parser):
__slots__ = (
"grammarFileName",
"atn",
"tokenNames",
"ruleNames",
"decisionToDFA",
"sharedContextCache",
"_parentContextStack",
"pushRecursionContextStates",
)
grammarFileName: Incomplete
atn: Incomplete
tokenNames: Incomplete
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/ParserRuleContext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ from antlr4.tree.Tree import (
)

class ParserRuleContext(RuleContext):
__slots__ = ("children", "start", "stop", "exception")
children: Incomplete
start: Incomplete
stop: Incomplete
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/Recognizer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from antlr4.RuleContext import RuleContext as RuleContext
from antlr4.Token import Token as Token

class Recognizer:
__slots__ = ("_listeners", "_interp", "_stateNumber")
tokenTypeMapCache: Incomplete
ruleIndexMapCache: Incomplete
def __init__(self) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/RuleContext.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ from antlr4.tree.Trees import Trees as Trees
Parser: Incomplete

class RuleContext(RuleNode):
__slots__ = ("parentCtx", "invokingState")
EMPTY: Incomplete
parentCtx: Incomplete
invokingState: Incomplete
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/Token.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from _typeshed import Incomplete

class Token:
__slots__ = ("source", "type", "channel", "start", "stop", "tokenIndex", "line", "column", "_text")
INVALID_TYPE: int
EPSILON: int
MIN_USER_TOKEN_TYPE: int
Expand Down
3 changes: 3 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/TokenStreamRewriter.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from antlr4.CommonTokenStream import CommonTokenStream as CommonTokenStream
from antlr4.Token import Token as Token

class TokenStreamRewriter:
__slots__ = ("tokens", "programs", "lastRewriteTokenIndexes")
DEFAULT_PROGRAM_NAME: str
PROGRAM_INIT_SIZE: int
MIN_TOKEN_INDEX: int
Expand Down Expand Up @@ -34,6 +35,7 @@ class TokenStreamRewriter:
def getText(self, program_name, start: int, stop: int): ...

class RewriteOperation:
__slots__ = ("tokens", "index", "text", "instructionIndex")
tokens: Incomplete
index: Incomplete
text: Incomplete
Expand All @@ -48,6 +50,7 @@ class TokenStreamRewriter:
class InsertAfterOp(InsertBeforeOp): ...

class ReplaceOp(RewriteOperation):
__slots__ = "last_index"
last_index: Incomplete
def __init__(self, from_idx, to_idx, tokens, text) -> None: ...
def execute(self, buf): ...
12 changes: 12 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/ATN.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ from antlr4.RuleContext import RuleContext as RuleContext
from antlr4.Token import Token as Token

class ATN:
__slots__ = (
"grammarType",
"maxTokenType",
"states",
"decisionToState",
"ruleToStartState",
"ruleToStopState",
"modeNameToStartState",
"ruleToTokenType",
"lexerActions",
"modeToStartState",
)
INVALID_ALT_NUMBER: int
grammarType: Incomplete
maxTokenType: Incomplete
Expand Down
2 changes: 2 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/ATNConfig.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ from antlr4.atn.SemanticContext import SemanticContext as SemanticContext
from antlr4.PredictionContext import PredictionContext as PredictionContext

class ATNConfig:
__slots__ = ("state", "alt", "context", "semanticContext", "reachesIntoOuterContext", "precedenceFilterSuppressed")
state: Incomplete
alt: Incomplete
context: Incomplete
Expand All @@ -26,6 +27,7 @@ class ATNConfig:
def equalsForConfigSet(self, other): ...

class LexerATNConfig(ATNConfig):
__slots__ = ("lexerActionExecutor", "passedThroughNonGreedyDecision")
lexerActionExecutor: Incomplete
passedThroughNonGreedyDecision: Incomplete
def __init__(
Expand Down
11 changes: 11 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/ATNConfigSet.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ from antlr4.Utils import str_list as str_list
ATNSimulator: Incomplete

class ATNConfigSet:
__slots__ = (
"configLookup",
"fullCtx",
"readonly",
"configs",
"uniqueAlt",
"conflictingAlts",
"hasSemanticContext",
"dipsIntoOuterContext",
"cachedHashCode",
)
configLookup: Incomplete
fullCtx: Incomplete
readonly: bool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from _typeshed import Incomplete

class ATNDeserializationOptions:
__slots__ = ("readonly", "verifyATN", "generateRuleBypassTransitions")
defaultOptions: Incomplete
readonly: bool
verifyATN: Incomplete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ from antlr4.Token import Token as Token
SERIALIZED_VERSION: int

class ATNDeserializer:
__slots__ = ("deserializationOptions", "data", "pos")
deserializationOptions: Incomplete
def __init__(self, options: ATNDeserializationOptions | None = None) -> None: ...
data: Incomplete
Expand Down
1 change: 1 addition & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/ATNSimulator.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ from antlr4.PredictionContext import (
)

class ATNSimulator:
__slots__ = ("atn", "sharedContextCache", "__dict__")
ERROR: Incomplete
atn: Incomplete
sharedContextCache: Incomplete
Expand Down
8 changes: 8 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/ATNState.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from antlr4.atn.Transition import Transition as Transition
INITIAL_NUM_TRANSITIONS: int

class ATNState:
__slots__ = ("atn", "stateNumber", "stateType", "ruleIndex", "epsilonOnlyTransitions", "transitions", "nextTokenWithinRule")
INVALID_TYPE: int
BASIC: int
RULE_START: int
Expand Down Expand Up @@ -39,11 +40,13 @@ class BasicState(ATNState):
def __init__(self) -> None: ...

class DecisionState(ATNState):
__slots__ = ("decision", "nonGreedy")
decision: int
nonGreedy: bool
def __init__(self) -> None: ...

class BlockStartState(DecisionState):
__slots__ = "endState"
endState: Incomplete
def __init__(self) -> None: ...

Expand All @@ -52,6 +55,7 @@ class BasicBlockStartState(BlockStartState):
def __init__(self) -> None: ...

class BlockEndState(ATNState):
__slots__ = "startState"
stateType: Incomplete
startState: Incomplete
def __init__(self) -> None: ...
Expand All @@ -61,6 +65,7 @@ class RuleStopState(ATNState):
def __init__(self) -> None: ...

class RuleStartState(ATNState):
__slots__ = ("stopState", "isPrecedenceRule")
stateType: Incomplete
stopState: Incomplete
isPrecedenceRule: bool
Expand All @@ -71,6 +76,7 @@ class PlusLoopbackState(DecisionState):
def __init__(self) -> None: ...

class PlusBlockStartState(BlockStartState):
__slots__ = "loopBackState"
stateType: Incomplete
loopBackState: Incomplete
def __init__(self) -> None: ...
Expand All @@ -84,12 +90,14 @@ class StarLoopbackState(ATNState):
def __init__(self) -> None: ...

class StarLoopEntryState(DecisionState):
__slots__ = ("loopBackState", "isPrecedenceDecision")
stateType: Incomplete
loopBackState: Incomplete
isPrecedenceDecision: Incomplete
def __init__(self) -> None: ...

class LoopEndState(ATNState):
__slots__ = "loopBackState"
stateType: Incomplete
loopBackState: Incomplete
def __init__(self) -> None: ...
Expand Down
2 changes: 2 additions & 0 deletions stubs/antlr4-python3-runtime/antlr4/atn/LexerATNSimulator.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ from antlr4.PredictionContext import (
from antlr4.Token import Token as Token

class SimState:
__slots__ = ("index", "line", "column", "dfaState")
def __init__(self) -> None: ...
index: int
line: int
Expand All @@ -30,6 +31,7 @@ class SimState:
def reset(self) -> None: ...

class LexerATNSimulator(ATNSimulator):
__slots__ = ("decisionToDFA", "recog", "startIndex", "line", "column", "mode", "DEFAULT_MODE", "MAX_CHAR_VALUE", "prevAccept")
debug: bool
dfa_debug: bool
MIN_DFA_EDGE: int
Expand Down
Loading
Loading