mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add __slots__ to third-party packages using stubdefaulter (#14619)
This commit is contained in:
@@ -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): ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -8,6 +8,7 @@ Lexer: Incomplete
|
||||
class TokenStream: ...
|
||||
|
||||
class BufferedTokenStream(TokenStream):
|
||||
__slots__ = ("tokenSource", "tokens", "index", "fetchedEOF")
|
||||
tokenSource: Incomplete
|
||||
tokens: Incomplete
|
||||
index: int
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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"): ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,6 +20,7 @@ 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: ...
|
||||
@@ -27,6 +28,17 @@ class TraceListener(ParseTreeListener):
|
||||
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: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,6 +13,7 @@ from antlr4.tree.Tree import (
|
||||
)
|
||||
|
||||
class ParserRuleContext(RuleContext):
|
||||
__slots__ = ("children", "start", "stop", "exception")
|
||||
children: Incomplete
|
||||
start: Incomplete
|
||||
stop: Incomplete
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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): ...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -26,6 +27,7 @@ class ATNConfig:
|
||||
def equalsForConfigSet(self, other): ...
|
||||
|
||||
class LexerATNConfig(ATNConfig):
|
||||
__slots__ = ("lexerActionExecutor", "passedThroughNonGreedyDecision")
|
||||
lexerActionExecutor: Incomplete
|
||||
passedThroughNonGreedyDecision: Incomplete
|
||||
def __init__(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class ATNDeserializationOptions:
|
||||
__slots__ = ("readonly", "verifyATN", "generateRuleBypassTransitions")
|
||||
defaultOptions: Incomplete
|
||||
readonly: bool
|
||||
verifyATN: Incomplete
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,6 +10,7 @@ from antlr4.PredictionContext import (
|
||||
)
|
||||
|
||||
class ATNSimulator:
|
||||
__slots__ = ("atn", "sharedContextCache", "__dict__")
|
||||
ERROR: Incomplete
|
||||
atn: Incomplete
|
||||
sharedContextCache: Incomplete
|
||||
|
||||
@@ -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
|
||||
@@ -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: ...
|
||||
|
||||
@@ -52,6 +55,7 @@ class BasicBlockStartState(BlockStartState):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class BlockEndState(ATNState):
|
||||
__slots__ = "startState"
|
||||
stateType: Incomplete
|
||||
startState: Incomplete
|
||||
def __init__(self) -> None: ...
|
||||
@@ -61,6 +65,7 @@ class RuleStopState(ATNState):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class RuleStartState(ATNState):
|
||||
__slots__ = ("stopState", "isPrecedenceRule")
|
||||
stateType: Incomplete
|
||||
stopState: Incomplete
|
||||
isPrecedenceRule: bool
|
||||
@@ -71,6 +76,7 @@ class PlusLoopbackState(DecisionState):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class PlusBlockStartState(BlockStartState):
|
||||
__slots__ = "loopBackState"
|
||||
stateType: Incomplete
|
||||
loopBackState: Incomplete
|
||||
def __init__(self) -> None: ...
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -14,6 +14,7 @@ class LexerActionType(IntEnum):
|
||||
TYPE = 7
|
||||
|
||||
class LexerAction:
|
||||
__slots__ = ("actionType", "isPositionDependent")
|
||||
actionType: Incomplete
|
||||
isPositionDependent: bool
|
||||
def __init__(self, action: LexerActionType) -> None: ...
|
||||
@@ -26,6 +27,7 @@ class LexerSkipAction(LexerAction):
|
||||
def execute(self, lexer: Lexer): ...
|
||||
|
||||
class LexerTypeAction(LexerAction):
|
||||
__slots__ = "type"
|
||||
type: Incomplete
|
||||
def __init__(self, type: int) -> None: ...
|
||||
def execute(self, lexer: Lexer): ...
|
||||
@@ -33,6 +35,7 @@ class LexerTypeAction(LexerAction):
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class LexerPushModeAction(LexerAction):
|
||||
__slots__ = "mode"
|
||||
mode: Incomplete
|
||||
def __init__(self, mode: int) -> None: ...
|
||||
def execute(self, lexer: Lexer): ...
|
||||
@@ -50,6 +53,7 @@ class LexerMoreAction(LexerAction):
|
||||
def execute(self, lexer: Lexer): ...
|
||||
|
||||
class LexerModeAction(LexerAction):
|
||||
__slots__ = "mode"
|
||||
mode: Incomplete
|
||||
def __init__(self, mode: int) -> None: ...
|
||||
def execute(self, lexer: Lexer): ...
|
||||
@@ -57,6 +61,7 @@ class LexerModeAction(LexerAction):
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class LexerCustomAction(LexerAction):
|
||||
__slots__ = ("ruleIndex", "actionIndex")
|
||||
ruleIndex: Incomplete
|
||||
actionIndex: Incomplete
|
||||
isPositionDependent: bool
|
||||
@@ -66,6 +71,7 @@ class LexerCustomAction(LexerAction):
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class LexerChannelAction(LexerAction):
|
||||
__slots__ = "channel"
|
||||
channel: Incomplete
|
||||
def __init__(self, channel: int) -> None: ...
|
||||
def execute(self, lexer: Lexer): ...
|
||||
@@ -73,6 +79,7 @@ class LexerChannelAction(LexerAction):
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class LexerIndexedCustomAction(LexerAction):
|
||||
__slots__ = ("offset", "action")
|
||||
offset: Incomplete
|
||||
action: Incomplete
|
||||
isPositionDependent: bool
|
||||
|
||||
@@ -4,6 +4,7 @@ from antlr4.atn.LexerAction import LexerAction as LexerAction, LexerIndexedCusto
|
||||
from antlr4.InputStream import InputStream as InputStream
|
||||
|
||||
class LexerActionExecutor:
|
||||
__slots__ = ("lexerActions", "hashCode")
|
||||
lexerActions: Incomplete
|
||||
hashCode: Incomplete
|
||||
def __init__(self, lexerActions: list[LexerAction] = []) -> None: ...
|
||||
|
||||
@@ -34,6 +34,7 @@ from antlr4.Token import Token as Token
|
||||
from antlr4.Utils import str_list as str_list
|
||||
|
||||
class ParserATNSimulator(ATNSimulator):
|
||||
__slots__ = ("parser", "decisionToDFA", "predictionMode", "_input", "_startIndex", "_outerContext", "_dfa", "mergeCache")
|
||||
debug: bool
|
||||
trace_atn_sim: bool
|
||||
dfa_debug: bool
|
||||
|
||||
@@ -15,6 +15,7 @@ def filterPrecedencePredicates(collection: set[SemanticContext]): ...
|
||||
class EmptySemanticContext(SemanticContext): ...
|
||||
|
||||
class Predicate(SemanticContext):
|
||||
__slots__ = ("ruleIndex", "predIndex", "isCtxDependent")
|
||||
ruleIndex: Incomplete
|
||||
predIndex: Incomplete
|
||||
isCtxDependent: Incomplete
|
||||
@@ -33,6 +34,7 @@ class PrecedencePredicate(SemanticContext):
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class AND(SemanticContext):
|
||||
__slots__ = "opnds"
|
||||
opnds: Incomplete
|
||||
def __init__(self, a: SemanticContext, b: SemanticContext) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
@@ -41,6 +43,7 @@ class AND(SemanticContext):
|
||||
def evalPrecedence(self, parser: Recognizer, outerContext: RuleContext): ...
|
||||
|
||||
class OR(SemanticContext):
|
||||
__slots__ = "opnds"
|
||||
opnds: Incomplete
|
||||
def __init__(self, a: SemanticContext, b: SemanticContext) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
|
||||
@@ -4,6 +4,7 @@ from antlr4.atn.ATNState import RuleStartState
|
||||
from antlr4.IntervalSet import IntervalSet
|
||||
|
||||
class Transition:
|
||||
__slots__ = ("target", "isEpsilon", "label")
|
||||
EPSILON: int
|
||||
RANGE: int
|
||||
RULE: int
|
||||
@@ -22,6 +23,7 @@ class Transition:
|
||||
def __init__(self, target) -> None: ...
|
||||
|
||||
class AtomTransition(Transition):
|
||||
__slots__ = ("label_", "serializationType")
|
||||
label_: Incomplete
|
||||
label: Incomplete
|
||||
serializationType: Incomplete
|
||||
@@ -30,6 +32,7 @@ class AtomTransition(Transition):
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class RuleTransition(Transition):
|
||||
__slots__ = ("ruleIndex", "precedence", "followState", "serializationType")
|
||||
ruleIndex: Incomplete
|
||||
precedence: Incomplete
|
||||
followState: Incomplete
|
||||
@@ -39,6 +42,7 @@ class RuleTransition(Transition):
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class EpsilonTransition(Transition):
|
||||
__slots__ = ("serializationType", "outermostPrecedenceReturn")
|
||||
serializationType: Incomplete
|
||||
isEpsilon: bool
|
||||
outermostPrecedenceReturn: Incomplete
|
||||
@@ -46,6 +50,7 @@ class EpsilonTransition(Transition):
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class RangeTransition(Transition):
|
||||
__slots__ = ("serializationType", "start", "stop")
|
||||
serializationType: Incomplete
|
||||
start: Incomplete
|
||||
stop: Incomplete
|
||||
@@ -58,6 +63,7 @@ class AbstractPredicateTransition(Transition):
|
||||
def __init__(self, target) -> None: ...
|
||||
|
||||
class PredicateTransition(AbstractPredicateTransition):
|
||||
__slots__ = ("serializationType", "ruleIndex", "predIndex", "isCtxDependent")
|
||||
serializationType: Incomplete
|
||||
ruleIndex: Incomplete
|
||||
predIndex: Incomplete
|
||||
@@ -68,6 +74,7 @@ class PredicateTransition(AbstractPredicateTransition):
|
||||
def getPredicate(self): ...
|
||||
|
||||
class ActionTransition(Transition):
|
||||
__slots__ = ("serializationType", "ruleIndex", "actionIndex", "isCtxDependent")
|
||||
serializationType: Incomplete
|
||||
ruleIndex: Incomplete
|
||||
actionIndex: Incomplete
|
||||
@@ -77,6 +84,7 @@ class ActionTransition(Transition):
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class SetTransition(Transition):
|
||||
__slots__ = "serializationType"
|
||||
serializationType: Incomplete
|
||||
label: Incomplete
|
||||
def __init__(self, target, set: IntervalSet) -> None: ...
|
||||
@@ -88,11 +96,13 @@ class NotSetTransition(SetTransition):
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class WildcardTransition(Transition):
|
||||
__slots__ = "serializationType"
|
||||
serializationType: Incomplete
|
||||
def __init__(self, target) -> None: ...
|
||||
def matches(self, symbol: int, minVocabSymbol: int, maxVocabSymbol: int): ...
|
||||
|
||||
class PrecedencePredicateTransition(AbstractPredicateTransition):
|
||||
__slots__ = ("serializationType", "precedence")
|
||||
serializationType: Incomplete
|
||||
precedence: Incomplete
|
||||
isEpsilon: bool
|
||||
|
||||
@@ -6,6 +6,7 @@ from antlr4.dfa.DFAState import DFAState as DFAState
|
||||
from antlr4.error.Errors import IllegalStateException as IllegalStateException
|
||||
|
||||
class DFA:
|
||||
__slots__ = ("atnStartState", "decision", "_states", "s0", "precedenceDfa")
|
||||
atnStartState: Incomplete
|
||||
decision: Incomplete
|
||||
s0: Incomplete
|
||||
|
||||
@@ -5,6 +5,7 @@ from antlr4.dfa.DFAState import DFAState as DFAState
|
||||
from antlr4.Utils import str_list as str_list
|
||||
|
||||
class DFASerializer:
|
||||
__slots__ = ("dfa", "literalNames", "symbolicNames")
|
||||
dfa: Incomplete
|
||||
literalNames: list[str] | None
|
||||
symbolicNames: list[str] | None
|
||||
|
||||
@@ -4,11 +4,22 @@ from antlr4.atn.ATNConfigSet import ATNConfigSet as ATNConfigSet
|
||||
from antlr4.atn.SemanticContext import SemanticContext as SemanticContext
|
||||
|
||||
class PredPrediction:
|
||||
__slots__ = ("alt", "pred")
|
||||
alt: Incomplete
|
||||
pred: Incomplete
|
||||
def __init__(self, pred: SemanticContext, alt: int) -> None: ...
|
||||
|
||||
class DFAState:
|
||||
__slots__ = (
|
||||
"stateNumber",
|
||||
"configs",
|
||||
"edges",
|
||||
"isAcceptState",
|
||||
"prediction",
|
||||
"lexerActionExecutor",
|
||||
"requiresFullContext",
|
||||
"predicates",
|
||||
)
|
||||
stateNumber: Incomplete
|
||||
configs: Incomplete
|
||||
edges: Incomplete
|
||||
|
||||
@@ -3,10 +3,12 @@ from _typeshed import Incomplete
|
||||
class Chunk: ...
|
||||
|
||||
class TagChunk(Chunk):
|
||||
__slots__ = ("tag", "label")
|
||||
tag: Incomplete
|
||||
label: Incomplete
|
||||
def __init__(self, tag: str, label: str | None = None) -> None: ...
|
||||
|
||||
class TextChunk(Chunk):
|
||||
__slots__ = "text"
|
||||
text: Incomplete
|
||||
def __init__(self, text: str) -> None: ...
|
||||
|
||||
@@ -4,6 +4,7 @@ from antlr4.tree.ParseTreePattern import ParseTreePattern as ParseTreePattern
|
||||
from antlr4.tree.Tree import ParseTree as ParseTree
|
||||
|
||||
class ParseTreeMatch:
|
||||
__slots__ = ("tree", "pattern", "labels", "mismatchedNode")
|
||||
tree: Incomplete
|
||||
pattern: Incomplete
|
||||
labels: Incomplete
|
||||
|
||||
@@ -5,6 +5,7 @@ from antlr4.tree.Tree import ParseTree as ParseTree
|
||||
from antlr4.xpath.XPathLexer import XPathLexer as XPathLexer
|
||||
|
||||
class ParseTreePattern:
|
||||
__slots__ = ("matcher", "patternRuleIndex", "pattern", "patternTree")
|
||||
matcher: Incomplete
|
||||
patternRuleIndex: Incomplete
|
||||
pattern: Incomplete
|
||||
|
||||
@@ -25,6 +25,7 @@ class CannotInvokeStartRule(Exception):
|
||||
class StartRuleDoesNotConsumeFullPattern(Exception): ...
|
||||
|
||||
class ParseTreePatternMatcher:
|
||||
__slots__ = ("lexer", "parser", "start", "stop", "escape")
|
||||
lexer: Incomplete
|
||||
parser: Incomplete
|
||||
start: str
|
||||
|
||||
@@ -3,6 +3,7 @@ from _typeshed import Incomplete
|
||||
from antlr4.Token import Token as Token
|
||||
|
||||
class RuleTagToken(Token):
|
||||
__slots__ = ("label", "ruleName")
|
||||
source: Incomplete
|
||||
type: Incomplete
|
||||
channel: Incomplete
|
||||
|
||||
@@ -3,6 +3,7 @@ from _typeshed import Incomplete
|
||||
from antlr4.Token import CommonToken as CommonToken
|
||||
|
||||
class TokenTagToken(CommonToken):
|
||||
__slots__ = ("tokenName", "label")
|
||||
tokenName: Incomplete
|
||||
label: Incomplete
|
||||
def __init__(self, tokenName: str, type: int, label: str | None = None) -> None: ...
|
||||
|
||||
@@ -27,6 +27,7 @@ class ParseTreeListener:
|
||||
def exitEveryRule(self, ctx): ...
|
||||
|
||||
class TerminalNodeImpl(TerminalNode):
|
||||
__slots__ = ("parentCtx", "symbol")
|
||||
parentCtx: Incomplete
|
||||
symbol: Incomplete
|
||||
def __init__(self, symbol: Token) -> None: ...
|
||||
|
||||
@@ -51,6 +51,7 @@ class FastIterOrderedMultiDict(OrderedMultiDict[_KT, _VT]): # undocumented
|
||||
def iterkeys(self, multi: bool = False) -> Generator[_KT, None, None]: ...
|
||||
|
||||
class OneToOne(dict[_KT, _VT]):
|
||||
__slots__ = ("inv",)
|
||||
inv: OneToOne[_VT, _KT]
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Self: ...
|
||||
@@ -87,6 +88,7 @@ def subdict(d: dict[_KT, _VT], keep: Iterable[_KT] | None = None, drop: Iterable
|
||||
class FrozenHashError(TypeError): ... # undocumented
|
||||
|
||||
class FrozenDict(dict[_KT, _VT]):
|
||||
__slots__ = ("_hash",)
|
||||
def __copy__(self) -> Self: ...
|
||||
@classmethod
|
||||
def fromkeys(cls, keys: Iterable[_KT], value: _VT | None = None) -> Self: ... # type: ignore[override]
|
||||
|
||||
@@ -12,6 +12,7 @@ def floor(x: float, options: None = None) -> int: ...
|
||||
def floor(x: float, options: Iterable[float]) -> float: ...
|
||||
|
||||
class Bits:
|
||||
__slots__ = ("val", "len")
|
||||
val: int
|
||||
len: int
|
||||
def __init__(self, val: int | list[bool] | str | bytes = 0, len_: int | None = None) -> None: ...
|
||||
|
||||
@@ -59,6 +59,7 @@ class IndexedSet(MutableSet[Any]):
|
||||
def complement(wrapped: Iterable[Any]) -> _ComplementSet: ...
|
||||
|
||||
class _ComplementSet:
|
||||
__slots__ = ("_included", "_excluded")
|
||||
def __init__(
|
||||
self, included: set[Any] | frozenset[Any] | None = None, excluded: set[Any] | frozenset[Any] | None = None
|
||||
) -> None: ...
|
||||
|
||||
@@ -4,6 +4,7 @@ from typing import Any, Generic, Literal, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
class Callpoint:
|
||||
__slots__ = ("func_name", "lineno", "module_name", "module_path", "lasti", "line")
|
||||
func_name: str
|
||||
lineno: int
|
||||
module_name: str
|
||||
|
||||
@@ -9,6 +9,7 @@ bytechr: Callable[[float], bytes]
|
||||
class CTypesType(type): ...
|
||||
|
||||
class CTypesData:
|
||||
__slots__ = ["__weakref__"]
|
||||
__metaclass__: Incomplete
|
||||
__name__: str
|
||||
def __init__(self, *args) -> None: ...
|
||||
@@ -23,17 +24,21 @@ class CTypesData:
|
||||
def __repr__(self, c_name: str | None = None): ...
|
||||
|
||||
class CTypesGenericPrimitive(CTypesData):
|
||||
__slots__: list[str] = []
|
||||
def __hash__(self) -> int: ...
|
||||
|
||||
class CTypesGenericArray(CTypesData):
|
||||
__slots__: list[str] = []
|
||||
def __iter__(self): ...
|
||||
|
||||
class CTypesGenericPtr(CTypesData):
|
||||
__slots__ = ["_address", "_as_ctype_ptr"]
|
||||
kind: str
|
||||
def __nonzero__(self) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
class CTypesBaseStructOrUnion(CTypesData): ...
|
||||
class CTypesBaseStructOrUnion(CTypesData):
|
||||
__slots__ = ["_blob"]
|
||||
|
||||
class CTypesBackend:
|
||||
PRIMITIVE_TYPES: Incomplete
|
||||
|
||||
@@ -28,6 +28,7 @@ def tostring(
|
||||
class _ElementBase: ...
|
||||
|
||||
class RestrictedElement(_ElementBase):
|
||||
__slots__ = ()
|
||||
blacklist: Incomplete
|
||||
def __iter__(self): ...
|
||||
def iterchildren(self, tag=None, reversed: bool = False): ...
|
||||
|
||||
@@ -15,6 +15,7 @@ class InvalidRomanNumeralError(ValueError):
|
||||
|
||||
@final
|
||||
class RomanNumeral:
|
||||
__slots__ = ("_value",)
|
||||
def __init__(self, value: int, /) -> None: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -55,6 +55,26 @@ class AnnotationMixin:
|
||||
class PDFAnnotation(AnnotationMixin, PDFObject): ...
|
||||
|
||||
class AnnotationDict(AnnotationMixin):
|
||||
__slots__ = (
|
||||
"type",
|
||||
"subtype",
|
||||
"rect",
|
||||
"border",
|
||||
"f_t",
|
||||
"v",
|
||||
"f",
|
||||
"contents",
|
||||
"a",
|
||||
"dest",
|
||||
"c",
|
||||
"t",
|
||||
"quad_points",
|
||||
"p",
|
||||
"name",
|
||||
"ink_list",
|
||||
"f_s",
|
||||
"d_a",
|
||||
)
|
||||
def serialize(self) -> str: ...
|
||||
|
||||
class PDFEmbeddedFile(PDFContentStream):
|
||||
|
||||
@@ -15,6 +15,7 @@ class _BracketInfo(TypedDict):
|
||||
BIDI_BRACKETS: Final[dict[str, _BracketInfo]]
|
||||
|
||||
class BidiCharacter:
|
||||
__slots__ = ["character_index", "character", "bidi_class", "original_bidi_class", "embedding_level", "direction"]
|
||||
character_index: int
|
||||
character: str
|
||||
bidi_class: str
|
||||
@@ -28,11 +29,13 @@ class BidiCharacter:
|
||||
|
||||
@dataclass
|
||||
class DirectionalStatus:
|
||||
__slots__ = ["embedding_level", "directional_override_status", "directional_isolate_status"]
|
||||
embedding_level: int # between 0 and MAX_DEPTH
|
||||
directional_override_status: Literal["N", "L", "R"]
|
||||
directional_isolate_status: bool
|
||||
|
||||
class IsolatingRun:
|
||||
__slots__ = ["characters", "previous_direction", "next_direction"]
|
||||
characters: list[BidiCharacter]
|
||||
previous_direction: str
|
||||
next_direction: str
|
||||
@@ -46,6 +49,7 @@ def auto_detect_base_direction(string: str, stop_at_pdi: bool = False, debug: bo
|
||||
def calculate_isolate_runs(paragraph: Sequence[BidiCharacter]) -> list[IsolatingRun]: ...
|
||||
|
||||
class BidiParagraph:
|
||||
__slots__ = ("text", "base_direction", "debug", "base_embedding_level", "characters")
|
||||
text: str
|
||||
base_direction: TextDirection
|
||||
debug: bool
|
||||
|
||||
@@ -20,6 +20,7 @@ class HarfBuzzFont(Incomplete): # derives from uharfbuzz.Font
|
||||
|
||||
@dataclass
|
||||
class FontFace:
|
||||
__slots__ = ("family", "emphasis", "size_pt", "color", "fill_color")
|
||||
family: str | None
|
||||
emphasis: TextEmphasis | None
|
||||
size_pt: int | None
|
||||
@@ -79,6 +80,7 @@ class TitleStyle(TextStyle): ...
|
||||
__pdoc__: Final[dict[str, bool]]
|
||||
|
||||
class CoreFont:
|
||||
__slots__ = ("i", "type", "name", "sp", "ss", "up", "ut", "cw", "fontkey", "emphasis")
|
||||
i: int
|
||||
type: str
|
||||
name: str
|
||||
@@ -94,6 +96,27 @@ class CoreFont:
|
||||
def encode_text(self, text: str) -> str: ...
|
||||
|
||||
class TTFFont:
|
||||
__slots__ = (
|
||||
"i",
|
||||
"type",
|
||||
"name",
|
||||
"desc",
|
||||
"glyph_ids",
|
||||
"hbfont",
|
||||
"sp",
|
||||
"ss",
|
||||
"up",
|
||||
"ut",
|
||||
"cw",
|
||||
"ttffile",
|
||||
"fontkey",
|
||||
"emphasis",
|
||||
"scale",
|
||||
"subset",
|
||||
"cmap",
|
||||
"ttfont",
|
||||
"missing_glyphs",
|
||||
)
|
||||
i: int
|
||||
type: str
|
||||
ttffile: Incomplete
|
||||
@@ -137,6 +160,7 @@ class PDFFontDescriptor(PDFObject):
|
||||
|
||||
@dataclass(order=True)
|
||||
class Glyph:
|
||||
__slots__ = ("glyph_id", "unicode", "glyph_name", "glyph_width")
|
||||
glyph_id: int
|
||||
unicode: tuple[Incomplete, ...]
|
||||
glyph_name: str
|
||||
|
||||
@@ -9,6 +9,7 @@ from .syntax import Destination, PDFObject, PDFString
|
||||
|
||||
@dataclass
|
||||
class OutlineSection:
|
||||
__slots__ = ("name", "level", "page_number", "dest", "struct_elem")
|
||||
name: str
|
||||
level: int
|
||||
page_number: int
|
||||
@@ -16,6 +17,7 @@ class OutlineSection:
|
||||
struct_elem: StructElem | None = None
|
||||
|
||||
class OutlineItemDictionary(PDFObject):
|
||||
__slots__ = ("_id", "title", "parent", "prev", "next", "first", "last", "count", "dest", "struct_elem")
|
||||
title: PDFString
|
||||
parent: Incomplete | None
|
||||
prev: Incomplete | None
|
||||
@@ -28,6 +30,7 @@ class OutlineItemDictionary(PDFObject):
|
||||
def __init__(self, title: str, dest: Destination | None = None, struct_elem: StructElem | None = None) -> None: ...
|
||||
|
||||
class OutlineDictionary(PDFObject):
|
||||
__slots__ = ("_id", "type", "first", "last", "count")
|
||||
type: str
|
||||
first: Incomplete | None
|
||||
last: Incomplete | None
|
||||
|
||||
@@ -102,6 +102,21 @@ class PDFXmpMetadata(PDFContentStream):
|
||||
def __init__(self, contents: bytes) -> None: ...
|
||||
|
||||
class PDFXObject(PDFContentStream):
|
||||
__slots__ = (
|
||||
"_id",
|
||||
"_contents",
|
||||
"filter",
|
||||
"length",
|
||||
"type",
|
||||
"subtype",
|
||||
"width",
|
||||
"height",
|
||||
"color_space",
|
||||
"bits_per_component",
|
||||
"decode",
|
||||
"decode_parms",
|
||||
"s_mask",
|
||||
)
|
||||
type: Name
|
||||
subtype: Name
|
||||
width: Incomplete
|
||||
@@ -126,11 +141,13 @@ class PDFXObject(PDFContentStream):
|
||||
) -> None: ...
|
||||
|
||||
class PDFICCProfile(PDFContentStream):
|
||||
__slots__ = ("_id", "_contents", "filter", "length", "n", "alternate")
|
||||
n: Incomplete
|
||||
alternate: Name
|
||||
def __init__(self, contents: bytes, n, alternate: str) -> None: ...
|
||||
|
||||
class PDFPageLabel:
|
||||
__slots__ = ("_style", "_prefix", "st")
|
||||
st: int
|
||||
def __init__(self, label_style: PageLabelStyle, label_prefix: str, label_start: int) -> None: ...
|
||||
@property
|
||||
@@ -143,6 +160,24 @@ class PDFPageLabel:
|
||||
def get_start(self) -> int: ...
|
||||
|
||||
class PDFPage(PDFObject):
|
||||
__slots__ = (
|
||||
"_id",
|
||||
"type",
|
||||
"contents",
|
||||
"dur",
|
||||
"trans",
|
||||
"annots",
|
||||
"group",
|
||||
"media_box",
|
||||
"struct_parents",
|
||||
"resources",
|
||||
"parent",
|
||||
"_index",
|
||||
"_width_pt",
|
||||
"_height_pt",
|
||||
"_page_label",
|
||||
"_text_substitution_fragments",
|
||||
)
|
||||
type: Name
|
||||
contents: Incomplete
|
||||
dur: Incomplete | None
|
||||
@@ -184,6 +219,7 @@ class PDFXrefAndTrailer(ContentWithoutID):
|
||||
def serialize(self, _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
|
||||
class OutputIntentDictionary:
|
||||
__slots__ = ("type", "s", "output_condition_identifier", "output_condition", "registry_name", "dest_output_profile", "info")
|
||||
type: Name
|
||||
s: Name
|
||||
output_condition_identifier: PDFString | None
|
||||
|
||||
@@ -6,17 +6,20 @@ from .encryption import StandardSecurityHandler
|
||||
from .syntax import PDFArray, PDFObject, PDFString
|
||||
|
||||
class NumberTree(PDFObject):
|
||||
__slots__ = ("_id", "nums")
|
||||
nums: defaultdict[Incomplete, list[Incomplete]]
|
||||
def __init__(self) -> None: ...
|
||||
def serialize(self, obj_dict: Unused = None, _security_handler: StandardSecurityHandler | None = None) -> str: ...
|
||||
|
||||
class StructTreeRoot(PDFObject):
|
||||
__slots__ = ("_id", "type", "parent_tree", "k")
|
||||
type: str
|
||||
parent_tree: NumberTree
|
||||
k: PDFArray[Incomplete]
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class StructElem(PDFObject):
|
||||
__slots__ = ("_id", "type", "s", "p", "k", "t", "alt", "pg", "_page_number")
|
||||
type: str
|
||||
s: str
|
||||
p: PDFObject
|
||||
|
||||
@@ -105,6 +105,7 @@ class Row:
|
||||
|
||||
@dataclass
|
||||
class Cell:
|
||||
__slots__ = ("text", "align", "v_align", "style", "img", "img_fill_width", "colspan", "rowspan", "padding", "link", "border")
|
||||
text: str
|
||||
align: str | Align | None
|
||||
v_align: str | VAlign | None
|
||||
|
||||
@@ -4,6 +4,7 @@ from typing_extensions import Self
|
||||
from gevent.hub import Hub
|
||||
|
||||
class AbstractLinkable:
|
||||
__slots__ = ("hub", "_links", "_notifier", "_notify_all", "__weakref__")
|
||||
@property
|
||||
def hub(self) -> Hub | None: ...
|
||||
def __init__(self, hub: Hub | None = None) -> None: ...
|
||||
|
||||
@@ -28,7 +28,8 @@ class FlushingBufferedWriter(io.BufferedWriter): ...
|
||||
class WriteallMixin:
|
||||
def writeall(self, b: ReadableBuffer, /) -> int: ...
|
||||
|
||||
class FileIO(io.FileIO): ...
|
||||
class FileIO(io.FileIO):
|
||||
__slots__ = ()
|
||||
|
||||
class WriteIsWriteallMixin(WriteallMixin):
|
||||
def write(self, b: ReadableBuffer, /) -> int: ...
|
||||
|
||||
@@ -3,6 +3,7 @@ from weakref import ref
|
||||
|
||||
@final
|
||||
class ValuedWeakRef(ref):
|
||||
__slots__ = ("value",)
|
||||
value: Any
|
||||
|
||||
@final
|
||||
|
||||
@@ -19,6 +19,7 @@ def implementer(interface: Any, /) -> Callable[[_T], _T]: ...
|
||||
class MonitorWarning(RuntimeWarning): ...
|
||||
|
||||
class _MonitorEntry:
|
||||
__slots__ = ("function", "period", "last_run_time")
|
||||
function: Callable[[Hub], object]
|
||||
period: float
|
||||
last_run_time: float
|
||||
|
||||
@@ -9,6 +9,7 @@ _Cookie = NewType("_Cookie", LockType)
|
||||
class EmptyTimeout(Exception): ...
|
||||
|
||||
class Queue(Generic[_T]):
|
||||
__slots__ = ("_queue", "_mutex", "_not_empty", "unfinished_tasks")
|
||||
unfinished_tasks: int
|
||||
def __init__(self) -> None: ...
|
||||
def task_done(self) -> None: ...
|
||||
|
||||
@@ -21,6 +21,7 @@ _ThrowArgs: TypeAlias = (
|
||||
)
|
||||
|
||||
class Waiter(Generic[_T]):
|
||||
__slots__ = ["hub", "greenlet", "value", "_exception"]
|
||||
@property
|
||||
def hub(self) -> Hub: ... # readonly in Cython
|
||||
@property
|
||||
@@ -42,4 +43,5 @@ class Waiter(Generic[_T]):
|
||||
def __call__(self, source: _ValueSource[_T]) -> None: ...
|
||||
|
||||
@final
|
||||
class MultipleWaiter(Waiter[_T]): ...
|
||||
class MultipleWaiter(Waiter[_T]):
|
||||
__slots__ = ["_values"]
|
||||
|
||||
@@ -20,6 +20,7 @@ class _ValueSource(Protocol[_T_co]):
|
||||
def exception(self) -> BaseException | None: ...
|
||||
|
||||
class Event(AbstractLinkable):
|
||||
__slots__ = ("_flag",)
|
||||
def __init__(self) -> None: ...
|
||||
def is_set(self) -> bool: ...
|
||||
def isSet(self) -> bool: ...
|
||||
@@ -32,6 +33,7 @@ class Event(AbstractLinkable):
|
||||
def wait(self, timeout: float) -> bool: ...
|
||||
|
||||
class AsyncResult(AbstractLinkable, Generic[_T]):
|
||||
__slots__ = ("_value", "_exc_info", "_imap_task_index")
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def value(self) -> _T | None: ...
|
||||
|
||||
@@ -105,6 +105,7 @@ class Hub(WaitOperationsGreenlet):
|
||||
threadpool: _DefaultReturnProperty[ThreadPool]
|
||||
|
||||
class linkproxy:
|
||||
__slots__ = ["callback", "obj"]
|
||||
callback: Callable[[object], object]
|
||||
obj: object
|
||||
def __init__(self, callback: Callable[[_T], object], obj: _T) -> None: ...
|
||||
|
||||
@@ -2,6 +2,15 @@ from typing import Any
|
||||
from typing_extensions import Self
|
||||
|
||||
class local:
|
||||
__slots__ = (
|
||||
"_local__impl",
|
||||
"_local_type_set_descriptors",
|
||||
"_local_type_get_descriptors",
|
||||
"_local_type_vars",
|
||||
"_local_type_del_descriptors",
|
||||
"_local_type",
|
||||
"_local_type_set_or_del_descriptors",
|
||||
)
|
||||
def __init__(self, *args: object, **kwargs: object) -> None: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __getattribute__(self, name: str, /) -> Any: ...
|
||||
|
||||
@@ -8,6 +8,7 @@ from gevent.hub import Hub
|
||||
__all__ = ["Semaphore", "BoundedSemaphore", "DummySemaphore", "RLock"]
|
||||
|
||||
class Semaphore(AbstractLinkable):
|
||||
__slots__ = ("counter", "_multithreaded")
|
||||
counter: int
|
||||
def __init__(self, value: int = 1, hub: Hub | None = None) -> None: ...
|
||||
def acquire(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
||||
@@ -18,7 +19,8 @@ class Semaphore(AbstractLinkable):
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
class BoundedSemaphore(Semaphore): ...
|
||||
class BoundedSemaphore(Semaphore):
|
||||
__slots__ = ("_initial_value",)
|
||||
|
||||
class DummySemaphore:
|
||||
def __init__(self, value: int | None = None) -> None: ...
|
||||
@@ -33,6 +35,7 @@ class DummySemaphore:
|
||||
def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ...
|
||||
|
||||
class RLock:
|
||||
__slots__ = ("_block", "_owner", "_count", "__weakref__")
|
||||
def __init__(self, hub: Hub | None = None) -> None: ...
|
||||
def acquire(self, blocking: bool = True, timeout: float | None = None) -> bool: ...
|
||||
def __enter__(self) -> bool: ...
|
||||
|
||||
@@ -18,6 +18,7 @@ _S = TypeVar("_S")
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
class GroupMappingMixin:
|
||||
__slots__ = ()
|
||||
def spawn(self, func: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> Greenlet[_P, _T]: ...
|
||||
# we would like to use ParamSpec for these, but since args and kwds are passed in as is
|
||||
# pyright will complain if we use _P.args/_P.kwargs, it appears to work on mypy though
|
||||
|
||||
@@ -23,6 +23,16 @@ class _LogOutputStream(SupportsWrite[str], Protocol):
|
||||
def flush(self) -> None: ...
|
||||
|
||||
class Input:
|
||||
__slots__ = (
|
||||
"rfile",
|
||||
"content_length",
|
||||
"socket",
|
||||
"position",
|
||||
"chunked_input",
|
||||
"chunk_length",
|
||||
"_chunked_input_error",
|
||||
"send_100_continue_enabled",
|
||||
)
|
||||
rfile: BufferedReader
|
||||
content_length: int | None
|
||||
socket: _GeventSocket | None
|
||||
@@ -103,6 +113,7 @@ class WSGIHandler:
|
||||
def get_environ(self) -> WSGIEnvironment: ...
|
||||
|
||||
class LoggingLogAdapter:
|
||||
__slots__ = ("_logger", "_level")
|
||||
def __init__(self, logger: Logger, level: int = 20) -> None: ...
|
||||
def write(self, msg: str) -> None: ...
|
||||
def flush(self) -> None: ...
|
||||
@@ -111,9 +122,11 @@ class LoggingLogAdapter:
|
||||
def __setattr__(self, name: str, value: object) -> None: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
|
||||
class Environ(WSGIEnvironment): ...
|
||||
class Environ(WSGIEnvironment):
|
||||
__slots__ = ()
|
||||
|
||||
class SecureEnviron(Environ):
|
||||
__slots__ = ("secure_repr", "whitelist_keys", "print_masked_keys")
|
||||
default_secure_repr: ClassVar[bool]
|
||||
default_whitelist_keys: ClassVar[Container[str]]
|
||||
default_print_masked_keys: ClassVar[bool]
|
||||
|
||||
@@ -21,6 +21,7 @@ else:
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class SimpleQueue(Generic[_T]):
|
||||
__slots__ = ("_maxsize", "getters", "putters", "hub", "_event_unlock", "queue", "__weakref__", "is_shutdown")
|
||||
@property
|
||||
def hub(self) -> Hub: ... # readonly in Cython
|
||||
@property
|
||||
@@ -53,6 +54,7 @@ class SimpleQueue(Generic[_T]):
|
||||
next = __next__
|
||||
|
||||
class Queue(SimpleQueue[_T]):
|
||||
__slots__ = ("_cond", "unfinished_tasks")
|
||||
@property
|
||||
def unfinished_tasks(self) -> int: ... # readonly in Cython
|
||||
@overload
|
||||
@@ -69,6 +71,7 @@ JoinableQueue = Queue
|
||||
|
||||
@final
|
||||
class UnboundQueue(Queue[_T]):
|
||||
__slots__ = ()
|
||||
@overload
|
||||
def __init__(self, maxsize: None = None) -> None: ...
|
||||
@overload
|
||||
@@ -76,10 +79,14 @@ class UnboundQueue(Queue[_T]):
|
||||
@overload
|
||||
def __init__(self, maxsize: None = None, *, items: Iterable[_T]) -> None: ...
|
||||
|
||||
class PriorityQueue(Queue[_T]): ...
|
||||
class LifoQueue(Queue[_T]): ...
|
||||
class PriorityQueue(Queue[_T]):
|
||||
__slots__ = ()
|
||||
|
||||
class LifoQueue(Queue[_T]):
|
||||
__slots__ = ()
|
||||
|
||||
class Channel(Generic[_T]):
|
||||
__slots__ = ("getters", "putters", "hub", "_event_unlock", "__weakref__")
|
||||
@property
|
||||
def getters(self) -> deque[Waiter[Any]]: ... # readonly in Cython
|
||||
@property
|
||||
|
||||
@@ -16,6 +16,17 @@ _TaskItem: TypeAlias = tuple[Callable[..., Any], tuple[Any, ...], dict[str, Any]
|
||||
_Receiver: TypeAlias = Callable[[_ValueSource[_T]], object]
|
||||
|
||||
class ThreadPool(GroupMappingMixin):
|
||||
__slots__ = (
|
||||
"hub",
|
||||
"_maxsize",
|
||||
"manager",
|
||||
"pid",
|
||||
"fork_watcher",
|
||||
"_available_worker_threads_greenlet_sem",
|
||||
"_worker_greenlets",
|
||||
"task_queue",
|
||||
"_idle_task_timeout",
|
||||
)
|
||||
hub: Hub
|
||||
pid: int
|
||||
manager: Greenlet[..., Any] | None
|
||||
@@ -37,6 +48,7 @@ class ThreadPool(GroupMappingMixin):
|
||||
def spawn(self, func: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> AsyncResult[_T]: ... # type: ignore[override]
|
||||
|
||||
class ThreadResult(Generic[_T]):
|
||||
__slots__ = ("exc_info", "async_watcher", "_call_when_ready", "value", "context", "hub", "receiver")
|
||||
receiver: _Receiver[_T]
|
||||
hub: Hub
|
||||
context: object | None
|
||||
|
||||
@@ -12,6 +12,7 @@ def is_string(checker: Unused, instance: object) -> bool: ...
|
||||
def is_any(checker: Unused, instance: Unused) -> Literal[True]: ...
|
||||
|
||||
class TypeChecker:
|
||||
__slots__ = ("_type_checkers", "__weakref__")
|
||||
def __init__(self, type_checkers: Mapping[str, Callable[[object], bool]] = ...) -> None: ...
|
||||
def is_type(self, instance, type: str) -> bool: ...
|
||||
def redefine(self, type: str, fn: Callable[..., bool]) -> TypeChecker: ...
|
||||
|
||||
@@ -9,6 +9,7 @@ class _CannotLoadFile(Exception): ...
|
||||
|
||||
@deprecated("The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead.")
|
||||
class _Outputter:
|
||||
__slots__ = ("_formatter", "_stdout", "_stderr", "__weakref__")
|
||||
_formatter: _PlainFormatter | _PrettyFormatter
|
||||
_stdout: SupportsWrite[str]
|
||||
_stderr: SupportsWrite[str]
|
||||
@@ -28,6 +29,7 @@ class _Outputter:
|
||||
|
||||
@deprecated("The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead.")
|
||||
class _PrettyFormatter:
|
||||
__slots__ = ("__weakref__",)
|
||||
_ERROR_MSG: str
|
||||
_SUCCESS_MSG: str
|
||||
|
||||
@@ -39,6 +41,7 @@ class _PrettyFormatter:
|
||||
|
||||
@deprecated("The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead.")
|
||||
class _PlainFormatter:
|
||||
__slots__ = ("_error_format", "__weakref__")
|
||||
_error_format: str
|
||||
|
||||
def __init__(self, error_format: str) -> None: ...
|
||||
|
||||
@@ -76,12 +76,23 @@ def create(
|
||||
def extend(validator, validators=(), version=None, type_checker=None, format_checker=None): ...
|
||||
|
||||
# At runtime these are fields that are assigned the return values of create() calls.
|
||||
class Draft3Validator(_Validator): ...
|
||||
class Draft4Validator(_Validator): ...
|
||||
class Draft6Validator(_Validator): ...
|
||||
class Draft7Validator(_Validator): ...
|
||||
class Draft201909Validator(_Validator): ...
|
||||
class Draft202012Validator(_Validator): ...
|
||||
class Draft3Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
class Draft4Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
class Draft6Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
class Draft7Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
class Draft201909Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
class Draft202012Validator(_Validator):
|
||||
__slots__ = ("_validators", "schema", "_ref_resolver", "format_checker", "_registry", "_resolver", "__weakref__")
|
||||
|
||||
_Handler: TypeAlias = Callable[[str], Incomplete]
|
||||
|
||||
|
||||
@@ -8,11 +8,13 @@ from netaddr.strategy.eui48 import mac_eui48
|
||||
from netaddr.strategy.eui64 import eui64_base
|
||||
|
||||
class BaseIdentifier:
|
||||
__slots__ = ("_value", "__weakref__")
|
||||
def __init__(self) -> None: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __index__(self) -> int: ...
|
||||
|
||||
class OUI(BaseIdentifier):
|
||||
__slots__ = ("records",)
|
||||
records: list[dict[str, object]]
|
||||
def __init__(self, oui: str | int) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
@@ -22,6 +24,7 @@ class OUI(BaseIdentifier):
|
||||
def registration(self, index: int = 0) -> DictDotLookup: ...
|
||||
|
||||
class IAB(BaseIdentifier):
|
||||
__slots__ = ("record",)
|
||||
IAB_EUI_VALUES: ClassVar[tuple[int, int]]
|
||||
@classmethod
|
||||
def split_iab_mac(cls, eui_int: int, strict: bool = False) -> tuple[int, int]: ...
|
||||
@@ -32,6 +35,7 @@ class IAB(BaseIdentifier):
|
||||
def registration(self) -> DictDotLookup: ...
|
||||
|
||||
class EUI(BaseIdentifier):
|
||||
__slots__ = ("_module", "_dialect")
|
||||
def __init__(
|
||||
self, addr: EUI | int | str, version: int | None = None, dialect: type[mac_eui48 | eui64_base] | None = None
|
||||
) -> None: ...
|
||||
|
||||
@@ -8,6 +8,7 @@ from netaddr.core import DictDotLookup
|
||||
from netaddr.strategy.ipv6 import ipv6_verbose
|
||||
|
||||
class BaseIP:
|
||||
__slots__ = ("_value", "_module", "__weakref__")
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def value(self) -> int | None: ...
|
||||
@@ -40,6 +41,7 @@ _IPAddressAddr: TypeAlias = BaseIP | int | str
|
||||
_IPNetworkAddr: TypeAlias = IPNetwork | IPAddress | tuple[int, int] | str
|
||||
|
||||
class IPAddress(BaseIP):
|
||||
__slots__ = ()
|
||||
def __init__(self, addr: _IPAddressAddr, version: Literal[4, 6] | None = None, flags: int = 0) -> None: ...
|
||||
def netmask_bits(self) -> int: ...
|
||||
def is_hostmask(self) -> bool: ...
|
||||
@@ -79,6 +81,7 @@ class IPAddress(BaseIP):
|
||||
def is_ipv6_unique_local(self) -> bool: ...
|
||||
|
||||
class IPListMixin:
|
||||
__slots__ = ()
|
||||
def __iter__(self) -> Iterator[IPAddress]: ...
|
||||
@property
|
||||
def size(self) -> int: ...
|
||||
@@ -95,6 +98,7 @@ class IPListMixin:
|
||||
def parse_ip_network(module, addr: tuple[int, int] | str, flags: int = 0, *, expand_partial: bool = False) -> tuple[int, int]: ...
|
||||
|
||||
class IPNetwork(BaseIP, IPListMixin):
|
||||
__slots__ = ("_prefixlen",)
|
||||
def __init__(
|
||||
self, addr: _IPNetworkAddr, version: Literal[4, 6] | None = None, flags: int = 0, *, expand_partial: bool = False
|
||||
) -> None: ...
|
||||
@@ -135,6 +139,7 @@ class IPNetwork(BaseIP, IPListMixin):
|
||||
def iter_hosts(self) -> Iterator[IPAddress]: ...
|
||||
|
||||
class IPRange(BaseIP, IPListMixin):
|
||||
__slots__ = ("_start", "_end")
|
||||
def __init__(self, start: _IPAddressAddr, end: _IPAddressAddr, flags: int = 0) -> None: ...
|
||||
def __contains__(self, other: BaseIP | _IPAddressAddr) -> bool: ...
|
||||
@property
|
||||
|
||||
@@ -10,6 +10,7 @@ def glob_to_cidrs(ipglob: str) -> list[IPNetwork]: ...
|
||||
def cidr_to_glob(cidr: _IPNetworkAddr) -> str: ...
|
||||
|
||||
class IPGlob(IPRange):
|
||||
__slots__ = ("_glob",)
|
||||
def __init__(self, ipglob: str) -> None: ...
|
||||
@property
|
||||
def glob(self) -> str: ...
|
||||
|
||||
@@ -7,6 +7,7 @@ from netaddr.ip import IPAddress, IPNetwork, IPRange, _IPNetworkAddr
|
||||
_IPIterable: TypeAlias = IPNetwork | IPRange | IPSet | Iterable[_IPNetworkAddr | IPRange | int]
|
||||
|
||||
class IPSet:
|
||||
__slots__ = ("_cidrs", "__weakref__")
|
||||
def __init__(self, iterable: _IPIterable | None = None, flags: int = 0) -> None: ...
|
||||
def compact(self) -> None: ...
|
||||
def __hash__(self) -> NoReturn: ...
|
||||
|
||||
@@ -5,11 +5,13 @@ from networkx.utils.backends import _dispatchable
|
||||
__all__ = ["CurrentEdge", "Level", "GlobalRelabelThreshold", "build_residual_network", "detect_unboundedness", "build_flow_dict"]
|
||||
|
||||
class CurrentEdge:
|
||||
__slots__ = ("_edges", "_it", "_curr")
|
||||
def __init__(self, edges) -> None: ...
|
||||
def get(self): ...
|
||||
def move_to_next(self) -> None: ...
|
||||
|
||||
class Level:
|
||||
__slots__ = ("active", "inactive")
|
||||
active: Incomplete
|
||||
inactive: Incomplete
|
||||
|
||||
|
||||
@@ -34,6 +34,26 @@ class ConflictPair:
|
||||
def lowest(self, planarity_state): ...
|
||||
|
||||
class LRPlanarity:
|
||||
__slots__ = [
|
||||
"G",
|
||||
"roots",
|
||||
"height",
|
||||
"lowpt",
|
||||
"lowpt2",
|
||||
"nesting_depth",
|
||||
"parent_edge",
|
||||
"DG",
|
||||
"adjs",
|
||||
"ordered_adjs",
|
||||
"ref",
|
||||
"side",
|
||||
"S",
|
||||
"stack_bottom",
|
||||
"lowpt_edge",
|
||||
"left_ref",
|
||||
"right_ref",
|
||||
"embedding",
|
||||
]
|
||||
G: Incomplete
|
||||
roots: Incomplete
|
||||
height: Incomplete
|
||||
|
||||
@@ -21,6 +21,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
class AtlasView(Mapping[_T, dict[_U, _V]]):
|
||||
__slots__ = ("_atlas",)
|
||||
def __getstate__(self) -> dict[str, Mapping[_T, dict[_U, _V]]]: ...
|
||||
def __setstate__(self, state: dict[str, Mapping[_T, dict[_U, _V]]]) -> None: ...
|
||||
def __init__(self, d: Mapping[_T, dict[_U, _V]]) -> None: ...
|
||||
@@ -29,10 +30,14 @@ class AtlasView(Mapping[_T, dict[_U, _V]]):
|
||||
def __getitem__(self, key: _T) -> dict[_U, _V]: ...
|
||||
def copy(self) -> dict[_T, dict[_U, _V]]: ...
|
||||
|
||||
class AdjacencyView(AtlasView[_T, _U, _V]): ...
|
||||
class MultiAdjacencyView(AdjacencyView[_T, _U, _V]): ...
|
||||
class AdjacencyView(AtlasView[_T, _U, _V]):
|
||||
__slots__ = ()
|
||||
|
||||
class MultiAdjacencyView(AdjacencyView[_T, _U, _V]):
|
||||
__slots__ = ()
|
||||
|
||||
class UnionAtlas(Mapping[_T, dict[_U, _V]]):
|
||||
__slots__ = ("_succ", "_pred")
|
||||
def __init__(self, succ: AtlasView[_T, _U, _V], pred: AtlasView[_T, _U, _V]) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
@@ -40,14 +45,18 @@ class UnionAtlas(Mapping[_T, dict[_U, _V]]):
|
||||
def copy(self) -> Self: ...
|
||||
|
||||
class UnionAdjacency(Mapping[_T, dict[_U, _V]]):
|
||||
__slots__ = ("_succ", "_pred")
|
||||
def __init__(self, succ: AdjacencyView[_T, _U, _V], pred: AdjacencyView[_T, _U, _V]) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
def __getitem__(self, key: _T) -> dict[_U, _V]: ...
|
||||
def copy(self) -> Self: ...
|
||||
|
||||
class UnionMultiInner(UnionAtlas[_T, _U, _V]): ...
|
||||
class UnionMultiAdjacency(UnionAdjacency[_T, _U, _V]): ...
|
||||
class UnionMultiInner(UnionAtlas[_T, _U, _V]):
|
||||
__slots__ = ()
|
||||
|
||||
class UnionMultiAdjacency(UnionAdjacency[_T, _U, _V]):
|
||||
__slots__ = ()
|
||||
|
||||
class FilterAtlas(Mapping[_T, _U]):
|
||||
NODE_OK: Callable[[_T], bool]
|
||||
|
||||
@@ -35,6 +35,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
class NodeView(Mapping[_Node, dict[str, Any]], AbstractSet[_Node]):
|
||||
__slots__ = ("_nodes",)
|
||||
def __init__(self, graph: Graph[_Node]) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_Node]: ...
|
||||
@@ -47,6 +48,7 @@ class NodeView(Mapping[_Node, dict[str, Any]], AbstractSet[_Node]):
|
||||
def data(self, data: bool | str = True, default=None) -> Self: ...
|
||||
|
||||
class NodeDataView(AbstractSet[_Node]):
|
||||
__slots__ = ("_nodes", "_data", "_default")
|
||||
def __init__(self, nodedict: Mapping[str, Incomplete], data: bool | str = False, default=None) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[tuple[_Node, Incomplete]]: ... # type: ignore[override]
|
||||
@@ -73,24 +75,33 @@ class OutMultiDegreeView(DiDegreeView[_Node]): ...
|
||||
class EdgeViewABC(ABC): ...
|
||||
|
||||
class OutEdgeDataView(EdgeViewABC, Generic[_Node, _D]):
|
||||
__slots__ = ("_viewer", "_nbunch", "_data", "_default", "_adjdict", "_nodes_nbrs", "_report")
|
||||
def __init__(self, viewer, nbunch: _NBunch[_Node] = None, data: bool = False, *, default=None) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_D]: ...
|
||||
def __contains__(self, e: _Edge[_Node]) -> bool: ...
|
||||
|
||||
class EdgeDataView(OutEdgeDataView[_Node, _D]): ...
|
||||
class InEdgeDataView(OutEdgeDataView[_Node, _D]): ...
|
||||
class EdgeDataView(OutEdgeDataView[_Node, _D]):
|
||||
__slots__ = ()
|
||||
|
||||
class InEdgeDataView(OutEdgeDataView[_Node, _D]):
|
||||
__slots__ = ()
|
||||
|
||||
class OutMultiEdgeDataView(OutEdgeDataView[_Node, _D]):
|
||||
__slots__ = ("keys",)
|
||||
keys: bool
|
||||
def __init__(
|
||||
self, viewer, nbunch: _NBunch[_Node] = None, data: bool = False, *, default=None, keys: bool = False
|
||||
) -> None: ...
|
||||
|
||||
class MultiEdgeDataView(OutEdgeDataView[_Node, _D]): ...
|
||||
class InMultiEdgeDataView(OutEdgeDataView[_Node, _D]): ...
|
||||
class MultiEdgeDataView(OutEdgeDataView[_Node, _D]):
|
||||
__slots__ = ()
|
||||
|
||||
class InMultiEdgeDataView(OutEdgeDataView[_Node, _D]):
|
||||
__slots__ = ()
|
||||
|
||||
class OutEdgeView(AbstractSet[Incomplete], Mapping[Incomplete, Incomplete], EdgeViewABC, Generic[_Node]):
|
||||
__slots__ = ("_adjdict", "_graph", "_nodes_nbrs")
|
||||
def __init__(self, G: Graph[_Node]) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[tuple[_Node, _Node]]: ...
|
||||
@@ -131,6 +142,7 @@ class OutEdgeView(AbstractSet[Incomplete], Mapping[Incomplete, Incomplete], Edge
|
||||
) -> OutEdgeDataView[_Node, tuple[_Node, _Node, _U]]: ...
|
||||
|
||||
class EdgeView(OutEdgeView[_Node]):
|
||||
__slots__ = ()
|
||||
dataview = EdgeDataView
|
||||
# Have to override parent's overloads with the proper return type based on dataview
|
||||
@overload
|
||||
@@ -167,6 +179,7 @@ class EdgeView(OutEdgeView[_Node]):
|
||||
) -> EdgeDataView[_Node, tuple[_Node, _Node, _U]]: ...
|
||||
|
||||
class InEdgeView(OutEdgeView[_Node]):
|
||||
__slots__ = ()
|
||||
dataview = InEdgeDataView
|
||||
# Have to override parent's overloads with the proper return type based on dataview
|
||||
@overload
|
||||
@@ -203,6 +216,7 @@ class InEdgeView(OutEdgeView[_Node]):
|
||||
) -> InEdgeDataView[_Node, tuple[_Node, _Node, _U]]: ...
|
||||
|
||||
class OutMultiEdgeView(OutEdgeView[_Node]):
|
||||
__slots__ = ()
|
||||
def __iter__(self) -> Iterator[tuple[_Node, _Node, Incomplete]]: ... # type: ignore[override]
|
||||
def __getitem__(self, e: tuple[_Node, _Node, Incomplete]) -> dict[str, Any]: ... # type: ignore[override]
|
||||
dataview = OutMultiEdgeDataView
|
||||
@@ -266,6 +280,7 @@ class OutMultiEdgeView(OutEdgeView[_Node]):
|
||||
) -> OutMultiEdgeDataView[_Node, tuple[_Node, _Node, Incomplete, _U]]: ...
|
||||
|
||||
class MultiEdgeView(OutMultiEdgeView[_Node]):
|
||||
__slots__ = ()
|
||||
dataview = MultiEdgeDataView # type: ignore[assignment]
|
||||
# Have to override parent's overloads with the proper return type based on dataview
|
||||
@overload # type: ignore[override] # Has an additional `keys` keyword argument
|
||||
@@ -328,6 +343,7 @@ class MultiEdgeView(OutMultiEdgeView[_Node]):
|
||||
) -> MultiEdgeDataView[_Node, tuple[_Node, _Node, Incomplete, _U]]: ...
|
||||
|
||||
class InMultiEdgeView(OutMultiEdgeView[_Node]):
|
||||
__slots__ = ()
|
||||
dataview = InMultiEdgeDataView # type: ignore[assignment]
|
||||
# Have to override parent's overloads with the proper return type based on dataview
|
||||
@overload # type: ignore[override]
|
||||
|
||||
@@ -4,6 +4,7 @@ __all__ = ["MinHeap", "PairingHeap", "BinaryHeap"]
|
||||
|
||||
class MinHeap:
|
||||
class _Item:
|
||||
__slots__ = ("key", "value")
|
||||
key: Incomplete
|
||||
value: Incomplete
|
||||
def __init__(self, key, value) -> None: ...
|
||||
@@ -20,6 +21,7 @@ class MinHeap:
|
||||
|
||||
class PairingHeap(MinHeap):
|
||||
class _Node(MinHeap._Item):
|
||||
__slots__ = ("left", "next", "prev", "parent")
|
||||
left: Incomplete
|
||||
next: Incomplete
|
||||
prev: Incomplete
|
||||
|
||||
@@ -4,6 +4,7 @@ from collections.abc import Iterator
|
||||
__all__ = ["MappedQueue"]
|
||||
|
||||
class _HeapElement:
|
||||
__slots__ = ["priority", "element", "_hash"]
|
||||
priority: Incomplete
|
||||
element: Incomplete
|
||||
def __init__(self, priority, element) -> None: ...
|
||||
|
||||
@@ -46,11 +46,13 @@ def signed_token_generator(private_pem: str, **kwargs) -> Callable[[Request], st
|
||||
def get_token_from_header(request: Request) -> str | None: ...
|
||||
|
||||
class TokenBase:
|
||||
__slots__ = ()
|
||||
def __call__(self, request: Request, refresh_token: bool = False) -> None: ...
|
||||
def validate_request(self, request: Request) -> bool: ...
|
||||
def estimate_type(self, request: Request) -> int: ...
|
||||
|
||||
class BearerToken(TokenBase):
|
||||
__slots__ = ("request_validator", "token_generator", "refresh_token_generator", "expires_in")
|
||||
request_validator: RequestValidator | None
|
||||
token_generator: Callable[[Request], str]
|
||||
refresh_token_generator: Callable[[Request], str]
|
||||
|
||||
@@ -6,6 +6,7 @@ from oauthlib.oauth2.rfc6749.tokens import TokenBase as TokenBase
|
||||
from .request_validator import RequestValidator
|
||||
|
||||
class JWTToken(TokenBase):
|
||||
__slots__ = ("request_validator", "token_generator", "refresh_token_generator", "expires_in")
|
||||
request_validator: RequestValidator
|
||||
token_generator: Callable[[Request], str] | Callable[[Request, bool], str]
|
||||
refresh_token_generator: Callable[[Request], str] | Callable[[Request, bool], str]
|
||||
|
||||
@@ -36,6 +36,7 @@ def get_type(t: type, value: object) -> Literal["n", "s", "d", "f"] | None: ...
|
||||
def get_time_format(t: _TimeTypes) -> str: ...
|
||||
|
||||
class Cell(StyleableObject):
|
||||
__slots__ = ("row", "column", "_value", "data_type", "parent", "_hyperlink", "_comment")
|
||||
row: int
|
||||
column: int
|
||||
data_type: str
|
||||
@@ -82,6 +83,7 @@ class Cell(StyleableObject):
|
||||
def comment(self, value: Comment | None) -> None: ...
|
||||
|
||||
class MergedCell(StyleableObject):
|
||||
__slots__ = ("row", "column")
|
||||
data_type: str
|
||||
comment: Comment | None
|
||||
hyperlink: Hyperlink | None
|
||||
|
||||
@@ -12,6 +12,7 @@ from openpyxl.workbook.child import _WorkbookChild
|
||||
from openpyxl.worksheet._read_only import ReadOnlyWorksheet
|
||||
|
||||
class ReadOnlyCell:
|
||||
__slots__ = ("parent", "row", "column", "_value", "data_type", "_style_id")
|
||||
parent: _WorkbookChild | ReadOnlyWorksheet
|
||||
row: Incomplete
|
||||
column: Incomplete
|
||||
@@ -58,6 +59,7 @@ class ReadOnlyCell:
|
||||
def value(self, value: None) -> None: ...
|
||||
|
||||
class EmptyCell:
|
||||
__slots__ = ()
|
||||
value: Incomplete
|
||||
is_date: bool
|
||||
font: Incomplete
|
||||
|
||||
@@ -30,6 +30,7 @@ class Tokenizer:
|
||||
def render(self): ...
|
||||
|
||||
class Token:
|
||||
__slots__ = ["value", "type", "subtype"]
|
||||
LITERAL: Final = "LITERAL"
|
||||
OPERAND: Final = "OPERAND"
|
||||
FUNC: Final = "FUNC"
|
||||
|
||||
@@ -19,6 +19,7 @@ class ArrayDescriptor(Generic[_T]):
|
||||
def __set__(self, instance: MutableSequence[_T], value: _T) -> None: ...
|
||||
|
||||
class StyleArray(array[int]):
|
||||
__slots__ = ()
|
||||
tagname: ClassVar[str]
|
||||
fontId: ArrayDescriptor[int]
|
||||
fillId: ArrayDescriptor[int]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from typing_extensions import deprecated
|
||||
|
||||
class StyleProxy:
|
||||
__slots__ = "__target"
|
||||
def __init__(self, target) -> None: ...
|
||||
def __getattr__(self, attr: str): ...
|
||||
def __setattr__(self, attr: str, value) -> None: ...
|
||||
|
||||
@@ -34,6 +34,7 @@ class StyleArrayDescriptor:
|
||||
def __get__(self, instance: StyleableObject, cls: Unused) -> bool: ...
|
||||
|
||||
class StyleableObject:
|
||||
__slots__ = ("parent", "_style")
|
||||
font: StyleDescriptor
|
||||
fill: StyleDescriptor
|
||||
border: StyleDescriptor
|
||||
|
||||
@@ -175,6 +175,7 @@ class Transport(Thread, ClosingContextManager):
|
||||
def run(self) -> None: ...
|
||||
|
||||
class SecurityOptions:
|
||||
__slots__ = "_transport"
|
||||
def __init__(self, transport: Transport) -> None: ...
|
||||
@property
|
||||
def ciphers(self) -> Sequence[str]: ...
|
||||
|
||||
@@ -21,6 +21,7 @@ def expression(callable: _CALLABLE_TYPE, rule_name: str, grammar: Grammar) -> Ex
|
||||
IN_PROGRESS: object
|
||||
|
||||
class Expression(StrAndRepr):
|
||||
__slots__ = ["name", "identity_tuple"]
|
||||
name: str
|
||||
identity_tuple: tuple[str]
|
||||
def __init__(self, name: str = "") -> None: ...
|
||||
@@ -31,6 +32,7 @@ class Expression(StrAndRepr):
|
||||
def as_rule(self) -> str: ...
|
||||
|
||||
class Literal(Expression):
|
||||
__slots__ = ["literal"]
|
||||
literal: str
|
||||
identity_tuple: tuple[str, str] # type: ignore[assignment]
|
||||
def __init__(self, literal: str, name: str = "") -> None: ...
|
||||
@@ -38,6 +40,7 @@ class Literal(Expression):
|
||||
class TokenMatcher(Literal): ...
|
||||
|
||||
class Regex(Expression):
|
||||
__slots__ = ["re"]
|
||||
re: Pattern[str]
|
||||
identity_tuple: tuple[str, Pattern[str]] # type: ignore[assignment]
|
||||
def __init__(
|
||||
@@ -54,6 +57,7 @@ class Regex(Expression):
|
||||
) -> None: ...
|
||||
|
||||
class Compound(Expression):
|
||||
__slots__ = ["members"]
|
||||
members: collections.abc.Sequence[Expression]
|
||||
def __init__(self, *members: Expression, **kwargs: Any) -> None: ...
|
||||
|
||||
@@ -61,12 +65,14 @@ class Sequence(Compound): ...
|
||||
class OneOf(Compound): ...
|
||||
|
||||
class Lookahead(Compound):
|
||||
__slots__ = ["negativity"]
|
||||
negativity: bool
|
||||
def __init__(self, member: Expression, *, negative: bool = False, **kwargs: Any) -> None: ...
|
||||
|
||||
def Not(term: Expression) -> Lookahead: ...
|
||||
|
||||
class Quantifier(Compound):
|
||||
__slots__ = ["min", "max"]
|
||||
min: int
|
||||
max: float
|
||||
def __init__(self, member: Expression, *, min: int = 0, max: float = ..., name: str = "", **kwargs: Any) -> None: ...
|
||||
|
||||
@@ -8,6 +8,7 @@ from parsimonious.expressions import Expression
|
||||
from parsimonious.grammar import Grammar
|
||||
|
||||
class Node:
|
||||
__slots__ = ["expr", "full_text", "start", "end", "children"]
|
||||
expr: Expression
|
||||
full_text: str
|
||||
start: int
|
||||
@@ -25,6 +26,7 @@ class Node:
|
||||
def __repr__(self, top_level: bool = True) -> str: ...
|
||||
|
||||
class RegexNode(Node):
|
||||
__slots__ = ["match"]
|
||||
match: Match[str]
|
||||
|
||||
class RuleDecoratorMeta(type): ...
|
||||
|
||||
@@ -6,5 +6,6 @@ class StrAndRepr: ...
|
||||
def evaluate_string(string: str | ast.AST) -> Any: ...
|
||||
|
||||
class Token(StrAndRepr):
|
||||
__slots__ = ["type"]
|
||||
type: str
|
||||
def __init__(self, type: str) -> None: ...
|
||||
|
||||
@@ -13,6 +13,7 @@ from ..spec import BasicProperties
|
||||
LOGGER: Logger
|
||||
|
||||
class _CallbackResult:
|
||||
__slots__ = ("_value_class", "_ready", "_values")
|
||||
def __init__(self, value_class=None) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
@@ -37,11 +38,13 @@ class _IoloopTimerContext:
|
||||
def is_ready(self): ...
|
||||
|
||||
class _TimerEvt:
|
||||
__slots__ = ("timer_id", "_callback")
|
||||
timer_id: Incomplete
|
||||
def __init__(self, callback) -> None: ...
|
||||
def dispatch(self) -> None: ...
|
||||
|
||||
class _ConnectionBlockedUnblockedEvtBase:
|
||||
__slots__ = ("_callback", "_method_frame")
|
||||
def __init__(self, callback, method_frame) -> None: ...
|
||||
def dispatch(self) -> None: ...
|
||||
|
||||
@@ -91,18 +94,21 @@ class BlockingConnection:
|
||||
class _ChannelPendingEvt: ...
|
||||
|
||||
class _ConsumerDeliveryEvt(_ChannelPendingEvt):
|
||||
__slots__ = ("method", "properties", "body")
|
||||
method: Incomplete
|
||||
properties: Incomplete
|
||||
body: Incomplete
|
||||
def __init__(self, method, properties, body) -> None: ...
|
||||
|
||||
class _ConsumerCancellationEvt(_ChannelPendingEvt):
|
||||
__slots__ = ("method_frame",)
|
||||
method_frame: Incomplete
|
||||
def __init__(self, method_frame) -> None: ...
|
||||
@property
|
||||
def method(self): ...
|
||||
|
||||
class _ReturnedMessageEvt(_ChannelPendingEvt):
|
||||
__slots__ = ("callback", "channel", "method", "properties", "body")
|
||||
callback: Incomplete
|
||||
channel: Incomplete
|
||||
method: Incomplete
|
||||
@@ -112,12 +118,14 @@ class _ReturnedMessageEvt(_ChannelPendingEvt):
|
||||
def dispatch(self) -> None: ...
|
||||
|
||||
class ReturnedMessage:
|
||||
__slots__ = ("method", "properties", "body")
|
||||
method: Incomplete
|
||||
properties: Incomplete
|
||||
body: Incomplete
|
||||
def __init__(self, method, properties, body) -> None: ...
|
||||
|
||||
class _ConsumerInfo:
|
||||
__slots__ = ("consumer_tag", "auto_ack", "on_message_callback", "alternate_event_sink", "state")
|
||||
SETTING_UP: int
|
||||
ACTIVE: int
|
||||
TEARING_DOWN: int
|
||||
@@ -138,6 +146,7 @@ class _ConsumerInfo:
|
||||
def cancelled_by_broker(self): ...
|
||||
|
||||
class _QueueConsumerGeneratorInfo:
|
||||
__slots__ = ("params", "consumer_tag", "pending_events")
|
||||
params: Incomplete
|
||||
consumer_tag: Incomplete
|
||||
pending_events: Incomplete
|
||||
|
||||
@@ -49,6 +49,7 @@ class _GeventIOLoopIOHandle(AbstractIOReference):
|
||||
def cancel(self): ...
|
||||
|
||||
class _GeventAddressResolver:
|
||||
__slots__ = ("_loop", "_on_done", "_greenlet", "_ga_host", "_ga_port", "_ga_family", "_ga_socktype", "_ga_proto", "_ga_flags")
|
||||
def __init__(self, native_loop, host, port, family, socktype, proto, flags, on_done) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def cancel(self): ...
|
||||
|
||||
@@ -23,6 +23,7 @@ class SelectConnection(BaseConnection):
|
||||
def create_connection(cls, connection_configs, on_done, custom_ioloop=None, workflow=None): ...
|
||||
|
||||
class _Timeout:
|
||||
__slots__ = ("deadline", "callback")
|
||||
deadline: Incomplete
|
||||
callback: Incomplete
|
||||
def __init__(self, deadline, callback) -> None: ...
|
||||
|
||||
@@ -55,6 +55,7 @@ class SelectorIOServicesAdapter(
|
||||
def remove_writer(self, fd): ...
|
||||
|
||||
class _FileDescriptorCallbacks:
|
||||
__slots__ = ("reader", "writer")
|
||||
reader: Incomplete
|
||||
writer: Incomplete
|
||||
def __init__(self, reader=None, writer=None) -> None: ...
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user