diff --git a/packages/vipeye-internal/src/analyzer/checker.ts b/packages/vipeye-internal/src/analyzer/checker.ts index 8d47701f..4cb4a0a0 100644 --- a/packages/vipeye-internal/src/analyzer/checker.ts +++ b/packages/vipeye-internal/src/analyzer/checker.ts @@ -711,25 +711,6 @@ export class Checker extends ParseTreeWalker { } } - // If we're at the module level within a stub file, report a diagnostic - // if there is a '__getattr__' function defined when in strict mode. - // This signifies an incomplete stub file that obscures type errors. - // Viper has no module-level __getattr__ semantics, so skip this check. - if ( - !IsViperDialect(this._fileInfo.executionEnvironment.dialect) && - this._fileInfo.isStubFile && - node.d.name.d.value === '__getattr__' - ) { - const scope = getScopeForNode(node); - if (scope?.type === ScopeType.Module) { - this._evaluator.addDiagnostic( - DiagnosticRule.reportIncompleteStub, - LocMessage.stubUsesGetAttr(), - node.d.name - ); - } - } - this._scopedNodes.push(node); if ( @@ -1559,22 +1540,9 @@ export class Checker extends ParseTreeWalker { this._evaluator.evaluateTypesForStatement(node); const importInfo = AnalyzerNodeInfo.getImportInfo(node.d.module); - if ( - importInfo && - importInfo.isImportFound && - importInfo.importType !== ImportType.Local && - !this._fileInfo.isStubFile && - // Viper 模式:`from stdint import *` 是常见用法(导入 C 类型别名), - // 不报告 wildcard import 警告 - !IsViperDialect(this._fileInfo.executionEnvironment.dialect) - ) { - this._evaluator.addDiagnosticForTextRange( - this._fileInfo, - DiagnosticRule.reportWildcardImportFromLibrary, - LocMessage.wildcardLibraryImport(), - node.d.wildcardToken || node - ); - } + // Viper 模式:`from stdint import *` 是常见用法(导入 C 类型别名), + // 不报告 wildcard import 警告。 + void importInfo; } return true; @@ -4989,20 +4957,9 @@ export class Checker extends ParseTreeWalker { // Enum members should not have type annotations. // Viper 扩展:CEnum 子类允许类型注解成员(如 FR_OK: t.State = 0), - // 跳过此错误报告。 + // 不报告类型注解错误。 const typedDecls = symbol.getTypedDeclarations(); if (typedDecls.length > 0) { - if ( - !IsViperDialect(this._fileInfo.executionEnvironment.dialect) && - typedDecls[0].type === DeclarationType.Variable && - typedDecls[0].inferredTypeSource - ) { - this._evaluator.addDiagnostic( - DiagnosticRule.reportGeneralTypeIssues, - LocMessage.enumMemberTypeAnnotation(), - typedDecls[0].node - ); - } return; } @@ -5024,7 +4981,7 @@ export class Checker extends ParseTreeWalker { // Look for an enum attribute annotated with "Final". // Viper 扩展:CEnum 子类允许类型注解成员,跳过 Final 注解错误。 - if (decls[0].isFinal && !IsViperDialect(this._fileInfo.executionEnvironment.dialect)) { + if (decls[0].isFinal) { this._evaluator.addDiagnostic( DiagnosticRule.reportGeneralTypeIssues, LocMessage.enumMemberTypeAnnotation(), diff --git a/packages/vipeye-internal/src/analyzer/constructors.ts b/packages/vipeye-internal/src/analyzer/constructors.ts index 5a2106f4..8a8ce254 100644 --- a/packages/vipeye-internal/src/analyzer/constructors.ts +++ b/packages/vipeye-internal/src/analyzer/constructors.ts @@ -55,6 +55,7 @@ import { getTypeVarArgsRecursive, getTypeVarScopeId, getTypeVarScopeIds, + isNoneInstance, isTupleClass, lookUpClassMember, mapSubtypes, @@ -284,10 +285,21 @@ function validateNewAndInitMethods( newMethodReturnType = newCallResult.returnType; } - if (!newMethodReturnType || isDefaultNewMethod(newMethodTypeResult?.type)) { + if ( + !newMethodReturnType || + isNoneInstance(newMethodReturnType) || + isDefaultNewMethod(newMethodTypeResult?.type) + ) { // If there is no __new__ method or it uses a default signature, // (cls, *args, **kwargs) -> Self, allow the __init__ method to // determine the specialized type of the class. + // + // Viper 扩展:Viper 中类的 `__new__` 无返回注解时(如 `_list.vp` 的 + // `def __new__(self, pool, elem_size=0)` 返回 `pool.alloc(...)` 裸指针), + // typeEvaluator 会把返回类型推断为 None。但 Viper 是 C++ 式语义, + // 构造调用 `list[str](pool)` 必须返回类实例(list[str])而非 None。 + // 因此 __new__ 返回 None 时同样回退到类实例类型,保证 + // `result = list[str](self.__mbuddy__)` 后 `result.append(...)` 可用。 newMethodReturnType = ClassType.cloneAsInstance(type); } else if (isUnknown(newMethodReturnType) || (newMethodTypeResult && isAny(newMethodTypeResult.type))) { // If the __new__ method returns Unknown, we'll ignore its return diff --git a/packages/vipeye-internal/src/analyzer/importResolver.ts b/packages/vipeye-internal/src/analyzer/importResolver.ts index a0ea9c69..82424603 100644 --- a/packages/vipeye-internal/src/analyzer/importResolver.ts +++ b/packages/vipeye-internal/src/analyzer/importResolver.ts @@ -10,7 +10,7 @@ import { appendArray, flatten, getMapValues, getOrAdd } from '../common/collectionUtils'; import { ConfigOptions, ExecutionEnvironment, matchFileSpecs } from '../common/configOptions'; -import { IsPythonDialect, IsViperDialect } from '../common/dialect'; +import { IsViperDialect } from '../common/dialect'; import { Host } from '../common/host'; import { stubsSuffix } from '../common/pathConsts'; import { getFileExtension, stripFileExtension } from '../common/pathUtils'; @@ -1498,46 +1498,6 @@ export class ImportResolver { ) { isNativeLib = true; importLogger?.log(`Did not find file '${pyiFilePath}' or '${pyFilePath}'`); - } else if ( - !allowPyi && - allowNativeLib && - isLastPart && - IsPythonDialect(execEnv.dialect) && - this.fileExistsCached(dirPath.addExtension('.pyc')) - ) { - // Sourceless distribution: a compiled `.pyc` module sits where the `.py` - // source would be (e.g. `mod.pyc` beside `mod.pyi`, with no `mod.py`) -- placed - // directly in the package directory, not under `__pycache__`. Python imports - // such a `.pyc` directly, so the module exists at runtime even though it has no - // Python source. - // - // Viper 模式短路:Viper 无 `.pyc` 字节码缓存(AOT 编译型语言), - // 通过 `IsPythonDialect(execEnv.dialect)` 跳过此分支。 - // - // This branch only runs during the non-stub resolution (`allowPyi === false`), - // whose result becomes `nonStubImportResult`. Pushing the `.pyc` onto - // `resolvedPaths` makes that non-stub result report `isImportFound === true`, - // and the checker's `_addMissingModuleSourceDiagnosticIfNeeded` short-circuits - // on `nonStubImportResult.isImportFound` -- so the misleading - // `reportMissingModuleSource` warning is suppressed via the `isImportFound` - // path (not via `isNativeLib`, whose check the checker never reaches once - // `isImportFound` is true). - // - // Gating mirrors the native-lib branch above: a compiled module is a native - // artifact with no Python source, so it is only recognized where native libs are - // allowed (`allowNativeLib`), ensuring a stray `.pyc` in a stub-only root is not - // mistaken for the real module. `isNativeLib = true` is set purely for symmetry - // with that branch; it does not drive the suppression here. The `.pyc` is - // likewise kept out of `getSourceFilesFromStub` by that method's `.py`/`.pyi` - // extension filter, independent of `isNativeLib`. - // - // The `.pyc` Uri is built inside this branch's guard (rather than unconditionally - // alongside `pyFilePath`/`pyiFilePath`) so the allocation only happens for the - // rare last-part library imports that fall through to here. - const pycFilePath = dirPath.addExtension('.pyc'); - importLogger?.log(`Resolved import with compiled file '${pycFilePath}'`); - resolvedPaths.push(pycFilePath); - isNativeLib = true; } else if (foundDirectory) { if (!isLastPart) { // We are not at the last part, and we found a directory, diff --git a/packages/vipeye-internal/src/analyzer/operations.ts b/packages/vipeye-internal/src/analyzer/operations.ts index 9bb1887d..45a5b2a9 100644 --- a/packages/vipeye-internal/src/analyzer/operations.ts +++ b/packages/vipeye-internal/src/analyzer/operations.ts @@ -396,13 +396,9 @@ export function getTypeOfBinaryOperation( if ((flags & EvalFlags.TypeExpression) !== 0) { // Exempt "|" because it might be a union operation involving unknowns. - // Viper 扩展:Viper 是 AOT 静态语言,类型表达式中的算术/位运算用于编译时常量 - // (如 t.CArray[T, MAX_ORDER + 1] 的数组长度),放行不报 binaryOperationNotAllowed, - // 让其继续按常量表达式求值。 - if ( - node.d.operator !== OperatorType.BitwiseOr && - !IsViperDialect(getFileInfo(node).executionEnvironment.dialect) - ) { + // Viper 是 AOT 静态语言,类型表达式中的算术/位运算用于编译时常量 + // (如 t.CArray[T, MAX_ORDER + 1] 的数组长度),放行不报 binaryOperationNotAllowed。 + if (node.d.operator !== OperatorType.BitwiseOr) { evaluator.addDiagnostic(DiagnosticRule.reportInvalidTypeForm, LocMessage.binaryOperationNotAllowed(), node); return { type: UnknownType.create() }; } @@ -579,6 +575,20 @@ export function getTypeOfAugmentedAssignment( } } + // Viper 扩展:str/bytes 指针增强赋值(C 指针算术)。 + // Viper 中 str/bytes 是 i8* 指针,`dest += 1`(指针递增)是合法的 + // C 指针算术,结果类型保持 str/bytes。Python 中 str 不可变故无此语义。 + // 仅当运算符为 + 且右操作数是整数时生效。 + if (IsViperDialect(getFileInfo(node).executionEnvironment.dialect)) { + const leftIsStrBytes = isClassInstance(leftSubtypeUnexpanded) && + ClassType.isBuiltIn(leftSubtypeUnexpanded, ['str', 'bytes']); + const rightIsInt = isClassInstance(rightSubtypeUnexpanded) && + ClassType.isBuiltIn(rightSubtypeUnexpanded, 'int'); + if (leftIsStrBytes && rightIsInt) { + return leftSubtypeUnexpanded; + } + } + let returnTypeResult = evaluator.getTypeOfMagicMethodCall( leftSubtypeUnexpanded, magicMethodName, @@ -929,43 +939,9 @@ function createUnionType( newUnion = TypeBase.cloneWithTypeForm(newUnion, newTypeForm); } - // Check for "stringified" forward reference type expressions. The "|" operator - // doesn't support these except in certain circumstances. Notably, it can't be used - // with other strings or with types that are not specialized using an index form. - // Viper 扩展:跳过此检查。Viper 中 `'ClassName' | t.CPtr` 是合法的 TypeSet 语法, + // Viper 扩展:跳过 stringified forward reference 检查。 + // Viper 中 `'ClassName' | t.CPtr` 是合法的 TypeSet 语法, // 表示"指向 ClassName 的指针"(前向引用字符串 + CPtr 组合)。 - if (!fileInfo.isStubFile && !IsViperDialect(fileInfo.executionEnvironment.dialect)) { - let stringNode: ExpressionNode | undefined; - let otherNode: ExpressionNode | undefined; - let otherType: Type | undefined; - - if (leftExpression.nodeType === ParseNodeType.StringList) { - stringNode = leftExpression; - otherNode = rightExpression; - otherType = rightTypeResult.type; - } else if (rightExpression.nodeType === ParseNodeType.StringList) { - stringNode = rightExpression; - otherNode = leftExpression; - otherType = leftTypeResult.type; - } - - if (stringNode && otherNode && otherType) { - let isAllowed = true; - if (isClass(otherType)) { - if (!otherType.priv.isTypeArgExplicit || isClassInstance(otherType)) { - isAllowed = false; - } - } - - if (!isAllowed) { - evaluator.addDiagnostic( - DiagnosticRule.reportGeneralTypeIssues, - LocMessage.unionForwardReferenceNotAllowed(), - stringNode - ); - } - } - } return { type: newUnion }; } @@ -1419,6 +1395,35 @@ function validateArithmeticOperation( } } + // Viper 扩展:str/bytes 指针算术(C 指针算术)。 + // Viper 中 str/bytes 是 i8* 指针: + // - `ptr + n`(指针偏移):一方是 str/bytes、另一方是 int → 结果保持 str/bytes + // - `ptr - ptr`(指针差):双方都是 str/bytes → 结果为 t.CSizeT(ptrdiff_t) + // - `ptr - n`(指针回退):str/bytes - int → 结果保持 str/bytes + if (isViperDialect && (operator === OperatorType.Add || operator === OperatorType.Subtract)) { + const leftIsStrBytes = isClassInstance(leftSubtypeExpanded) && + ClassType.isBuiltIn(leftSubtypeExpanded, ['str', 'bytes']); + const rightIsStrBytes = isClassInstance(rightSubtypeExpanded) && + ClassType.isBuiltIn(rightSubtypeExpanded, ['str', 'bytes']); + const leftIsInt = isClassInstance(leftSubtypeExpanded) && + ClassType.isBuiltIn(leftSubtypeExpanded, 'int'); + const rightIsInt = isClassInstance(rightSubtypeExpanded) && + ClassType.isBuiltIn(rightSubtypeExpanded, 'int'); + if (operator === OperatorType.Add) { + if ((leftIsStrBytes && rightIsInt) || (leftIsInt && rightIsStrBytes)) { + // 返回指针类型(str/bytes) + return leftIsStrBytes ? leftSubtypeExpanded : rightSubtypeExpanded; + } + } else if (leftIsStrBytes && rightIsStrBytes) { + // 指针差:str - str → int(t.CSizeT 的底层类型,元素数量) + // t.CSizeT 是 CType 子类,赋值给 t.CSizeT 声明时通过隐式转换兼容。 + return evaluator.getBuiltInObject(errorNode, 'int'); + } else if (leftIsStrBytes && rightIsInt) { + // 指针回退:str - n → str + return leftSubtypeExpanded; + } + } + // Viper 扩展:整数除法返回 int(C 语义)。 // Python 中 / (.__truediv__) 对两个 int 返回 float, // 但 C 语言中整数 / 整数 返回整数(截断除法)。 diff --git a/packages/vipeye-internal/src/analyzer/parseTreeUtils.ts b/packages/vipeye-internal/src/analyzer/parseTreeUtils.ts index c39a7a2b..a5e76556 100644 --- a/packages/vipeye-internal/src/analyzer/parseTreeUtils.ts +++ b/packages/vipeye-internal/src/analyzer/parseTreeUtils.ts @@ -855,7 +855,7 @@ export function getEvaluationNodeForAssignmentExpression( function isInClassMemberTypeAnnotation(node: ParseNode): boolean { let curNode: ParseNode | undefined = node; while (curNode) { - const parent = curNode.parent; + const parent: ParseNode | undefined = curNode.parent; if ( parent?.nodeType === ParseNodeType.TypeAnnotation && parent.d.annotation === curNode @@ -895,7 +895,7 @@ function isInClassMethodSignatureAnnotation(node: ParseNode): boolean { // Walk up to find whether the node lives within a parameter annotation or // a function return annotation. while (curNode) { - const parent = curNode.parent; + const parent: ParseNode | undefined = curNode.parent; if (parent?.nodeType === ParseNodeType.Parameter && parent.d.annotation === curNode) { // Parameter annotation: the enclosing function is the parameter's parent. funcNode = parent.parent ?? undefined; diff --git a/packages/vipeye-internal/src/analyzer/typeEvaluator.ts b/packages/vipeye-internal/src/analyzer/typeEvaluator.ts index 49f806bc..a0b2ff65 100644 --- a/packages/vipeye-internal/src/analyzer/typeEvaluator.ts +++ b/packages/vipeye-internal/src/analyzer/typeEvaluator.ts @@ -3266,9 +3266,14 @@ export function createTypeEvaluator( } return UnknownType.create(isIncomplete); } - // Viper 扩展:str 类型迭代返回 int(CChar)。 - // Viper 语义:str = bytes | CPtr(const char*),迭代返回单个字符 CChar = int。 - if (ClassType.isBuiltIn(subtype, 'str')) { + // Viper 扩展:str/bytes 类型迭代返回 t.CChar(字符)。 + // Viper 语义:str/bytes = i8* 指针(const char*),迭代返回单个字符 CChar。 + // 使用 getViperCCharType 而非裸 int,保持与 s[i] 下标访问一致(t.CChar 显示)。 + if (ClassType.isBuiltIn(subtype, ['str', 'bytes'])) { + const ccharType = getViperCCharType(errorNode); + if (ccharType) { + return ccharType; + } return getBuiltInObject(errorNode, 'int'); } // 检查联合类型中是否包含 CPtr @@ -5093,6 +5098,41 @@ export function createTypeEvaluator( // scope, there's no need to use code flow analysis. if (symbolWithScope.scope.type === ScopeType.Builtin) { useCodeFlowAnalysis = false; + + // Viper 扩展:模拟编译器的自动 import 机制。 + // Viper 编译器的 Phase2 会自动检测 list/dict 容器的使用并注入 + // `import _list` / `import _dict`(见 TransPyC Phase2Translator._inject_auto_imports), + // 因此用户源码无需手写 import。 + // LSP 若不模拟此机制,裸名 list/dict 会解析到 Python builtins 的 + // `list.__init__(iterable: Iterable[_T])`,把内存分配器实参(如 + // memhub.MemBuddy)当作可迭代对象检查而误报。 + // 这里在解析到 builtin 的 list/dict 时,尝试用 includes 中的 + // _list.vp / _dict.vp 真实定义替换(容器构造签名是 + // `__init__(self, pool: memhub.MemManager | t.CPtr, ...)`)。 + const viperBuiltinModule = + IsViperDialect(fileInfo.executionEnvironment.dialect) && + (name === 'list' || name === 'dict') + ? (name === 'list' ? '_list' : '_dict') + : undefined; + if (viperBuiltinModule) { + const lookupResult = importLookup({ + nameParts: [viperBuiltinModule], + importingFileUri: fileInfo.fileUri, + }); + if (lookupResult) { + const containerSymbol = lookupResult.symbolTable.get(name); + if (containerSymbol) { + symbolWithScope = { + symbol: containerSymbol, + isOutsideCallerModule: false, + isBeyondExecutionScope: false, + usesNonlocalBinding: false, + usesGlobalBinding: false, + scope: symbolWithScope.scope, + }; + } + } + } } symbol = symbolWithScope.symbol; @@ -5281,14 +5321,6 @@ export function createTypeEvaluator( // Viper 是 AOT 语言,结构体/函数不在乎定义顺序(类似 C 语言的前向声明)。 // 当符号未找到时(可能在更后方定义),不报 undefinedVariable 错误, // 而是返回 UnknownType,允许后续定义的符号被引用。 - if (!IsViperDialect(fileInfo.executionEnvironment.dialect)) { - addDiagnostic( - DiagnosticRule.reportUndefinedVariable, - LocMessage.symbolIsUndefined().format({ name }), - node - ); - } - type = UnknownType.create(); } } @@ -6412,30 +6444,7 @@ export function createTypeEvaluator( ); } } else { - // Does the module export a top-level __getattr__ function? - // Viper has no module-level __getattr__ (PEP 562) semantics, - // so skip this dynamic attribute resolution entirely. - if (usage.method === 'get' && !IsViperDialect(fileInfo.executionEnvironment.dialect)) { - const getAttrSymbol = ModuleType.getField(baseType, '__getattr__'); - if (getAttrSymbol) { - const isModuleGetAttrSupported = - PythonVersion.isGreaterOrEqualTo( - fileInfo.executionEnvironment.pythonVersion, - pythonVersion3_7 - ) || getAttrSymbol.getDeclarations().some((decl) => decl.uri.hasExtension('.vpi')); - - if (isModuleGetAttrSupported) { - const getAttrTypeResult = getEffectiveTypeOfSymbolForUsage(getAttrSymbol); - if (isFunction(getAttrTypeResult.type)) { - const returnTypeResult = getEffectiveReturnTypeResult(getAttrTypeResult.type); - type = returnTypeResult.type; - if (getAttrTypeResult.isIncomplete || returnTypeResult.isIncomplete) { - isIncomplete = true; - } - } - } - } - } + // Viper 扩展:模块级 __getattr__(PEP 562)语义不存在,跳过动态属性解析。 // If the field was not found and the module type is marked // such that all fields should be Any/Unknown, return that type. @@ -7504,46 +7513,7 @@ export function createTypeEvaluator( } } - // Check for builtin classes that will generate runtime exceptions if subscripted. - if ((flags & EvalFlags.ForwardRefs) === 0) { - // We can skip this check if the class is used within a PEP 526 variable - // type annotation within a class or function. For some undocumented reason, - // they don't result in runtime exceptions when used in this manner. - let skipSubscriptCheck = (flags & EvalFlags.VarTypeAnnotation) !== 0; - if (skipSubscriptCheck) { - const scopeNode = ParseTreeUtils.getExecutionScopeNode(node); - if (scopeNode?.nodeType === ParseNodeType.Module) { - skipSubscriptCheck = false; - } - } - - if (!skipSubscriptCheck) { - const fileInfo = AnalyzerNodeInfo.getFileInfo(node); - // Viper is an AOT static language with no PEP 585 subscript - // restrictions, so skip the runtime-subscriptable check. - if ( - !IsViperDialect(fileInfo.executionEnvironment.dialect) && - isInstantiableClass(baseTypeResult.type) && - ClassType.isBuiltIn(baseTypeResult.type) && - !baseTypeResult.type.priv.aliasName - ) { - const minPythonVersion = nonSubscriptableBuiltinTypes.get(baseTypeResult.type.shared.fullName); - if ( - minPythonVersion !== undefined && - PythonVersion.isLessThan(fileInfo.executionEnvironment.pythonVersion, minPythonVersion) && - !fileInfo.isStubFile - ) { - addDiagnostic( - DiagnosticRule.reportIndexIssue, - LocMessage.classNotRuntimeSubscriptable().format({ - name: baseTypeResult.type.priv.aliasName || baseTypeResult.type.shared.name, - }), - node.d.leftExpr - ); - } - } - } - } + // Viper 扩展:AOT 静态语言无 PEP 585 运行时 subscript 限制,跳过检查。 const indexTypeResult = getTypeOfIndexWithBaseType(node, baseTypeResult, { method: 'get' }, flags); @@ -8415,13 +8385,12 @@ export function createTypeEvaluator( return concreteSubtype; } // Viper 扩展:str/bytes 表示 C 字符串指针(i8* / i8*)。 - // 即使不是 TypeSet 联合(纯 str/bytes 注解),下标赋值 a[i] = v 也是 - // 合法的指针写字节操作(C 语义),不应报 __setitem__ 不存在。 - // 下标读取 a[i] 复用 str 的 __getitem__(返回 int/CChar)。 + // 无论读写,下标访问 a[i] 都是指针解引用操作(C 语义): + // - 读取 a[i] 返回 t.CChar(i8 字节),而非 Python str.__getitem__ 的 str + // - 赋值 a[i] = v 是合法的指针写字节操作,不报 __setitem__ 不存在 if ( IsViperDialect(viperIndexFileInfo.executionEnvironment.dialect) && - ClassType.isBuiltIn(concreteSubtype, ['str', 'bytes']) && - usage.method !== 'get' + ClassType.isBuiltIn(concreteSubtype, ['str', 'bytes']) ) { // 构造带 CChar 别名信息的 int 类型作为下标访问的目标类型 const ccharType = getViperCCharType(node); @@ -8615,10 +8584,10 @@ export function createTypeEvaluator( } // Viper 扩展:构造带 t.CChar 类型别名信息的 int 类型(表示 C 的 char 类型)。 - // Viper 中 str/bytes 是 i8* 指针,下标访问返回 t.CChar(int 别名)。 + // Viper 中 str/bytes 是 i8* 指针,下标访问/迭代/字符运算返回 t.CChar(int 别名)。 // 优先从 t 模块查找 CChar 类型别名以保留显示信息;找不到时回退为 // 构造带 typeAliasInfo 的 int 类型。查找失败返回 undefined。 - function getViperCCharType(node: IndexNode): Type | undefined { + function getViperCCharType(node: ExpressionNode): Type | undefined { const tSymbolWithScope = lookUpSymbolRecursive(node, 't', /* honorCodeFlow */ true); if (tSymbolWithScope) { const tEffectiveType = getEffectiveTypeOfSymbolForUsage( @@ -13719,13 +13688,34 @@ export function createTypeEvaluator( } if (expectedType && requiresSpecialization(expectedType)) { + // Viper 扩展:str/bytes 实参传给可迭代协议参数(Iterable[_T]/Iterator[_T] 等) + // 时,泛型参数 _T 应从 str.__iter__ 的声明返回类型(Iterator[str])推断。 + // 但 Viper 中 str 是 i8* 指针,迭代元素应为 t.CChar 而非 str。 + // 因此将 argType 替换为 Iterator[CChar] 实例,使协议匹配把 _T 绑定为 CChar, + // 修复 `for i, ch in enumerate(src)` 中 ch 被推断为 str 的问题 + // (同样覆盖 zip/map/filter/reversed/sorted/list() 等 Iterable 参数场景)。 + let argTypeForConstraint = argType; + if ( + IsViperDialect(AnalyzerNodeInfo.getFileInfo(argParam.errorNode).executionEnvironment.dialect) && + isClassInstance(argType) && + ClassType.isBuiltIn(argType, ['str', 'bytes']) + ) { + const ccharType = getViperCCharType(argParam.errorNode); + const iteratorClass = getTypingType(argParam.errorNode, 'Iterator'); + if (ccharType && iteratorClass && isInstantiableClass(iteratorClass)) { + argTypeForConstraint = ClassType.cloneAsInstance( + ClassType.specialize(iteratorClass, [ccharType]) + ); + } + } + // Assign the argument type back to the expected type to assign // values to any unification variables. const clonedConstraints = constraints.clone(); if ( assignType( expectedType, - argType, + argTypeForConstraint, /* diag */ undefined, clonedConstraints, options?.isArgFirstPass ? AssignTypeFlags.ArgAssignmentFirstPass : AssignTypeFlags.Default @@ -21300,26 +21290,7 @@ export function createTypeEvaluator( if (importLookupInfo) { reportError = true; - // Handle PEP 562 support for module-level __getattr__ function, - // introduced in Python 3.7. - // Viper has no module-level __getattr__ semantics; skip it. - if ( - !IsViperDialect(fileInfo.executionEnvironment.dialect) && - (PythonVersion.isGreaterOrEqualTo( - fileInfo.executionEnvironment.pythonVersion, - pythonVersion3_7 - ) || - fileInfo.isStubFile) - ) { - const getAttrSymbol = importLookupInfo.symbolTable.get('__getattr__'); - if (getAttrSymbol) { - const getAttrType = getEffectiveTypeOfSymbol(getAttrSymbol); - if (isFunction(getAttrType)) { - symbolType = getEffectiveReturnType(getAttrType); - reportError = false; - } - } - } + // Viper 扩展:模块级 __getattr__(PEP 562)语义不存在,跳过动态符号解析。 } else if (resolvedPath.isEmpty()) { // This corresponds to the "from . import a" form. reportError = true; diff --git a/packages/vipeye-internal/src/common/dialect.ts b/packages/vipeye-internal/src/common/dialect.ts index 073b9af3..fc95b2ed 100644 --- a/packages/vipeye-internal/src/common/dialect.ts +++ b/packages/vipeye-internal/src/common/dialect.ts @@ -1,32 +1,26 @@ /* * dialect.ts - * 语言方言开关:区分 Python 与 Viper 语义。 + * 语言方言:Vipeye 已转型为 Viper 专属 LSP 客户端,仅支持 Viper 方言。 * - * Viper 是基于 CPython 语法但语义不同的 AOT 编译型语言。 - * 在 TPV --lsp 实现前,Vipeye 作为姑息 LSP 充当分析器。 - * 通过 dialect 字段在 Python 语义与 Viper 语义之间切换。 + * Python 模式已彻底移除。代码库中不再存在 Python 语义分支, + * 所有分析均按 Viper 语义执行。 */ -/** 支持的语言方言 */ -export type LanguageDialect = 'python' | 'viper'; +/** 支持的语言方言(仅 Viper) */ +export type LanguageDialect = 'viper'; /** 默认方言:Vipeye 已转型为 Viper 专属 LSP 客户端,默认方言为 Viper。 */ export const DefaultDialect: LanguageDialect = 'viper'; -/** 判断当前方言是否为 Viper */ +/** 判断当前方言是否为 Viper(恒为 true,Vipeye 仅支持 Viper) */ export function IsViperDialect(dialect: LanguageDialect | undefined): boolean { - return dialect === 'viper'; + return true; } -/** 判断当前方言是否为 Python */ -export function IsPythonDialect(dialect: LanguageDialect | undefined): boolean { - return dialect !== 'viper'; -} - -/** 从字符串解析方言,无效值返回 undefined */ +/** 从字符串解析方言,仅接受 'viper' */ export function ParseDialect(value: string | undefined): LanguageDialect | undefined { - if (value === 'python' || value === 'viper') { - return value; + if (value === 'viper') { + return 'viper'; } return undefined; } diff --git a/packages/vipeye-internal/src/parser/parser.ts b/packages/vipeye-internal/src/parser/parser.ts index ef5bd049..d1908ae5 100644 --- a/packages/vipeye-internal/src/parser/parser.ts +++ b/packages/vipeye-internal/src/parser/parser.ts @@ -16,7 +16,7 @@ import { appendArray } from '../common/collectionUtils'; import { assert } from '../common/debug'; import { Diagnostic, DiagnosticAddendum } from '../common/diagnostic'; import { DiagnosticSink } from '../common/diagnosticSink'; -import { IsViperDialect, LanguageDialect } from '../common/dialect'; +import { LanguageDialect } from '../common/dialect'; import { convertOffsetsToRange } from '../common/positionUtils'; import { PythonVersion, @@ -553,14 +553,6 @@ export class Parser { private _parseTypeAliasStatement(): TypeAliasNode { const typeToken = this._getKeywordToken(KeywordType.Type); - if ( - !this._parseOptions.isStubFile && - !IsViperDialect(this._parseOptions.dialect) && - PythonVersion.isLessThan(this._getLanguageVersion(), pythonVersion3_12) - ) { - this._addSyntaxError(LocMessage.typeAliasStatementIllegal(), typeToken); - } - const nameToken = this._getTokenIfIdentifier(); assert(nameToken !== undefined); const name = NameNode.create(nameToken); @@ -2055,7 +2047,6 @@ export class Parser { if ( !this._parseOptions.isStubFile && - !IsViperDialect(this._parseOptions.dialect) && PythonVersion.isLessThan(this._getLanguageVersion(), pythonVersion3_12) ) { this._addSyntaxError(LocMessage.functionTypeParametersIllegal(), typeParameters); @@ -2558,7 +2549,6 @@ export class Parser { if ( !this._parseOptions.isStubFile && - !IsViperDialect(this._parseOptions.dialect) && PythonVersion.isLessThan(this._getLanguageVersion(), pythonVersion3_12) ) { this._addSyntaxError(LocMessage.classTypeParametersIllegal(), typeParameters); diff --git a/packages/vipeye-internal/src/tests/viperFakeduck.test.ts b/packages/vipeye-internal/src/tests/viperFakeduck.test.ts new file mode 100644 index 00000000..ddea54b7 --- /dev/null +++ b/packages/vipeye-internal/src/tests/viperFakeduck.test.ts @@ -0,0 +1,283 @@ +/* + * viperFakeduck.test.ts + * + * 临时验证测试(非生产代码,验证完可删除): + * 复现用户真实场景 —— 分析真实文件 _fakeduck.vp 中 _str.split 方法: + * + * def split(self, delimiter: str) -> list[str]: + * result = list[str](self.__mbuddy__) + * ... + * result.append(str(sub)) + * return result + * + * 其中 self.__mbuddy__: memhub.MemBuddy | t.CPtr(联合类型)。 + * + * 验证目标: + * 1. result 变量的类型是否为 list[str] 实例(而不是 None / Unknown) + * 2. split 中是否有 "Cannot access attribute" 类错误 + * 3. _list.vp / memhub.vp / string.vp 是否能被 importLookup 解析 + * 4. 若 result 为 None / Unknown,定位根因(list 泛型特化 / __init__ 参数校验 / + * memhub.MemManager 解析 / 级联模块加载失败) + * + * 运行:npx jest src/tests/viperFakeduck.test.ts --runInBand + * 注意:不要执行 webpack build。 + */ + +import assert from 'assert'; +import * as path from 'path'; + +import { ImportResolver } from '../analyzer/importResolver'; +import { Program } from '../analyzer/program'; +import * as AnalyzerNodeInfo from '../analyzer/analyzerNodeInfo'; +import { ParseTreeWalker } from '../analyzer/parseTreeWalker'; +import { TypeEvaluator } from '../analyzer/typeEvaluatorTypes'; +import { ConfigOptions, ExecutionEnvironment } from '../common/configOptions'; +import { NullConsole } from '../common/console'; +import { RealTempFile, createFromRealFileSystem } from '../common/realFileSystem'; +import { createServiceProvider } from '../common/serviceProviderExtensions'; +import { Uri } from '../common/uri/uri'; +import { UriEx } from '../common/uri/uriUtils'; +import { FullAccessHost } from '../common/fullAccessHost'; +import { CallNode, ClassNode, FunctionNode, ParseNode } from '../parser/parseNodes'; + +// 与 testUtils 一致:允许 vipershed-fallback(t.vpi/c.vpi 存根)被定位。 +(global as any).__rootDirectory = path.resolve(); + +const TRANSPYC_INCLUDES = 'd:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes'; +const FAKEDUCK_PATH = path.join(TRANSPYC_INCLUDES, '_fakeduck.vp'); +const LIST_PATH = path.join(TRANSPYC_INCLUDES, '_list.vp'); +const MEMHUB_PATH = path.join(TRANSPYC_INCLUDES, 'memhub.vp'); +const STRING_PATH = path.join(TRANSPYC_INCLUDES, 'string.vp'); + +function describeType(t: any): string { + if (!t) return '(undefined)'; + const cat = t.category; + const flags = t.flags; + const name = t.shared?.name ?? t.priv?.name ?? ''; + const moduleName = t.shared?.moduleName ?? t.priv?.moduleName ?? ''; + const typeArgs = t.priv?.typeArgs; + const isInstance = (flags & 2 /* TypeFlags.Instance */) !== 0; + return `category=${cat} flags=${flags} isInstance=${isInstance} name=${name} module=${moduleName}${ + typeArgs ? ` typeArgs=[${typeArgs.map((a: any) => describeType(a)).join(', ')}]` : '' + }`; +} + +test('reproduce user scenario: _fakeduck.vp split result type', () => { + // 1. 构建 ConfigOptions(Viper 方言),把真实 includes 目录放进 extraPaths + const tempFile = new RealTempFile(); + const serviceProvider = createServiceProvider(createFromRealFileSystem(tempFile), new NullConsole(), tempFile); + const projectRoot = UriEx.file(TRANSPYC_INCLUDES); + const configOptions = new ConfigOptions(projectRoot); + configOptions.internalTestMode = true; + configOptions.initializeTypeCheckingMode('standard'); + + const execEnv = new ExecutionEnvironment( + 'python', + projectRoot, + configOptions.diagnosticRuleSet, + configOptions.defaultPythonVersion, + configOptions.defaultPythonPlatform, + [projectRoot], + /* skipNativeLibraries */ false, + /* defaultDialect */ 'viper' + ); + configOptions.executionEnvironments = [execEnv]; + + // 2. 创建 Program(真实文件系统) + const importResolver = new ImportResolver(serviceProvider, configOptions, new FullAccessHost(serviceProvider)); + const program = new Program(importResolver, configOptions, serviceProvider); + + const fakeduckUri = UriEx.file(FAKEDUCK_PATH); + + // 3. 探测 import 解析:_list / memhub / string / t / c 是否可解析 + for (const modName of ['_list', 'memhub', 'string', 't', 'c']) { + const resolved = importResolver.resolveImport(fakeduckUri, execEnv, { + leadingDots: 0, + nameParts: [modName], + importedSymbols: undefined, + }); + console.log( + `=== resolveImport "${modName}": isImportFound=${resolved.isImportFound}, uris=${JSON.stringify( + resolved.resolvedUris.map((u) => u.getFilePath()) + )}` + ); + } + + program.setTrackedFiles([fakeduckUri]); + while (program.analyze()) { + // 循环直到分析完成 + } + + // 4. 获取 _fakeduck.vp 的诊断 + const sourceFile = program.getSourceFile(fakeduckUri); + assert(sourceFile, '_fakeduck.vp source file not found'); + const diagnostics = (sourceFile.getDiagnostics(configOptions) || []).map( + (diag) => `[category=${diag.category}] ${diag.message}` + ); + console.log('=== _fakeduck.vp diagnostics ==='); + diagnostics.forEach((d) => console.log(` ${d}`)); + + // 5. 检查依赖模块是否被加载(_list.vp / memhub.vp / string.vp / t.vpi / c.vpi) + const depFiles: Array<{ label: string; uri: Uri | undefined }> = []; + for (const [label, p] of [ + ['_list.vp', LIST_PATH], + ['memhub.vp', MEMHUB_PATH], + ['string.vp', STRING_PATH], + ] as const) { + const resolved = importResolver.resolveImport(fakeduckUri, execEnv, { + leadingDots: 0, + nameParts: [path.basename(p, '.vp')], + importedSymbols: undefined, + }); + const resolvedUri = resolved.resolvedUris[resolved.resolvedUris.length - 1]; + const sf = program.getSourceFile(resolvedUri); + const diags = sf ? (sf.getDiagnostics(configOptions) || []).map((d) => `[${d.category}] ${d.message}`) : []; + console.log(`=== ${label}: loaded=${!!sf}, diagnostics=${JSON.stringify(diags)}`); + depFiles.push({ label, uri: resolvedUri }); + if (sf && diags.length > 0) { + console.log(` --- ${label} diagnostics ---`); + diags.forEach((d) => console.log(` ${d}`)); + } + } + + // 6. 从 parse tree 找到 _str.split 方法,取其 scope,查 result 符号 + const parseResults = sourceFile.getParseResults(); + assert(parseResults, 'parse results not found'); + + let splitFunctionNode: FunctionNode | undefined; + class FunctionFinder extends ParseTreeWalker { + override visitFunction(node: FunctionNode) { + if (node.d.name.d.value === 'split') { + splitFunctionNode = node; + return false; + } + return true; + } + } + new FunctionFinder().walk(parseResults.parserOutput.parseTree); + assert(splitFunctionNode, 'split function not found'); + + const splitScope = AnalyzerNodeInfo.getScope(splitFunctionNode!); + assert(splitScope, 'split scope not found'); + + const resultSymbol = splitScope.lookUpSymbol('result'); + assert(resultSymbol, 'result symbol not found in split scope'); + + const resultType = program.getTypeOfSymbol(resultSymbol); + console.log('=== result type ==='); + console.log(` printed: ${resultType ? program.printType(resultType) : '(undefined)'}`); + console.log(` detail: ${describeType(resultType)}`); + assert(resultType, 'result type is undefined'); + + // 7. 用 evaluator 求值 list[str](self.__mbuddy__) 构造调用,检查其返回类型 + const evaluator = program.evaluator as TypeEvaluator | undefined; + assert(evaluator, 'evaluator not available'); + + const callNodes: CallNode[] = []; + let listCallNode: CallNode | undefined; + class CallCollector extends ParseTreeWalker { + override visitCall(node: CallNode) { + callNodes.push(node); + return true; + } + } + new CallCollector().walk(splitFunctionNode!); + + for (const callNode of callNodes) { + const callType = evaluator.getType(callNode as any); + const printed = callType ? program.printType(callType) : '(undefined)'; + // 打印 split 内所有调用节点的类型 + const leftExpr = callNode.d?.leftExpr as any; + const calleeName = leftExpr?.nodeType === 'Name' ? leftExpr?.d?.value : undefined; + console.log(`=== call node type (range ${callNode.start}-${callNode.start + callNode.length}, callee=${calleeName}): ${printed}`); + if (calleeName === 'list') { + listCallNode = callNode; + } + } + + // 8. 检查 _list.vp 的 list 类定义(泛型类是否被正确识别) + const listResolvedUri = depFiles.find((d) => d.label === '_list.vp')?.uri; + if (listResolvedUri) { + const listSf = program.getSourceFile(listResolvedUri); + const listParse = listSf?.getParseResults(); + if (listParse) { + const listModuleScope = AnalyzerNodeInfo.getScope(listParse.parserOutput.parseTree); + const listClassSymbol = listModuleScope?.lookUpSymbol('list'); + if (listClassSymbol) { + const listClassType = program.getTypeOfSymbol(listClassSymbol); + console.log('=== _list.list class type ==='); + console.log(` printed: ${program.printType(listClassType)}`); + console.log(` detail: ${describeType(listClassType)}`); + } else { + console.log('=== _list.list class symbol NOT found ==='); + } + + // 检查 list 的 __init__ / __new__ 签名 + class ClassFinder extends ParseTreeWalker { + override visitClass(node: ClassNode) { + if (node.d.name.d.value === 'list') { + const clsScope = AnalyzerNodeInfo.getScope(node); + for (const fnName of ['__init__', '__new__', 'append']) { + const fnSym = clsScope?.lookUpSymbol(fnName); + if (fnSym) { + const fnType = program.getTypeOfSymbol(fnSym); + console.log(`=== _list.list.${fnName} type: ${program.printType(fnType)}`); + } else { + console.log(`=== _list.list.${fnName} symbol NOT found`); + } + } + return false; + } + return true; + } + } + new ClassFinder().walk(listParse.parserOutput.parseTree); + } + } + + // 9. 检查 memhub.MemManager 是否可解析 + { + const memhubResolvedUri = depFiles.find((d) => d.label === 'memhub.vp')?.uri; + const memhubSf = memhubResolvedUri ? program.getSourceFile(memhubResolvedUri) : undefined; + const memhubParse = memhubSf?.getParseResults(); + if (memhubParse) { + const memhubModuleScope = AnalyzerNodeInfo.getScope(memhubParse.parserOutput.parseTree); + for (const name of ['MemManager', 'MemBuddy']) { + const sym = memhubModuleScope?.lookUpSymbol(name); + if (sym) { + const t = program.getTypeOfSymbol(sym); + console.log(`=== memhub.${name}: ${program.printType(t)}`); + } else { + console.log(`=== memhub.${name} symbol NOT found`); + } + } + } else { + console.log('=== memhub.vp NOT loaded / no parse results'); + } + } + + // 10. 统计关键诊断 + const attributeErrors = diagnostics.filter( + (d) => d.includes('Cannot access attribute') || d.includes('is not assignable') + ); + console.log('=== attribute / assignability errors ==='); + attributeErrors.forEach((d) => console.log(` ${d}`)); + + const resultTypeStr = program.printType(resultType); + const resultIsNoneOrUnknown = + resultTypeStr.includes('None') || resultTypeStr.includes('Unknown') || resultTypeStr === '()'; + + console.log('=== SUMMARY ==='); + console.log(` result type: ${resultTypeStr}`); + console.log(` result is None/Unknown/empty: ${resultIsNoneOrUnknown}`); + console.log(` "Cannot access attribute" errors: ${attributeErrors.length}`); + console.log(` _list.vp loaded: ${!!depFiles.find((d) => d.label === '_list.vp')?.uri && !!program.getSourceFile(depFiles.find((d) => d.label === '_list.vp')!.uri!)}`); + console.log(` memhub.vp loaded: ${!!depFiles.find((d) => d.label === 'memhub.vp')?.uri && !!program.getSourceFile(depFiles.find((d) => d.label === 'memhub.vp')!.uri!)}`); + console.log(` string.vp loaded: ${!!depFiles.find((d) => d.label === 'string.vp')?.uri && !!program.getSourceFile(depFiles.find((d) => d.label === 'string.vp')!.uri!)}`); + + // 验证目标断言:无论 result 是否正常,测试都必须输出完整诊断;用宽松断言保证测试通过以收集信息 + assert(resultTypeStr.length > 0, 'result type string is empty'); + + program.dispose(); + serviceProvider.dispose(); +}); diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/__future__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/__future__.vpi deleted file mode 100644 index aa445d22..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/__future__.vpi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import TypeAlias - -_VersionInfo: TypeAlias = tuple[int, int, int, str, int] - -class _Feature: - def __init__(self, optionalRelease: _VersionInfo, mandatoryRelease: _VersionInfo | None, compiler_flag: int) -> None: ... - def getOptionalRelease(self) -> _VersionInfo: ... - def getMandatoryRelease(self) -> _VersionInfo | None: ... - compiler_flag: int - -absolute_import: _Feature -division: _Feature -generators: _Feature -nested_scopes: _Feature -print_function: _Feature -unicode_literals: _Feature -with_statement: _Feature -barry_as_FLUFL: _Feature -generator_stop: _Feature -annotations: _Feature - -all_feature_names: list[str] # undocumented - -__all__ = [ - "all_feature_names", - "absolute_import", - "division", - "generators", - "nested_scopes", - "print_function", - "unicode_literals", - "with_statement", - "barry_as_FLUFL", - "generator_stop", - "annotations", -] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/__main__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/__main__.vpi deleted file mode 100644 index 5b0f74fe..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/__main__.vpi +++ /dev/null @@ -1 +0,0 @@ -def __getattr__(name: str): ... # incomplete module diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_asyncio.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_asyncio.vpi deleted file mode 100644 index a7fb3542..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_asyncio.vpi +++ /dev/null @@ -1,114 +0,0 @@ -import sys -from asyncio.events import AbstractEventLoop -from collections.abc import Awaitable, Callable, Coroutine, Generator -from contextvars import Context -from types import FrameType, GenericAlias -from typing import Any, Literal, TextIO, TypeAlias, TypeVar -from typing_extensions import Self, disjoint_base - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_TaskYieldType: TypeAlias = Future[object] | None - -@disjoint_base -class Future(Awaitable[_T]): - _state: str - @property - def _exception(self) -> BaseException | None: ... - _blocking: bool - - @property - def _log_traceback(self) -> bool: ... - @_log_traceback.setter - def _log_traceback(self, val: Literal[False]) -> None: ... - - _asyncio_future_blocking: bool # is a part of duck-typing contract for `Future` - def __init__(self, *, loop: AbstractEventLoop | None = None) -> None: ... - def __del__(self) -> None: ... - def get_loop(self) -> AbstractEventLoop: ... - @property - def _callbacks(self) -> list[tuple[Callable[[Self], Any], Context]]: ... - def add_done_callback(self, fn: Callable[[Self], object], /, *, context: Context | None = None) -> None: ... - def cancel(self, msg: Any | None = None) -> bool: ... - def cancelled(self) -> bool: ... - def done(self) -> bool: ... - def result(self) -> _T: ... - def exception(self) -> BaseException | None: ... - def remove_done_callback(self, fn: Callable[[Self], object], /) -> int: ... - def set_result(self, result: _T, /) -> None: ... - def set_exception(self, exception: type | BaseException, /) -> None: ... - def __iter__(self) -> Generator[Any, None, _T]: ... - def __await__(self) -> Generator[Any, None, _T]: ... - @property - def _loop(self) -> AbstractEventLoop: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -if sys.version_info >= (3, 12): - _TaskCompatibleCoro: TypeAlias = Coroutine[Any, Any, _T_co] -else: - _TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Coroutine[Any, Any, _T_co] - -# mypy and pyright complain that a subclass of an invariant class shouldn't be covariant. -# While this is true in general, here it's sort-of okay to have a covariant subclass, -# since the only reason why `asyncio.Future` is invariant is the `set_result()` method, -# and `asyncio.Task.set_result()` always raises. -@disjoint_base -class Task(Future[_T_co]): # type: ignore[type-var] # viper: ignore[reportInvalidTypeArguments] - if sys.version_info >= (3, 12): - def __init__( - self, - coro: _TaskCompatibleCoro[_T_co], - *, - loop: AbstractEventLoop | None = None, - name: str | None = None, - context: Context | None = None, - eager_start: bool = False, - ) -> None: ... - elif sys.version_info >= (3, 11): - def __init__( - self, - coro: _TaskCompatibleCoro[_T_co], - *, - loop: AbstractEventLoop | None = None, - name: str | None = None, - context: Context | None = None, - ) -> None: ... - else: - def __init__( - self, coro: _TaskCompatibleCoro[_T_co], *, loop: AbstractEventLoop | None = None, name: str | None = None - ) -> None: ... - - if sys.version_info >= (3, 12): - def get_coro(self) -> _TaskCompatibleCoro[_T_co] | None: ... - else: - def get_coro(self) -> _TaskCompatibleCoro[_T_co]: ... - - def get_name(self) -> str: ... - def set_name(self, value: object, /) -> None: ... - if sys.version_info >= (3, 12): - def get_context(self) -> Context: ... - - def get_stack(self, *, limit: int | None = None) -> list[FrameType]: ... - def print_stack(self, *, limit: int | None = None, file: TextIO | None = None) -> None: ... - if sys.version_info >= (3, 11): - def cancelling(self) -> int: ... - def uncancel(self) -> int: ... - - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def get_event_loop() -> AbstractEventLoop: ... -def get_running_loop() -> AbstractEventLoop: ... -def _set_running_loop(loop: AbstractEventLoop | None, /) -> None: ... -def _get_running_loop() -> AbstractEventLoop | None: ... -def _register_task(task: Task[Any]) -> None: ... -def _unregister_task(task: Task[Any]) -> None: ... -def _enter_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... -def _leave_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ... - -if sys.version_info >= (3, 12): - def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... - -if sys.version_info >= (3, 14): - def future_discard_from_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ... - def future_add_to_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ... - def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_bisect.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_bisect.vpi deleted file mode 100644 index b87dd8f3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_bisect.vpi +++ /dev/null @@ -1,103 +0,0 @@ -from _typeshed import SupportsGetItem, SupportsLenAndGetItem, SupportsRichComparisonT -from collections.abc import Callable, MutableSequence -from typing import TypeVar, overload - -_T = TypeVar("_T") - -@overload -def bisect_left( - a: SupportsLenAndGetItem[SupportsRichComparisonT], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: None = None, -) -> int: ... -@overload -def bisect_left( - a: SupportsGetItem[int, SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int, hi: int, *, key: None = None -) -> int: ... -@overload -def bisect_left( - a: SupportsGetItem[int, SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, *, hi: int, key: None = None -) -> int: ... -@overload -def bisect_left( - a: SupportsLenAndGetItem[_T], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: Callable[[_T], SupportsRichComparisonT], -) -> int: ... -@overload -def bisect_left( - a: SupportsGetItem[int, _T], x: SupportsRichComparisonT, lo: int, hi: int, *, key: Callable[[_T], SupportsRichComparisonT] -) -> int: ... -@overload -def bisect_left( - a: SupportsGetItem[int, _T], x: SupportsRichComparisonT, lo: int = 0, *, hi: int, key: Callable[[_T], SupportsRichComparisonT] -) -> int: ... - -@overload -def bisect_right( - a: SupportsLenAndGetItem[SupportsRichComparisonT], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: None = None, -) -> int: ... -@overload -def bisect_right( - a: SupportsGetItem[int, SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int, hi: int, *, key: None = None -) -> int: ... -@overload -def bisect_right( - a: SupportsGetItem[int, SupportsRichComparisonT], x: SupportsRichComparisonT, lo: int = 0, *, hi: int, key: None = None -) -> int: ... -@overload -def bisect_right( - a: SupportsLenAndGetItem[_T], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: Callable[[_T], SupportsRichComparisonT], -) -> int: ... -@overload -def bisect_right( - a: SupportsGetItem[int, _T], x: SupportsRichComparisonT, lo: int, hi: int, *, key: Callable[[_T], SupportsRichComparisonT] -) -> int: ... -@overload -def bisect_right( - a: SupportsGetItem[int, _T], x: SupportsRichComparisonT, lo: int = 0, *, hi: int, key: Callable[[_T], SupportsRichComparisonT] -) -> int: ... - -@overload -def insort_left( - a: MutableSequence[SupportsRichComparisonT], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: None = None, -) -> None: ... -@overload -def insort_left( - a: MutableSequence[_T], x: _T, lo: int = 0, hi: int | None = None, *, key: Callable[[_T], SupportsRichComparisonT] -) -> None: ... - -@overload -def insort_right( - a: MutableSequence[SupportsRichComparisonT], - x: SupportsRichComparisonT, - lo: int = 0, - hi: int | None = None, - *, - key: None = None, -) -> None: ... -@overload -def insort_right( - a: MutableSequence[_T], x: _T, lo: int = 0, hi: int | None = None, *, key: Callable[[_T], SupportsRichComparisonT] -) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_blake2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_blake2.vpi deleted file mode 100644 index a6c3869f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_blake2.vpi +++ /dev/null @@ -1,119 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from typing import ClassVar, Final, final -from typing_extensions import Self - -BLAKE2B_MAX_DIGEST_SIZE: Final = 64 -BLAKE2B_MAX_KEY_SIZE: Final = 64 -BLAKE2B_PERSON_SIZE: Final = 16 -BLAKE2B_SALT_SIZE: Final = 16 -BLAKE2S_MAX_DIGEST_SIZE: Final = 32 -BLAKE2S_MAX_KEY_SIZE: Final = 32 -BLAKE2S_PERSON_SIZE: Final = 8 -BLAKE2S_SALT_SIZE: Final = 8 - -@final -class blake2b: - MAX_DIGEST_SIZE: ClassVar[int] = 64 - MAX_KEY_SIZE: ClassVar[int] = 64 - PERSON_SIZE: ClassVar[int] = 16 - SALT_SIZE: ClassVar[int] = 16 - block_size: int - digest_size: int - name: str - if sys.version_info >= (3, 13): - def __new__( - cls, - data: ReadableBuffer = b"", - *, - digest_size: int = 64, - key: ReadableBuffer = b"", - salt: ReadableBuffer = b"", - person: ReadableBuffer = b"", - fanout: int = 1, - depth: int = 1, - leaf_size: int = 0, - node_offset: int = 0, - node_depth: int = 0, - inner_size: int = 0, - last_node: bool = False, - usedforsecurity: bool = True, - string: ReadableBuffer | None = None, - ) -> Self: ... - else: - def __new__( - cls, - data: ReadableBuffer = b"", - /, - *, - digest_size: int = 64, - key: ReadableBuffer = b"", - salt: ReadableBuffer = b"", - person: ReadableBuffer = b"", - fanout: int = 1, - depth: int = 1, - leaf_size: int = 0, - node_offset: int = 0, - node_depth: int = 0, - inner_size: int = 0, - last_node: bool = False, - usedforsecurity: bool = True, - ) -> Self: ... - - def copy(self) -> Self: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def update(self, data: ReadableBuffer, /) -> None: ... - -@final -class blake2s: - MAX_DIGEST_SIZE: ClassVar[int] = 32 - MAX_KEY_SIZE: ClassVar[int] = 32 - PERSON_SIZE: ClassVar[int] = 8 - SALT_SIZE: ClassVar[int] = 8 - block_size: int - digest_size: int - name: str - if sys.version_info >= (3, 13): - def __new__( - cls, - data: ReadableBuffer = b"", - *, - digest_size: int = 32, - key: ReadableBuffer = b"", - salt: ReadableBuffer = b"", - person: ReadableBuffer = b"", - fanout: int = 1, - depth: int = 1, - leaf_size: int = 0, - node_offset: int = 0, - node_depth: int = 0, - inner_size: int = 0, - last_node: bool = False, - usedforsecurity: bool = True, - string: ReadableBuffer | None = None, - ) -> Self: ... - else: - def __new__( - cls, - data: ReadableBuffer = b"", - /, - *, - digest_size: int = 32, - key: ReadableBuffer = b"", - salt: ReadableBuffer = b"", - person: ReadableBuffer = b"", - fanout: int = 1, - depth: int = 1, - leaf_size: int = 0, - node_offset: int = 0, - node_depth: int = 0, - inner_size: int = 0, - last_node: bool = False, - usedforsecurity: bool = True, - ) -> Self: ... - - def copy(self) -> Self: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def update(self, data: ReadableBuffer, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_bz2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_bz2.vpi deleted file mode 100644 index fdad932c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_bz2.vpi +++ /dev/null @@ -1,24 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from typing import final -from typing_extensions import Self - -@final -class BZ2Compressor: - if sys.version_info >= (3, 12): - def __new__(cls, compresslevel: int = 9, /) -> Self: ... - else: - def __init__(self, compresslevel: int = 9, /) -> None: ... - - def compress(self, data: ReadableBuffer, /) -> bytes: ... - def flush(self) -> bytes: ... - -@final -class BZ2Decompressor: - def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes: ... - @property - def eof(self) -> bool: ... - @property - def needs_input(self) -> bool: ... - @property - def unused_data(self) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_codecs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_codecs.vpi deleted file mode 100644 index 38cf857d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_codecs.vpi +++ /dev/null @@ -1,122 +0,0 @@ -import codecs -import sys -from _typeshed import ReadableBuffer -from collections.abc import Callable -from typing import Literal, TypeAlias, final, overload, type_check_only - -# This type is not exposed; it is defined in unicodeobject.c -# At runtime it calls itself builtins.EncodingMap -@final -@type_check_only -class _EncodingMap: - def size(self) -> int: ... - -_CharMap: TypeAlias = dict[int, int] | _EncodingMap -_Handler: TypeAlias = Callable[[UnicodeError], tuple[str | bytes, int]] -_SearchFunction: TypeAlias = Callable[[str], codecs.CodecInfo | None] - -def register(search_function: _SearchFunction, /) -> None: ... -def unregister(search_function: _SearchFunction, /) -> None: ... -def register_error(errors: str, handler: _Handler, /) -> None: ... -def lookup_error(name: str, /) -> _Handler: ... - -# The type ignore on `encode` and `decode` is to avoid issues with overlapping overloads, for more details, see #300 -# https://docs.python.org/3/library/codecs.html#binary-transforms -_BytesToBytesEncoding: TypeAlias = Literal[ - "base64", - "base_64", - "base64_codec", - "bz2", - "bz2_codec", - "hex", - "hex_codec", - "quopri", - "quotedprintable", - "quoted_printable", - "quopri_codec", - "uu", - "uu_codec", - "zip", - "zlib", - "zlib_codec", -] -# https://docs.python.org/3/library/codecs.html#text-transforms -_StrToStrEncoding: TypeAlias = Literal["rot13", "rot_13"] - -@overload -def encode(obj: ReadableBuffer, encoding: _BytesToBytesEncoding, errors: str = "strict") -> bytes: ... -@overload -def encode(obj: str, encoding: _StrToStrEncoding, errors: str = "strict") -> str: ... # type: ignore[overload-overlap] -@overload -def encode(obj: str, encoding: str = "utf-8", errors: str = "strict") -> bytes: ... - -@overload -def decode(obj: ReadableBuffer, encoding: _BytesToBytesEncoding, errors: str = "strict") -> bytes: ... # type: ignore[overload-overlap] -@overload -def decode(obj: str, encoding: _StrToStrEncoding, errors: str = "strict") -> str: ... - -# these are documented as text encodings but in practice they also accept str as input -@overload -def decode( - obj: str, - encoding: Literal["unicode_escape", "unicode-escape", "raw_unicode_escape", "raw-unicode-escape"], - errors: str = "strict", -) -> str: ... - -# hex is officially documented as a bytes to bytes encoding, but it appears to also work with str -@overload -def decode(obj: str, encoding: Literal["hex", "hex_codec"], errors: str = "strict") -> bytes: ... -@overload -def decode(obj: ReadableBuffer, encoding: str = "utf-8", errors: str = "strict") -> str: ... - -def lookup(encoding: str, /) -> codecs.CodecInfo: ... -def charmap_build(map: str, /) -> _CharMap: ... -def ascii_decode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... -def ascii_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def charmap_decode(data: ReadableBuffer, errors: str | None = None, mapping: _CharMap | None = None, /) -> tuple[str, int]: ... -def charmap_encode(str: str, errors: str | None = None, mapping: _CharMap | None = None, /) -> tuple[bytes, int]: ... - -# Docs say this accepts a bytes-like object, but in practice it also accepts str. -def escape_decode(data: str | ReadableBuffer, errors: str | None = None, /) -> tuple[bytes, int]: ... -def escape_encode(data: bytes, errors: str | None = None, /) -> tuple[bytes, int]: ... -def latin_1_decode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... -def latin_1_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def raw_unicode_escape_decode( - data: str | ReadableBuffer, errors: str | None = None, final: bool = True, / -) -> tuple[str, int]: ... -def raw_unicode_escape_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def readbuffer_encode(data: str | ReadableBuffer, errors: str | None = None, /) -> tuple[bytes, int]: ... -def unicode_escape_decode(data: str | ReadableBuffer, errors: str | None = None, final: bool = True, /) -> tuple[str, int]: ... -def unicode_escape_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_16_be_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_16_be_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_16_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_16_encode(str: str, errors: str | None = None, byteorder: int = 0, /) -> tuple[bytes, int]: ... -def utf_16_ex_decode( - data: ReadableBuffer, errors: str | None = None, byteorder: int = 0, final: bool = False, / -) -> tuple[str, int, int]: ... -def utf_16_le_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_16_le_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_32_be_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_32_be_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_32_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_32_encode(str: str, errors: str | None = None, byteorder: int = 0, /) -> tuple[bytes, int]: ... -def utf_32_ex_decode( - data: ReadableBuffer, errors: str | None = None, byteorder: int = 0, final: bool = False, / -) -> tuple[str, int, int]: ... -def utf_32_le_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_32_le_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_7_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_7_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... -def utf_8_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... -def utf_8_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -if sys.platform == "win32": - def mbcs_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - def mbcs_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - def code_page_decode( - codepage: int, data: ReadableBuffer, errors: str | None = None, final: bool = False, / - ) -> tuple[str, int]: ... - def code_page_encode(code_page: int, str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - def oem_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - def oem_encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_compat_pickle.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_compat_pickle.vpi deleted file mode 100644 index 32c0b542..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_compat_pickle.vpi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import Final - -IMPORT_MAPPING: Final[dict[str, str]] -NAME_MAPPING: Final[dict[tuple[str, str], tuple[str, str]]] -PYTHON2_EXCEPTIONS: Final[tuple[str, ...]] -MULTIPROCESSING_EXCEPTIONS: Final[tuple[str, ...]] -REVERSE_IMPORT_MAPPING: Final[dict[str, str]] -REVERSE_NAME_MAPPING: Final[dict[tuple[str, str], tuple[str, str]]] -PYTHON3_OSERROR_EXCEPTIONS: Final[tuple[str, ...]] -PYTHON3_IMPORTERROR_EXCEPTIONS: Final[tuple[str, ...]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_compression.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_compression.vpi deleted file mode 100644 index 6015bcb1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_compression.vpi +++ /dev/null @@ -1,39 +0,0 @@ -# _compression is replaced by compression._common._streams on Python 3.14+ (PEP-784) - -from _typeshed import ReadableBuffer, WriteableBuffer -from collections.abc import Callable -from io import DEFAULT_BUFFER_SIZE, BufferedIOBase, RawIOBase -from typing import Any, Protocol, type_check_only - -BUFFER_SIZE = DEFAULT_BUFFER_SIZE - -@type_check_only -class _Reader(Protocol): - def read(self, n: int, /) -> bytes: ... - def seekable(self) -> bool: ... - def seek(self, n: int, /) -> Any: ... - -@type_check_only -class _Decompressor(Protocol): - def decompress(self, data: ReadableBuffer, /, max_length: int = ...) -> bytes: ... - @property - def unused_data(self) -> bytes: ... - @property - def eof(self) -> bool: ... - # `zlib._Decompress` does not have next property, but `DecompressReader` calls it: - # @property - # def needs_input(self) -> bool: ... - -class BaseStream(BufferedIOBase): ... - -class DecompressReader(RawIOBase): - def __init__( - self, - fp: _Reader, - decomp_factory: Callable[..., _Decompressor], - trailing_error: type[Exception] | tuple[type[Exception], ...] = (), - **decomp_args: Any, # These are passed to decomp_factory. - ) -> None: ... - def readinto(self, b: WriteableBuffer) -> int: ... - def read(self, size: int = -1) -> bytes: ... - def seek(self, offset: int, whence: int = 0) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_contextvars.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_contextvars.vpi deleted file mode 100644 index 56440884..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_contextvars.vpi +++ /dev/null @@ -1,69 +0,0 @@ -import sys -from collections.abc import Callable, Iterator, Mapping -from types import GenericAlias, TracebackType -from typing import Any, ClassVar, Generic, ParamSpec, TypeVar, final, overload -from typing_extensions import Self - -_T = TypeVar("_T") -_D = TypeVar("_D") -_P = ParamSpec("_P") - -@final -class ContextVar(Generic[_T]): - @overload - def __new__(cls, name: str) -> Self: ... - @overload - def __new__(cls, name: str, *, default: _T) -> Self: ... - - def __hash__(self) -> int: ... - @property - def name(self) -> str: ... - - @overload - def get(self) -> _T: ... - @overload - def get(self, default: _T, /) -> _T: ... - @overload - def get(self, default: _D, /) -> _D | _T: ... - - def set(self, value: _T, /) -> Token[_T]: ... - def reset(self, token: Token[_T], /) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -@final -class Token(Generic[_T]): - @property - def var(self) -> ContextVar[_T]: ... - @property - def old_value(self) -> Any: ... # returns either _T or MISSING, but that's hard to express - MISSING: ClassVar[object] - __hash__: ClassVar[None] # type: ignore[assignment] - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - if sys.version_info >= (3, 14): - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None, / - ) -> None: ... - -def copy_context() -> Context: ... - -# It doesn't make sense to make this generic, because for most Contexts each ContextVar will have -# a different value. -@final -class Context(Mapping[ContextVar[Any], Any]): - def __init__(self) -> None: ... - - @overload - def get(self, key: ContextVar[_T], default: None = None, /) -> _T | None: ... - @overload - def get(self, key: ContextVar[_T], default: _T, /) -> _T: ... - @overload - def get(self, key: ContextVar[_T], default: _D, /) -> _T | _D: ... - - def run(self, callable: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ... - def copy(self) -> Context: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __getitem__(self, key: ContextVar[_T], /) -> _T: ... - def __iter__(self) -> Iterator[ContextVar[Any]]: ... - def __len__(self) -> int: ... - def __eq__(self, value: object, /) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_csv.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_csv.vpi deleted file mode 100644 index d3702be7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_csv.vpi +++ /dev/null @@ -1,116 +0,0 @@ -import csv -import sys -from _typeshed import SupportsWrite -from collections.abc import Iterable -from typing import Any, Final, Literal, TypeAlias -from typing_extensions import Self, disjoint_base - -__version__: Final[str] - -QUOTE_ALL: Final = 1 -QUOTE_MINIMAL: Final = 0 -QUOTE_NONE: Final = 3 -QUOTE_NONNUMERIC: Final = 2 -if sys.version_info >= (3, 12): - QUOTE_STRINGS: Final = 4 - QUOTE_NOTNULL: Final = 5 - -if sys.version_info >= (3, 12): - _QuotingType: TypeAlias = Literal[0, 1, 2, 3, 4, 5] -else: - _QuotingType: TypeAlias = Literal[0, 1, 2, 3] - -class Error(Exception): ... - -_DialectLike: TypeAlias = str | Dialect | csv.Dialect | type[Dialect | csv.Dialect] - -@disjoint_base -class Dialect: - delimiter: str - quotechar: str | None - escapechar: str | None - doublequote: bool - skipinitialspace: bool - lineterminator: str - quoting: _QuotingType - strict: bool - def __new__( - cls, - dialect: _DialectLike | None = None, - delimiter: str = ",", - doublequote: bool = True, - escapechar: str | None = None, - lineterminator: str = "\r\n", - quotechar: str | None = '"', - quoting: _QuotingType = 0, - skipinitialspace: bool = False, - strict: bool = False, - ) -> Self: ... - -# This class calls itself _csv.reader. -@disjoint_base -class Reader: - @property - def dialect(self) -> Dialect: ... - line_num: int - def __iter__(self) -> Self: ... - def __next__(self) -> list[str]: ... - -# This class calls itself _csv.writer. -@disjoint_base -class Writer: - @property - def dialect(self) -> Dialect: ... - if sys.version_info >= (3, 13): - def writerow(self, row: Iterable[Any], /) -> Any: ... - def writerows(self, rows: Iterable[Iterable[Any]], /) -> None: ... - else: - def writerow(self, row: Iterable[Any]) -> Any: ... - def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ... - -def writer( - fileobj: SupportsWrite[str], - /, - dialect: _DialectLike = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, -) -> Writer: ... -def reader( - iterable: Iterable[str], - /, - dialect: _DialectLike = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, -) -> Reader: ... -def register_dialect( - name: str, - /, - dialect: type[Dialect | csv.Dialect] | str = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, -) -> None: ... -def unregister_dialect(name: str) -> None: ... -def get_dialect(name: str) -> Dialect: ... -def list_dialects() -> list[str]: ... -def field_size_limit(new_limit: int = ...) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_ctypes.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_ctypes.vpi deleted file mode 100644 index 8bc79be8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_ctypes.vpi +++ /dev/null @@ -1,375 +0,0 @@ -import _typeshed -import builtins -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer -from abc import abstractmethod -from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence -from ctypes import CDLL, ArgumentError as ArgumentError, c_void_p -from types import GenericAlias -from typing import Any, ClassVar, Final, Generic, Literal, SupportsIndex, TypeAlias, TypeVar, final, overload, type_check_only -from typing_extensions import Self - -_T = TypeVar("_T") -_CT = TypeVar("_CT", bound=_CData) - -FUNCFLAG_CDECL: Final = 0x1 -FUNCFLAG_PYTHONAPI: Final = 0x4 -FUNCFLAG_USE_ERRNO: Final = 0x8 -FUNCFLAG_USE_LASTERROR: Final = 0x10 -RTLD_GLOBAL: Final[int] -RTLD_LOCAL: Final[int] - -if sys.version_info >= (3, 11): - CTYPES_MAX_ARGCOUNT: Final[int] - -if sys.version_info >= (3, 12): - SIZEOF_TIME_T: Final[int] - -if sys.platform == "win32": - # Description, Source, HelpFile, HelpContext, scode - _COMError_Details: TypeAlias = tuple[str | None, str | None, str | None, int | None, int | None] - - class COMError(Exception): - hresult: int - text: str | None - details: _COMError_Details - - def __init__(self, hresult: int, text: str | None, details: _COMError_Details) -> None: ... - - def CopyComPointer(src: _PointerLike, dst: _PointerLike | _CArgObject) -> int: ... - - FUNCFLAG_HRESULT: Final = 0x2 - FUNCFLAG_STDCALL: Final = 0x0 - - def FormatError(code: int = ...) -> str: ... - def get_last_error() -> int: ... - def set_last_error(value: int) -> int: ... - def LoadLibrary(name: str, load_flags: int = 0, /) -> int: ... - def FreeLibrary(handle: int, /) -> None: ... - -else: - def dlclose(handle: int, /) -> None: ... - # The default for flag is RTLD_GLOBAL|RTLD_LOCAL, which is platform dependent. - def dlopen(name: StrOrBytesPath, flag: int = ..., /) -> int: ... - def dlsym(handle: int, name: str, /) -> int: ... - -if sys.version_info >= (3, 13): - # This class is not exposed. It calls itself _ctypes.CType_Type. - @type_check_only - class _CType_Type(type): - # By default mypy complains about the following two methods, because strictly speaking cls - # might not be a Type[_CT]. However this doesn't happen because this is only a - # metaclass for subclasses of _CData. - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - - _CTypeBaseType = _CType_Type - -else: - _CTypeBaseType = type - -# This class is not exposed. -@type_check_only -class _CData: - _b_base_: int - _b_needsfree_: bool - _objects: Mapping[Any, int] | None - def __buffer__(self, flags: int, /) -> memoryview: ... - def __ctypes_from_outparam__(self, /) -> Self: ... - if sys.version_info >= (3, 14): - __pointer_type__: type - -# this is a union of all the subclasses of _CData, which is useful because of -# the methods that are present on each of those subclasses which are not present -# on _CData itself. -_CDataType: TypeAlias = _SimpleCData[Any] | _Pointer[Any] | CFuncPtr | Union | Structure | Array[Any] - -# This class is not exposed. It calls itself _ctypes.PyCSimpleType. -@type_check_only -class _PyCSimpleType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(self: type[_CT], value: int, /) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(self: type[_CT], value: int, /) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class _SimpleCData(_CData, Generic[_T], metaclass=_PyCSimpleType): - value: _T - # The TypeVar can be unsolved here, - # but we can't use overloads without creating many, many mypy false-positive errors - def __init__(self, value: _T = ...) -> None: ... # viper: ignore[reportInvalidTypeVarUse] - def __ctypes_from_outparam__(self, /) -> _T: ... # type: ignore[override] - -@type_check_only -class _CanCastTo(_CData): ... - -@type_check_only -class _PointerLike(_CanCastTo): ... - -# This type is not exposed. It calls itself _ctypes.PyCPointerType. -@type_check_only -class _PyCPointerType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - def set_type(self, type: _CTypeBaseType, /) -> None: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class _Pointer(_PointerLike, _CData, Generic[_CT], metaclass=_PyCPointerType): - _type_: type[_CT] - contents: _CT - - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg: _CT) -> None: ... - - @overload - def __getitem__(self, key: int, /) -> Any: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None], /) -> list[Any]: ... - - def __setitem__(self, key: int, value: Any, /) -> None: ... - -if sys.version_info < (3, 14): - @overload - def POINTER(type: None, /) -> type[c_void_p]: ... - @overload - def POINTER(type: type[_CT], /) -> type[_Pointer[_CT]]: ... - - def pointer(obj: _CT, /) -> _Pointer[_CT]: ... - -# This class is not exposed. It calls itself _ctypes.CArgObject. -@final -@type_check_only -class _CArgObject: ... - -if sys.version_info >= (3, 14): - def byref(obj: _CData | _CDataType, offset: int = 0, /) -> _CArgObject: ... - -else: - def byref(obj: _CData | _CDataType, offset: int = 0) -> _CArgObject: ... - -_ECT: TypeAlias = Callable[[_CData | _CDataType | None, CFuncPtr, tuple[_CData | _CDataType, ...]], _CDataType] -_PF: TypeAlias = tuple[int] | tuple[int, str | None] | tuple[int, str | None, Any] - -# This class is not exposed. It calls itself _ctypes.PyCFuncPtrType. -@type_check_only -class _PyCFuncPtrType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class CFuncPtr(_PointerLike, _CData, metaclass=_PyCFuncPtrType): - restype: type[_CDataType] | Callable[[int], Any] | None - argtypes: Sequence[type[_CDataType]] - errcheck: _ECT - # Abstract attribute that must be defined on subclasses - _flags_: ClassVar[int] - - @overload - def __new__(cls) -> Self: ... - @overload - def __new__(cls, address: int, /) -> Self: ... - @overload - def __new__(cls, callable: Callable[..., Any], /) -> Self: ... - @overload - def __new__(cls, func_spec: tuple[str | int, CDLL], paramflags: tuple[_PF, ...] | None = ..., /) -> Self: ... - if sys.platform == "win32": - @overload - def __new__( - cls, vtbl_index: int, name: str, paramflags: tuple[_PF, ...] | None = ..., iid: _CData | _CDataType | None = ..., / - ) -> Self: ... - - def __call__(self, *args: Any, **kwargs: Any) -> Any: ... - -_GetT = TypeVar("_GetT") -_SetT = TypeVar("_SetT") - -if sys.version_info >= (3, 14): - @final - class CField(Generic[_CT, _GetT, _SetT]): - offset: int - size: int - name: str - type: builtins.type[_CT] - byte_offset: int - byte_size: int - is_bitfield: bool - bit_offset: int - bit_size: int - is_anonymous: bool - - @overload - def __get__(self, instance: None, owner: builtins.type[Any] | None = None, /) -> Self: ... - @overload - def __get__(self, instance: Any, owner: builtins.type[Any] | None = None, /) -> _GetT: ... - - def __set__(self, instance: Any, value: _SetT, /) -> None: ... - - _CField = CField - -else: - @final - @type_check_only - class _CField(Generic[_CT, _GetT, _SetT]): - offset: int - size: int - - @overload - def __get__(self, instance: None, owner: type[Any] | None = None, /) -> Self: ... - @overload - def __get__(self, instance: Any, owner: type[Any] | None = None, /) -> _GetT: ... - - def __set__(self, instance: Any, value: _SetT, /) -> None: ... - -# This class is not exposed. It calls itself _ctypes.UnionType. -@type_check_only -class _UnionType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - # At runtime, various attributes are created on a Union subclass based - # on its _fields_. This method doesn't exist, but represents those - # dynamically created attributes. - def __getattr__(self, name: str) -> _CField[Any, Any, Any]: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class Union(_CData, metaclass=_UnionType): - _fields_: ClassVar[Sequence[tuple[str, type[_CDataType]] | tuple[str, type[_CDataType], int]]] - _pack_: ClassVar[int] - _anonymous_: ClassVar[Sequence[str]] - if sys.version_info >= (3, 13): - _align_: ClassVar[int] - - def __init__(self, *args: Any, **kw: Any) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any) -> None: ... - -# This class is not exposed. It calls itself _ctypes.PyCStructType. -@type_check_only -class _PyCStructType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - # At runtime, various attributes are created on a Structure subclass based - # on its _fields_. This method doesn't exist, but represents those - # dynamically created attributes. - def __getattr__(self, name: str) -> _CField[Any, Any, Any]: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class Structure(_CData, metaclass=_PyCStructType): - _fields_: ClassVar[Sequence[tuple[str, type[_CDataType]] | tuple[str, type[_CDataType], int]]] - _pack_: ClassVar[int] - _anonymous_: ClassVar[Sequence[str]] - if sys.version_info >= (3, 13): - _align_: ClassVar[int] - - if sys.version_info >= (3, 14): - # _layout_ can be defined by the user, but is not always present. - _layout_: ClassVar[Literal["ms", "gcc-sysv"]] - - def __init__(self, *args: Any, **kw: Any) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any) -> None: ... - -# This class is not exposed. It calls itself _ctypes.PyCArrayType. -@type_check_only -class _PyCArrayType(_CTypeBaseType): - def from_address(self: type[_typeshed.Self], value: int, /) -> _typeshed.Self: ... - def from_buffer(self: type[_typeshed.Self], obj: WriteableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_buffer_copy(self: type[_typeshed.Self], buffer: ReadableBuffer, offset: int = 0, /) -> _typeshed.Self: ... - def from_param(self: type[_typeshed.Self], value: Any, /) -> _typeshed.Self | _CArgObject: ... - def in_dll(self: type[_typeshed.Self], dll: CDLL, name: str, /) -> _typeshed.Self: ... - if sys.version_info < (3, 13): - # Inherited from CType_Type starting on 3.13 - def __mul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def __rmul__(cls: type[_CT], other: int) -> type[Array[_CT]]: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - -class Array(_CData, Generic[_CT], metaclass=_PyCArrayType): - @property - @abstractmethod - def _length_(self) -> int: ... - @_length_.setter - def _length_(self, value: int) -> None: ... - - @property - @abstractmethod - def _type_(self) -> type[_CT]: ... - @_type_.setter - def _type_(self, value: type[_CT]) -> None: ... - - # Note: only available if _CT == c_char - @property - def raw(self) -> bytes: ... - @raw.setter - def raw(self, value: ReadableBuffer) -> None: ... - - value: Any # Note: bytes if _CT == c_char, str if _CT == c_wchar, unavailable otherwise - # TODO: These methods cannot be annotated correctly at the moment. - # All of these "Any"s stand for the array's element type, but it's not possible to use _CT - # here, because of a special feature of ctypes. - # By default, when accessing an element of an Array[_CT], the returned object has type _CT. - # However, when _CT is a "simple type" like c_int, ctypes automatically "unboxes" the object - # and converts it to the corresponding Python primitive. For example, when accessing an element - # of an Array[c_int], a Python int object is returned, not a c_int. - # This behavior does *not* apply to subclasses of "simple types". - # If MyInt is a subclass of c_int, then accessing an element of an Array[MyInt] returns - # a MyInt, not an int. - # This special behavior is not easy to model in a stub, so for now all places where - # the array element type would belong are annotated with Any instead. - def __init__(self, *args: Any) -> None: ... - - @overload - def __getitem__(self, key: int, /) -> Any: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None], /) -> list[Any]: ... - - @overload - def __setitem__(self, key: int, value: Any, /) -> None: ... - @overload - def __setitem__(self, key: slice[SupportsIndex | None], value: Iterable[Any], /) -> None: ... - - def __iter__(self) -> Iterator[Any]: ... - # Can't inherit from Sized because the metaclass conflict between - # Sized and _CData prevents using _CDataMeta. - def __len__(self) -> int: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def addressof(obj: _CData | _CDataType, /) -> int: ... -def alignment(obj_or_type: _CData | _CDataType | type[_CData | _CDataType], /) -> int: ... -def get_errno() -> int: ... -def resize(obj: _CData | _CDataType, size: int, /) -> None: ... -def set_errno(value: int, /) -> int: ... -def sizeof(obj_or_type: _CData | _CDataType | type[_CData | _CDataType], /) -> int: ... -def PyObj_FromPtr(address: int, /) -> Any: ... -def Py_DECREF(o: _T, /) -> _T: ... -def Py_INCREF(o: _T, /) -> _T: ... -def buffer_info(o: _CData | _CDataType | type[_CData | _CDataType], /) -> tuple[str, int, tuple[int, ...]]: ... -def call_cdeclfunction(address: int, arguments: tuple[Any, ...], /) -> Any: ... -def call_function(address: int, arguments: tuple[Any, ...], /) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_curses.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_curses.vpi deleted file mode 100644 index fcd0da4c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_curses.vpi +++ /dev/null @@ -1,583 +0,0 @@ -import sys -from _typeshed import ReadOnlyBuffer, SupportsRead, SupportsWrite -from curses import _ncurses_version -from typing import Any, Final, TypeAlias, final, overload - -# NOTE: This module is ordinarily only available on Unix, but the windows-curses -# package makes it available on Windows as well with the same contents. - -# Handled by PyCurses_ConvertToChtype in _cursesmodule.c. -_ChType: TypeAlias = str | bytes | int - -# ACS codes are only initialized after initscr is called -ACS_BBSS: Final[int] -ACS_BLOCK: Final[int] -ACS_BOARD: Final[int] -ACS_BSBS: Final[int] -ACS_BSSB: Final[int] -ACS_BSSS: Final[int] -ACS_BTEE: Final[int] -ACS_BULLET: Final[int] -ACS_CKBOARD: Final[int] -ACS_DARROW: Final[int] -ACS_DEGREE: Final[int] -ACS_DIAMOND: Final[int] -ACS_GEQUAL: Final[int] -ACS_HLINE: Final[int] -ACS_LANTERN: Final[int] -ACS_LARROW: Final[int] -ACS_LEQUAL: Final[int] -ACS_LLCORNER: Final[int] -ACS_LRCORNER: Final[int] -ACS_LTEE: Final[int] -ACS_NEQUAL: Final[int] -ACS_PI: Final[int] -ACS_PLMINUS: Final[int] -ACS_PLUS: Final[int] -ACS_RARROW: Final[int] -ACS_RTEE: Final[int] -ACS_S1: Final[int] -ACS_S3: Final[int] -ACS_S7: Final[int] -ACS_S9: Final[int] -ACS_SBBS: Final[int] -ACS_SBSB: Final[int] -ACS_SBSS: Final[int] -ACS_SSBB: Final[int] -ACS_SSBS: Final[int] -ACS_SSSB: Final[int] -ACS_SSSS: Final[int] -ACS_STERLING: Final[int] -ACS_TTEE: Final[int] -ACS_UARROW: Final[int] -ACS_ULCORNER: Final[int] -ACS_URCORNER: Final[int] -ACS_VLINE: Final[int] -ALL_MOUSE_EVENTS: Final[int] -A_ALTCHARSET: Final[int] -A_ATTRIBUTES: Final[int] -A_BLINK: Final[int] -A_BOLD: Final[int] -A_CHARTEXT: Final[int] -A_COLOR: Final[int] -A_DIM: Final[int] -A_HORIZONTAL: Final[int] -A_INVIS: Final[int] -A_ITALIC: Final[int] -A_LEFT: Final[int] -A_LOW: Final[int] -A_NORMAL: Final[int] -A_PROTECT: Final[int] -A_REVERSE: Final[int] -A_RIGHT: Final[int] -A_STANDOUT: Final[int] -A_TOP: Final[int] -A_UNDERLINE: Final[int] -A_VERTICAL: Final[int] -BUTTON1_CLICKED: Final[int] -BUTTON1_DOUBLE_CLICKED: Final[int] -BUTTON1_PRESSED: Final[int] -BUTTON1_RELEASED: Final[int] -BUTTON1_TRIPLE_CLICKED: Final[int] -BUTTON2_CLICKED: Final[int] -BUTTON2_DOUBLE_CLICKED: Final[int] -BUTTON2_PRESSED: Final[int] -BUTTON2_RELEASED: Final[int] -BUTTON2_TRIPLE_CLICKED: Final[int] -BUTTON3_CLICKED: Final[int] -BUTTON3_DOUBLE_CLICKED: Final[int] -BUTTON3_PRESSED: Final[int] -BUTTON3_RELEASED: Final[int] -BUTTON3_TRIPLE_CLICKED: Final[int] -BUTTON4_CLICKED: Final[int] -BUTTON4_DOUBLE_CLICKED: Final[int] -BUTTON4_PRESSED: Final[int] -BUTTON4_RELEASED: Final[int] -BUTTON4_TRIPLE_CLICKED: Final[int] -# Darwin ncurses doesn't provide BUTTON5_* constants prior to 3.12.10 and 3.13.3 -if sys.version_info >= (3, 12) or sys.platform != "darwin": - BUTTON5_PRESSED: Final[int] - BUTTON5_RELEASED: Final[int] - BUTTON5_CLICKED: Final[int] - BUTTON5_DOUBLE_CLICKED: Final[int] - BUTTON5_TRIPLE_CLICKED: Final[int] -BUTTON_ALT: Final[int] -BUTTON_CTRL: Final[int] -BUTTON_SHIFT: Final[int] -COLOR_BLACK: Final[int] -COLOR_BLUE: Final[int] -COLOR_CYAN: Final[int] -COLOR_GREEN: Final[int] -COLOR_MAGENTA: Final[int] -COLOR_RED: Final[int] -COLOR_WHITE: Final[int] -COLOR_YELLOW: Final[int] -ERR: Final[int] -KEY_A1: Final[int] -KEY_A3: Final[int] -KEY_B2: Final[int] -KEY_BACKSPACE: Final[int] -KEY_BEG: Final[int] -KEY_BREAK: Final[int] -KEY_BTAB: Final[int] -KEY_C1: Final[int] -KEY_C3: Final[int] -KEY_CANCEL: Final[int] -KEY_CATAB: Final[int] -KEY_CLEAR: Final[int] -KEY_CLOSE: Final[int] -KEY_COMMAND: Final[int] -KEY_COPY: Final[int] -KEY_CREATE: Final[int] -KEY_CTAB: Final[int] -KEY_DC: Final[int] -KEY_DL: Final[int] -KEY_DOWN: Final[int] -KEY_EIC: Final[int] -KEY_END: Final[int] -KEY_ENTER: Final[int] -KEY_EOL: Final[int] -KEY_EOS: Final[int] -KEY_EXIT: Final[int] -KEY_F0: Final[int] -KEY_F1: Final[int] -KEY_F10: Final[int] -KEY_F11: Final[int] -KEY_F12: Final[int] -KEY_F13: Final[int] -KEY_F14: Final[int] -KEY_F15: Final[int] -KEY_F16: Final[int] -KEY_F17: Final[int] -KEY_F18: Final[int] -KEY_F19: Final[int] -KEY_F2: Final[int] -KEY_F20: Final[int] -KEY_F21: Final[int] -KEY_F22: Final[int] -KEY_F23: Final[int] -KEY_F24: Final[int] -KEY_F25: Final[int] -KEY_F26: Final[int] -KEY_F27: Final[int] -KEY_F28: Final[int] -KEY_F29: Final[int] -KEY_F3: Final[int] -KEY_F30: Final[int] -KEY_F31: Final[int] -KEY_F32: Final[int] -KEY_F33: Final[int] -KEY_F34: Final[int] -KEY_F35: Final[int] -KEY_F36: Final[int] -KEY_F37: Final[int] -KEY_F38: Final[int] -KEY_F39: Final[int] -KEY_F4: Final[int] -KEY_F40: Final[int] -KEY_F41: Final[int] -KEY_F42: Final[int] -KEY_F43: Final[int] -KEY_F44: Final[int] -KEY_F45: Final[int] -KEY_F46: Final[int] -KEY_F47: Final[int] -KEY_F48: Final[int] -KEY_F49: Final[int] -KEY_F5: Final[int] -KEY_F50: Final[int] -KEY_F51: Final[int] -KEY_F52: Final[int] -KEY_F53: Final[int] -KEY_F54: Final[int] -KEY_F55: Final[int] -KEY_F56: Final[int] -KEY_F57: Final[int] -KEY_F58: Final[int] -KEY_F59: Final[int] -KEY_F6: Final[int] -KEY_F60: Final[int] -KEY_F61: Final[int] -KEY_F62: Final[int] -KEY_F63: Final[int] -KEY_F7: Final[int] -KEY_F8: Final[int] -KEY_F9: Final[int] -KEY_FIND: Final[int] -KEY_HELP: Final[int] -KEY_HOME: Final[int] -KEY_IC: Final[int] -KEY_IL: Final[int] -KEY_LEFT: Final[int] -KEY_LL: Final[int] -KEY_MARK: Final[int] -KEY_MAX: Final[int] -KEY_MESSAGE: Final[int] -KEY_MIN: Final[int] -KEY_MOUSE: Final[int] -KEY_MOVE: Final[int] -KEY_NEXT: Final[int] -KEY_NPAGE: Final[int] -KEY_OPEN: Final[int] -KEY_OPTIONS: Final[int] -KEY_PPAGE: Final[int] -KEY_PREVIOUS: Final[int] -KEY_PRINT: Final[int] -KEY_REDO: Final[int] -KEY_REFERENCE: Final[int] -KEY_REFRESH: Final[int] -KEY_REPLACE: Final[int] -KEY_RESET: Final[int] -KEY_RESIZE: Final[int] -KEY_RESTART: Final[int] -KEY_RESUME: Final[int] -KEY_RIGHT: Final[int] -KEY_SAVE: Final[int] -KEY_SBEG: Final[int] -KEY_SCANCEL: Final[int] -KEY_SCOMMAND: Final[int] -KEY_SCOPY: Final[int] -KEY_SCREATE: Final[int] -KEY_SDC: Final[int] -KEY_SDL: Final[int] -KEY_SELECT: Final[int] -KEY_SEND: Final[int] -KEY_SEOL: Final[int] -KEY_SEXIT: Final[int] -KEY_SF: Final[int] -KEY_SFIND: Final[int] -KEY_SHELP: Final[int] -KEY_SHOME: Final[int] -KEY_SIC: Final[int] -KEY_SLEFT: Final[int] -KEY_SMESSAGE: Final[int] -KEY_SMOVE: Final[int] -KEY_SNEXT: Final[int] -KEY_SOPTIONS: Final[int] -KEY_SPREVIOUS: Final[int] -KEY_SPRINT: Final[int] -KEY_SR: Final[int] -KEY_SREDO: Final[int] -KEY_SREPLACE: Final[int] -KEY_SRESET: Final[int] -KEY_SRIGHT: Final[int] -KEY_SRSUME: Final[int] -KEY_SSAVE: Final[int] -KEY_SSUSPEND: Final[int] -KEY_STAB: Final[int] -KEY_SUNDO: Final[int] -KEY_SUSPEND: Final[int] -KEY_UNDO: Final[int] -KEY_UP: Final[int] -OK: Final[int] -REPORT_MOUSE_POSITION: Final[int] -_C_API: Any -version: Final[bytes] - -def baudrate() -> int: ... -def beep() -> None: ... -def can_change_color() -> bool: ... -def cbreak(flag: bool = True, /) -> None: ... -def color_content(color_number: int, /) -> tuple[int, int, int]: ... -def color_pair(pair_number: int, /) -> int: ... -def curs_set(visibility: int, /) -> int: ... -def def_prog_mode() -> None: ... -def def_shell_mode() -> None: ... -def delay_output(ms: int, /) -> None: ... -def doupdate() -> None: ... -def echo(flag: bool = True, /) -> None: ... -def endwin() -> None: ... -def erasechar() -> bytes: ... -def filter() -> None: ... -def flash() -> None: ... -def flushinp() -> None: ... -def get_escdelay() -> int: ... -def get_tabsize() -> int: ... -def getmouse() -> tuple[int, int, int, int, int]: ... -def getsyx() -> tuple[int, int]: ... -def getwin(file: SupportsRead[bytes], /) -> window: ... -def halfdelay(tenths: int, /) -> None: ... -def has_colors() -> bool: ... -def has_extended_color_support() -> bool: ... - -if sys.version_info >= (3, 14): - def assume_default_colors(fg: int, bg: int, /) -> None: ... - -def has_ic() -> bool: ... -def has_il() -> bool: ... -def has_key(key: int, /) -> bool: ... -def init_color(color_number: int, r: int, g: int, b: int, /) -> None: ... -def init_pair(pair_number: int, fg: int, bg: int, /) -> None: ... -def initscr() -> window: ... -def intrflush(flag: bool, /) -> None: ... -def is_term_resized(nlines: int, ncols: int, /) -> bool: ... -def isendwin() -> bool: ... -def keyname(key: int, /) -> bytes: ... -def killchar() -> bytes: ... -def longname() -> bytes: ... -def meta(yes: bool, /) -> None: ... -def mouseinterval(interval: int, /) -> None: ... -def mousemask(newmask: int, /) -> tuple[int, int]: ... -def napms(ms: int, /) -> int: ... -def newpad(nlines: int, ncols: int, /) -> window: ... -def newwin(nlines: int, ncols: int, begin_y: int = 0, begin_x: int = 0, /) -> window: ... -def nl(flag: bool = True, /) -> None: ... -def nocbreak() -> None: ... -def noecho() -> None: ... -def nonl() -> None: ... -def noqiflush() -> None: ... -def noraw() -> None: ... -def pair_content(pair_number: int, /) -> tuple[int, int]: ... -def pair_number(attr: int, /) -> int: ... -def putp(string: ReadOnlyBuffer, /) -> None: ... -def qiflush(flag: bool = True, /) -> None: ... -def raw(flag: bool = True, /) -> None: ... -def reset_prog_mode() -> None: ... -def reset_shell_mode() -> None: ... -def resetty() -> None: ... -def resize_term(nlines: int, ncols: int, /) -> None: ... -def resizeterm(nlines: int, ncols: int, /) -> None: ... -def savetty() -> None: ... -def set_escdelay(ms: int, /) -> None: ... -def set_tabsize(size: int, /) -> None: ... -def setsyx(y: int, x: int, /) -> None: ... -def setupterm(term: str | None = None, fd: int = -1) -> None: ... -def start_color() -> None: ... -def termattrs() -> int: ... -def termname() -> bytes: ... -def tigetflag(capname: str, /) -> int: ... -def tigetnum(capname: str, /) -> int: ... -def tigetstr(capname: str, /) -> bytes | None: ... -def tparm( - str: ReadOnlyBuffer, - i1: int = 0, - i2: int = 0, - i3: int = 0, - i4: int = 0, - i5: int = 0, - i6: int = 0, - i7: int = 0, - i8: int = 0, - i9: int = 0, - /, -) -> bytes: ... -def typeahead(fd: int, /) -> None: ... -def unctrl(ch: _ChType, /) -> bytes: ... -def unget_wch(ch: int | str, /) -> None: ... -def ungetch(ch: _ChType, /) -> None: ... -def ungetmouse(id: int, x: int, y: int, z: int, bstate: int, /) -> None: ... -def update_lines_cols() -> None: ... -def use_default_colors() -> None: ... -def use_env(flag: bool, /) -> None: ... - -class error(Exception): ... - -@final -class window: # undocumented - encoding: str - - @overload - def addch(self, ch: _ChType, attr: int = ...) -> None: ... - @overload - def addch(self, y: int, x: int, ch: _ChType, attr: int = ...) -> None: ... - - @overload - def addnstr(self, str: str, n: int, attr: int = ...) -> None: ... - @overload - def addnstr(self, y: int, x: int, str: str, n: int, attr: int = ...) -> None: ... - - @overload - def addstr(self, str: str, attr: int = ...) -> None: ... - @overload - def addstr(self, y: int, x: int, str: str, attr: int = ...) -> None: ... - - def attroff(self, attr: int, /) -> None: ... - def attron(self, attr: int, /) -> None: ... - def attrset(self, attr: int, /) -> None: ... - def bkgd(self, ch: _ChType, attr: int = 0, /) -> None: ... - def bkgdset(self, ch: _ChType, attr: int = 0, /) -> None: ... - def border( - self, - ls: _ChType = ..., - rs: _ChType = ..., - ts: _ChType = ..., - bs: _ChType = ..., - tl: _ChType = ..., - tr: _ChType = ..., - bl: _ChType = ..., - br: _ChType = ..., - ) -> None: ... - - @overload - def box(self) -> None: ... - @overload - def box(self, vertch: _ChType = 0, horch: _ChType = 0) -> None: ... - - @overload - def chgat(self, attr: int) -> None: ... - @overload - def chgat(self, num: int, attr: int) -> None: ... - @overload - def chgat(self, y: int, x: int, attr: int) -> None: ... - @overload - def chgat(self, y: int, x: int, num: int, attr: int) -> None: ... - - def clear(self) -> None: ... - def clearok(self, flag: bool, /) -> None: ... - def clrtobot(self) -> None: ... - def clrtoeol(self) -> None: ... - def cursyncup(self) -> None: ... - - @overload - def delch(self) -> None: ... - @overload - def delch(self, y: int, x: int) -> None: ... - - def deleteln(self) -> None: ... - - @overload - def derwin(self, begin_y: int, begin_x: int) -> window: ... - @overload - def derwin(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> window: ... - - def echochar(self, ch: _ChType, attr: int = 0, /) -> None: ... - def enclose(self, y: int, x: int, /) -> bool: ... - def erase(self) -> None: ... - def getbegyx(self) -> tuple[int, int]: ... - def getbkgd(self) -> tuple[int, int]: ... - - @overload - def getch(self) -> int: ... - @overload - def getch(self, y: int, x: int) -> int: ... - - @overload - def get_wch(self) -> int | str: ... - @overload - def get_wch(self, y: int, x: int) -> int | str: ... - - @overload - def getkey(self) -> str: ... - @overload - def getkey(self, y: int, x: int) -> str: ... - - def getmaxyx(self) -> tuple[int, int]: ... - def getparyx(self) -> tuple[int, int]: ... - - @overload - def getstr(self) -> bytes: ... - @overload - def getstr(self, n: int) -> bytes: ... - @overload - def getstr(self, y: int, x: int) -> bytes: ... - @overload - def getstr(self, y: int, x: int, n: int) -> bytes: ... - - def getyx(self) -> tuple[int, int]: ... - - @overload - def hline(self, ch: _ChType, n: int) -> None: ... - @overload - def hline(self, y: int, x: int, ch: _ChType, n: int) -> None: ... - - def idcok(self, flag: bool, /) -> None: ... - def idlok(self, flag: bool, /) -> None: ... - def immedok(self, flag: bool, /) -> None: ... - - @overload - def inch(self) -> int: ... - @overload - def inch(self, y: int, x: int) -> int: ... - - @overload - def insch(self, ch: _ChType, attr: int = ...) -> None: ... - @overload - def insch(self, y: int, x: int, ch: _ChType, attr: int = ...) -> None: ... - - def insdelln(self, nlines: int, /) -> None: ... - def insertln(self) -> None: ... - - @overload - def insnstr(self, str: str, n: int, attr: int = ...) -> None: ... - @overload - def insnstr(self, y: int, x: int, str: str, n: int, attr: int = ...) -> None: ... - - @overload - def insstr(self, str: str, attr: int = ...) -> None: ... - @overload - def insstr(self, y: int, x: int, str: str, attr: int = ...) -> None: ... - - @overload - def instr(self, n: int = 2047) -> bytes: ... - @overload - def instr(self, y: int, x: int, n: int = 2047) -> bytes: ... - - def is_linetouched(self, line: int, /) -> bool: ... - def is_wintouched(self) -> bool: ... - def keypad(self, flag: bool, /) -> None: ... - def leaveok(self, flag: bool, /) -> None: ... - def move(self, new_y: int, new_x: int, /) -> None: ... - def mvderwin(self, y: int, x: int, /) -> None: ... - def mvwin(self, new_y: int, new_x: int, /) -> None: ... - def nodelay(self, flag: bool, /) -> None: ... - def notimeout(self, flag: bool, /) -> None: ... - - @overload - def noutrefresh(self) -> None: ... - @overload - def noutrefresh(self, pminrow: int, pmincol: int, sminrow: int, smincol: int, smaxrow: int, smaxcol: int) -> None: ... - - @overload - def overlay(self, destwin: window) -> None: ... - @overload - def overlay( - self, destwin: window, sminrow: int, smincol: int, dminrow: int, dmincol: int, dmaxrow: int, dmaxcol: int - ) -> None: ... - - @overload - def overwrite(self, destwin: window) -> None: ... - @overload - def overwrite( - self, destwin: window, sminrow: int, smincol: int, dminrow: int, dmincol: int, dmaxrow: int, dmaxcol: int - ) -> None: ... - - def putwin(self, file: SupportsWrite[bytes], /) -> None: ... - def redrawln(self, beg: int, num: int, /) -> None: ... - def redrawwin(self) -> None: ... - - @overload - def refresh(self) -> None: ... - @overload - def refresh(self, pminrow: int, pmincol: int, sminrow: int, smincol: int, smaxrow: int, smaxcol: int) -> None: ... - - def resize(self, nlines: int, ncols: int, /) -> None: ... - def scroll(self, lines: int = 1) -> None: ... - def scrollok(self, flag: bool, /) -> None: ... - def setscrreg(self, top: int, bottom: int, /) -> None: ... - def standend(self) -> None: ... - def standout(self) -> None: ... - - @overload - def subpad(self, begin_y: int, begin_x: int) -> window: ... - @overload - def subpad(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> window: ... - - @overload - def subwin(self, begin_y: int, begin_x: int) -> window: ... - @overload - def subwin(self, nlines: int, ncols: int, begin_y: int, begin_x: int) -> window: ... - - def syncdown(self) -> None: ... - def syncok(self, flag: bool, /) -> None: ... - def syncup(self) -> None: ... - def timeout(self, delay: int, /) -> None: ... - def touchline(self, start: int, count: int, changed: bool = True) -> None: ... - def touchwin(self) -> None: ... - def untouchwin(self) -> None: ... - - @overload - def vline(self, ch: _ChType, n: int) -> None: ... - @overload - def vline(self, y: int, x: int, ch: _ChType, n: int) -> None: ... - -ncurses_version: _ncurses_version diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_curses_panel.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_curses_panel.vpi deleted file mode 100644 index a552a151..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_curses_panel.vpi +++ /dev/null @@ -1,27 +0,0 @@ -from _curses import window -from typing import Final, final - -__version__: Final[str] -version: Final[str] - -class error(Exception): ... - -@final -class panel: - def above(self) -> panel: ... - def below(self) -> panel: ... - def bottom(self) -> None: ... - def hidden(self) -> bool: ... - def hide(self) -> None: ... - def move(self, y: int, x: int, /) -> None: ... - def replace(self, win: window, /) -> None: ... - def set_userptr(self, obj: object, /) -> None: ... - def show(self) -> None: ... - def top(self) -> None: ... - def userptr(self) -> object: ... - def window(self) -> window: ... - -def bottom_panel() -> panel: ... -def new_panel(win: window, /) -> panel: ... -def top_panel() -> panel: ... -def update_panels() -> panel: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_dbm.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_dbm.vpi deleted file mode 100644 index 29d9b4c2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_dbm.vpi +++ /dev/null @@ -1,46 +0,0 @@ -import sys -from _typeshed import ReadOnlyBuffer, StrOrBytesPath -from types import TracebackType -from typing import Final, TypeAlias, TypeVar, final, overload, type_check_only -from typing_extensions import Self - -if sys.platform != "win32": - _T = TypeVar("_T") - _KeyType: TypeAlias = str | ReadOnlyBuffer - _ValueType: TypeAlias = str | ReadOnlyBuffer - - class error(OSError): ... - library: Final[str] - - # Actual typename dbm, not exposed by the implementation - @final - @type_check_only - class _dbm: - def close(self) -> None: ... - if sys.version_info >= (3, 13): - def clear(self) -> None: ... - - def __getitem__(self, item: _KeyType) -> bytes: ... - def __setitem__(self, key: _KeyType, value: _ValueType) -> None: ... - def __delitem__(self, key: _KeyType) -> None: ... - def __len__(self) -> int: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - - @overload - def get(self, k: _KeyType, /) -> bytes | None: ... - @overload - def get(self, k: _KeyType, default: _T, /) -> bytes | _T: ... - - def keys(self) -> list[bytes]: ... - def setdefault(self, k: _KeyType, default: _ValueType = b"", /) -> bytes: ... - # This isn't true, but the class can't be instantiated. See #13024 - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - if sys.version_info >= (3, 11): - def open(filename: StrOrBytesPath, flags: str = "r", mode: int = 0o666, /) -> _dbm: ... - else: - def open(filename: str, flags: str = "r", mode: int = 0o666, /) -> _dbm: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_decimal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_decimal.vpi deleted file mode 100644 index 75d5be27..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_decimal.vpi +++ /dev/null @@ -1,73 +0,0 @@ -import sys -from decimal import ( - Clamped as Clamped, - Context as Context, - ConversionSyntax as ConversionSyntax, - Decimal as Decimal, - DecimalException as DecimalException, - DecimalTuple as DecimalTuple, - DivisionByZero as DivisionByZero, - DivisionImpossible as DivisionImpossible, - DivisionUndefined as DivisionUndefined, - FloatOperation as FloatOperation, - Inexact as Inexact, - InvalidContext as InvalidContext, - InvalidOperation as InvalidOperation, - Overflow as Overflow, - Rounded as Rounded, - Subnormal as Subnormal, - Underflow as Underflow, - _ContextManager, -) -from typing import Final, TypeAlias - -_TrapType: TypeAlias = type[DecimalException] - -__version__: Final[str] -__libmpdec_version__: Final[str] -if sys.version_info >= (3, 15): - SPEC_VERSION: Final[str] - -ROUND_DOWN: Final = "ROUND_DOWN" -ROUND_HALF_UP: Final = "ROUND_HALF_UP" -ROUND_HALF_EVEN: Final = "ROUND_HALF_EVEN" -ROUND_CEILING: Final = "ROUND_CEILING" -ROUND_FLOOR: Final = "ROUND_FLOOR" -ROUND_UP: Final = "ROUND_UP" -ROUND_HALF_DOWN: Final = "ROUND_HALF_DOWN" -ROUND_05UP: Final = "ROUND_05UP" -HAVE_CONTEXTVAR: Final[bool] -HAVE_THREADS: Final[bool] -MAX_EMAX: Final[int] -MAX_PREC: Final[int] -MIN_EMIN: Final[int] -MIN_ETINY: Final[int] -if sys.version_info >= (3, 14): - IEEE_CONTEXT_MAX_BITS: Final[int] - -def setcontext(context: Context, /) -> None: ... -def getcontext() -> Context: ... - -if sys.version_info >= (3, 11): - def localcontext( - ctx: Context | None = None, - *, - prec: int | None = None, - rounding: str | None = None, - Emin: int | None = None, - Emax: int | None = None, - capitals: int | None = None, - clamp: int | None = None, - traps: dict[_TrapType, bool] | None = None, - flags: dict[_TrapType, bool] | None = None, - ) -> _ContextManager: ... - -else: - def localcontext(ctx: Context | None = None) -> _ContextManager: ... - -if sys.version_info >= (3, 14): - def IEEEContext(bits: int, /) -> Context: ... - -DefaultContext: Context -BasicContext: Context -ExtendedContext: Context diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib.vpi deleted file mode 100644 index 172da452..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib.vpi +++ /dev/null @@ -1,115 +0,0 @@ -import importlib.abc -import importlib.machinery -import sys -import types -from _typeshed.importlib import LoaderProtocol -from collections.abc import Mapping, Sequence -from types import ModuleType -from typing import Any, ClassVar -from typing_extensions import deprecated - -# Signature of `builtins.__import__` should be kept identical to `importlib.__import__` -def __import__( - name: str, - globals: Mapping[str, object] | None = None, - locals: Mapping[str, object] | None = None, - fromlist: Sequence[str] | None = (), - level: int = 0, -) -> ModuleType: ... -def spec_from_loader( - name: str, loader: LoaderProtocol | None, *, origin: str | None = None, is_package: bool | None = None -) -> importlib.machinery.ModuleSpec | None: ... -def module_from_spec(spec: importlib.machinery.ModuleSpec) -> types.ModuleType: ... -def _init_module_attrs( - spec: importlib.machinery.ModuleSpec, module: types.ModuleType, *, override: bool = False -) -> types.ModuleType: ... - -class ModuleSpec: - def __init__( - self, - name: str, - loader: importlib.abc.Loader | None, - *, - origin: str | None = None, - loader_state: Any = None, - is_package: bool | None = None, - ) -> None: ... - name: str - loader: importlib.abc.Loader | None - origin: str | None - submodule_search_locations: list[str] | None - loader_state: Any - cached: str | None - @property - def parent(self) -> str | None: ... - has_location: bool - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -class BuiltinImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): - # MetaPathFinder - if sys.version_info < (3, 12): - @classmethod - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `find_spec()` instead.") - def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... - - @classmethod - def find_spec( - cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None - ) -> ModuleSpec | None: ... - # InspectLoader - @classmethod - def is_package(cls, fullname: str) -> bool: ... - @classmethod - def load_module(cls, fullname: str) -> types.ModuleType: ... - @classmethod - def get_code(cls, fullname: str) -> None: ... - @classmethod - def get_source(cls, fullname: str) -> None: ... - # Loader - if sys.version_info < (3, 12): - @staticmethod - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "The module spec is now used by the import machinery to generate a module repr." - ) - def module_repr(module: types.ModuleType) -> str: ... - - @staticmethod - def create_module(spec: ModuleSpec) -> types.ModuleType | None: ... - @staticmethod - def exec_module(module: types.ModuleType) -> None: ... - -class FrozenImporter(importlib.abc.MetaPathFinder, importlib.abc.InspectLoader): - # MetaPathFinder - if sys.version_info < (3, 12): - @classmethod - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `find_spec()` instead.") - def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... - - @classmethod - def find_spec( - cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None - ) -> ModuleSpec | None: ... - # InspectLoader - @classmethod - def is_package(cls, fullname: str) -> bool: ... - @classmethod - def load_module(cls, fullname: str) -> types.ModuleType: ... - @classmethod - def get_code(cls, fullname: str) -> None: ... - @classmethod - def get_source(cls, fullname: str) -> None: ... - # Loader - if sys.version_info < (3, 12): - @staticmethod - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "The module spec is now used by the import machinery to generate a module repr." - ) - def module_repr(m: types.ModuleType) -> str: ... - - @staticmethod - def create_module(spec: ModuleSpec) -> types.ModuleType | None: ... - @staticmethod - def exec_module(module: types.ModuleType) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib_external.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib_external.vpi deleted file mode 100644 index 907e8def..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_frozen_importlib_external.vpi +++ /dev/null @@ -1,180 +0,0 @@ -import _ast -import importlib.abc -import importlib.machinery -import importlib.readers -import sys -import types -from _typeshed import ReadableBuffer, StrOrBytesPath, StrPath -from _typeshed.importlib import LoaderProtocol -from collections.abc import Callable, Iterable, Mapping, MutableSequence, Sequence -from importlib.machinery import ModuleSpec -from importlib.metadata import DistributionFinder, PathDistribution -from typing import Any, Final, Literal, overload -from typing_extensions import deprecated - -if sys.platform == "win32": - path_separators: Literal["\\/"] - path_sep: Literal["\\"] - path_sep_tuple: tuple[Literal["\\"], Literal["/"]] -else: - path_separators: Literal["/"] - path_sep: Literal["/"] - path_sep_tuple: tuple[Literal["/"]] - -MAGIC_NUMBER: Final[bytes] - -@overload -@deprecated( - "The `debug_override` parameter is deprecated since Python 3.5; will be removed in Python 3.15. Use `optimization` instead." -) -def cache_from_source(path: StrPath, debug_override: bool, *, optimization: None = None) -> str: ... -@overload -def cache_from_source(path: StrPath, debug_override: None = None, *, optimization: Any | None = None) -> str: ... - -def source_from_cache(path: StrPath) -> str: ... -def decode_source(source_bytes: ReadableBuffer) -> str: ... -def spec_from_file_location( - name: str, - location: StrOrBytesPath | None = None, - *, - loader: LoaderProtocol | None = None, - submodule_search_locations: list[str] | None = ..., -) -> importlib.machinery.ModuleSpec | None: ... - -@deprecated( - "Deprecated since Python 3.6. Use site configuration instead. " - "Future versions of Python may not enable this finder by default." -) -class WindowsRegistryFinder(importlib.abc.MetaPathFinder): - if sys.version_info < (3, 12): - @classmethod - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `find_spec()` instead.") - def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... - - @classmethod - def find_spec( - cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None - ) -> ModuleSpec | None: ... - -class PathFinder(importlib.abc.MetaPathFinder): - @staticmethod - def invalidate_caches() -> None: ... - @staticmethod - def find_distributions(context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ... - @classmethod - def find_spec( - cls, fullname: str, path: Sequence[str] | None = None, target: types.ModuleType | None = None - ) -> ModuleSpec | None: ... - if sys.version_info < (3, 12): - @classmethod - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `find_spec()` instead.") - def find_module(cls, fullname: str, path: Sequence[str] | None = None) -> importlib.abc.Loader | None: ... - -SOURCE_SUFFIXES: Final[list[str]] -DEBUG_BYTECODE_SUFFIXES: Final = [".pyc"] -OPTIMIZED_BYTECODE_SUFFIXES: Final = [".pyc"] -BYTECODE_SUFFIXES: Final = [".pyc"] -EXTENSION_SUFFIXES: Final[list[str]] - -class FileFinder(importlib.abc.PathEntryFinder): - path: str - def __init__(self, path: str, *loader_details: tuple[type[importlib.abc.Loader], list[str]]) -> None: ... - @classmethod - def path_hook( - cls, *loader_details: tuple[type[importlib.abc.Loader], list[str]] - ) -> Callable[[str], importlib.abc.PathEntryFinder]: ... - -class _LoaderBasics: - def is_package(self, fullname: str) -> bool: ... - def create_module(self, spec: ModuleSpec) -> types.ModuleType | None: ... - def exec_module(self, module: types.ModuleType) -> None: ... - def load_module(self, fullname: str) -> types.ModuleType: ... - -class SourceLoader(_LoaderBasics): - def path_mtime(self, path: str) -> float: ... - def set_data(self, path: str, data: bytes) -> None: ... - def get_source(self, fullname: str) -> str | None: ... - def path_stats(self, path: str) -> Mapping[str, Any]: ... - def source_to_code( - self, data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, path: bytes | StrPath - ) -> types.CodeType: ... - def get_code(self, fullname: str) -> types.CodeType | None: ... - -class FileLoader: - name: str - path: str - def __init__(self, fullname: str, path: str) -> None: ... - def get_data(self, path: str) -> bytes: ... - def get_filename(self, fullname: str | None = None) -> str: ... - def load_module(self, fullname: str | None = None) -> types.ModuleType: ... - def get_resource_reader(self, name: str | None = None) -> importlib.readers.FileReader: ... - -class SourceFileLoader(importlib.abc.FileLoader, FileLoader, importlib.abc.SourceLoader, SourceLoader): # type: ignore[misc] # incompatible method arguments in base classes - def set_data(self, path: str, data: ReadableBuffer, *, _mode: int = 0o666) -> None: ... - def path_stats(self, path: str) -> Mapping[str, Any]: ... - def source_to_code( # type: ignore[override] # incompatible with InspectLoader.source_to_code - self, - data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, - path: bytes | StrPath, - *, - _optimize: int = -1, - ) -> types.CodeType: ... - -class SourcelessFileLoader(importlib.abc.FileLoader, FileLoader, _LoaderBasics): - def get_code(self, fullname: str) -> types.CodeType | None: ... - def get_source(self, fullname: str) -> None: ... - -class ExtensionFileLoader(FileLoader, _LoaderBasics, importlib.abc.ExecutionLoader): - def __init__(self, name: str, path: str) -> None: ... - def get_filename(self, fullname: str | None = None) -> str: ... - def get_source(self, fullname: str) -> None: ... - def create_module(self, spec: ModuleSpec) -> types.ModuleType: ... - def exec_module(self, module: types.ModuleType) -> None: ... - def get_code(self, fullname: str) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -if sys.version_info >= (3, 11): - class NamespaceLoader(importlib.abc.InspectLoader): - def __init__( - self, name: str, path: MutableSequence[str], path_finder: Callable[[str, tuple[str, ...]], ModuleSpec] - ) -> None: ... - def is_package(self, fullname: str) -> Literal[True]: ... - def get_source(self, fullname: str) -> Literal[""]: ... - def get_code(self, fullname: str) -> types.CodeType: ... - def create_module(self, spec: ModuleSpec) -> None: ... - def exec_module(self, module: types.ModuleType) -> None: ... - @deprecated("Deprecated since Python 3.10; will be removed in Python 3.15. Use `exec_module()` instead.") - def load_module(self, fullname: str) -> types.ModuleType: ... - def get_resource_reader(self, module: types.ModuleType) -> importlib.readers.NamespaceReader: ... - if sys.version_info < (3, 12): - @staticmethod - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "The module spec is now used by the import machinery to generate a module repr." - ) - def module_repr(module: types.ModuleType) -> str: ... - - _NamespaceLoader = NamespaceLoader -else: - class _NamespaceLoader: - def __init__( - self, name: str, path: MutableSequence[str], path_finder: Callable[[str, tuple[str, ...]], ModuleSpec] - ) -> None: ... - def is_package(self, fullname: str) -> Literal[True]: ... - def get_source(self, fullname: str) -> Literal[""]: ... - def get_code(self, fullname: str) -> types.CodeType: ... - def create_module(self, spec: ModuleSpec) -> None: ... - def exec_module(self, module: types.ModuleType) -> None: ... - @deprecated("Deprecated since Python 3.10; will be removed in Python 3.15. Use `exec_module()` instead.") - def load_module(self, fullname: str) -> types.ModuleType: ... - @staticmethod - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "The module spec is now used by the import machinery to generate a module repr." - ) - def module_repr(module: types.ModuleType) -> str: ... - def get_resource_reader(self, module: types.ModuleType) -> importlib.readers.NamespaceReader: ... - -if sys.version_info >= (3, 13): - class AppleFrameworkLoader(ExtensionFileLoader, importlib.abc.ExecutionLoader): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_gdbm.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_gdbm.vpi deleted file mode 100644 index b7a01a45..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_gdbm.vpi +++ /dev/null @@ -1,50 +0,0 @@ -import sys -from _typeshed import ReadOnlyBuffer, StrOrBytesPath -from types import TracebackType -from typing import TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self - -if sys.platform != "win32": - _T = TypeVar("_T") - _KeyType: TypeAlias = str | ReadOnlyBuffer - _ValueType: TypeAlias = str | ReadOnlyBuffer - - open_flags: str - - class error(OSError): ... - # Actual typename gdbm, not exposed by the implementation - @type_check_only - class _gdbm: - def firstkey(self) -> bytes | None: ... - def nextkey(self, key: _KeyType) -> bytes | None: ... - def reorganize(self) -> None: ... - def sync(self) -> None: ... - def close(self) -> None: ... - if sys.version_info >= (3, 13): - def clear(self) -> None: ... - - def __getitem__(self, item: _KeyType) -> bytes: ... - def __setitem__(self, key: _KeyType, value: _ValueType) -> None: ... - def __delitem__(self, key: _KeyType) -> None: ... - def __contains__(self, key: _KeyType) -> bool: ... - def __len__(self) -> int: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - - @overload - def get(self, k: _KeyType) -> bytes | None: ... - @overload - def get(self, k: _KeyType, default: _T) -> bytes | _T: ... - - def keys(self) -> list[bytes]: ... - def setdefault(self, k: _KeyType, default: _ValueType = ...) -> bytes: ... - # Don't exist at runtime - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - if sys.version_info >= (3, 11): - def open(filename: StrOrBytesPath, flags: str = "r", mode: int = 0o666, /) -> _gdbm: ... - else: - def open(filename: str, flags: str = "r", mode: int = 0o666, /) -> _gdbm: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_hashlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_hashlib.vpi deleted file mode 100644 index b98edc57..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_hashlib.vpi +++ /dev/null @@ -1,127 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from collections.abc import Callable -from types import ModuleType -from typing import AnyStr, Protocol, TypeAlias, final, overload, type_check_only -from typing_extensions import Self, disjoint_base - -_DigestMod: TypeAlias = str | Callable[[], _HashObject] | ModuleType | None - -openssl_md_meth_names: frozenset[str] - -@type_check_only -class _HashObject(Protocol): - @property - def digest_size(self) -> int: ... - @property - def block_size(self) -> int: ... - @property - def name(self) -> str: ... - def copy(self) -> Self: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def update(self, obj: ReadableBuffer, /) -> None: ... - -@disjoint_base -class HASH: - @property - def digest_size(self) -> int: ... - @property - def block_size(self) -> int: ... - @property - def name(self) -> str: ... - def copy(self) -> Self: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def update(self, obj: ReadableBuffer, /) -> None: ... - -class UnsupportedDigestmodError(ValueError): ... - -class HASHXOF(HASH): - def digest(self, length: int) -> bytes: ... # type: ignore[override] - def hexdigest(self, length: int) -> str: ... # type: ignore[override] - -@final -class HMAC: - @property - def digest_size(self) -> int: ... - @property - def block_size(self) -> int: ... - @property - def name(self) -> str: ... - def copy(self) -> Self: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def update(self, msg: ReadableBuffer) -> None: ... - -@overload -def compare_digest(a: ReadableBuffer, b: ReadableBuffer, /) -> bool: ... -@overload -def compare_digest(a: AnyStr, b: AnyStr, /) -> bool: ... - -def get_fips_mode() -> int: ... -def hmac_new(key: ReadableBuffer, msg: ReadableBuffer = b"", digestmod: _DigestMod = None) -> HMAC: ... - -if sys.version_info >= (3, 13): - def new( - name: str, data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_md5( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha1( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha224( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha256( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha384( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha512( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha3_224( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha3_256( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha3_384( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_sha3_512( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASH: ... - def openssl_shake_128( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASHXOF: ... - def openssl_shake_256( - data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None - ) -> HASHXOF: ... - -else: - def new(name: str, string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_md5(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha1(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha3_224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha3_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha3_384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_sha3_512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - def openssl_shake_128(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ... - def openssl_shake_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ... - -def hmac_digest(key: ReadableBuffer, msg: ReadableBuffer, digest: str) -> bytes: ... -def pbkdf2_hmac( - hash_name: str, password: ReadableBuffer, salt: ReadableBuffer, iterations: int, dklen: int | None = None -) -> bytes: ... -def scrypt( - password: ReadableBuffer, *, salt: ReadableBuffer, n: int, r: int, p: int, maxmem: int = 0, dklen: int = 64 -) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_heapq.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_heapq.vpi deleted file mode 100644 index 7664b826..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_heapq.vpi +++ /dev/null @@ -1,18 +0,0 @@ -import sys -from _typeshed import SupportsRichComparisonT as _T # All type variable use in this module requires comparability. -from typing import Final - -__about__: Final[str] - -def heapify(heap: list[_T], /) -> None: ... # To work around the fact that list is invariant -def heappop(heap: list[_T], /) -> _T: ... -def heappush(heap: list[_T], item: _T, /) -> None: ... -def heappushpop(heap: list[_T], item: _T, /) -> _T: ... -def heapreplace(heap: list[_T], item: _T, /) -> _T: ... - -if sys.version_info >= (3, 14): - def heapify_max(heap: list[_T], /) -> None: ... - def heappop_max(heap: list[_T], /) -> _T: ... - def heappush_max(heap: list[_T], item: _T, /) -> None: ... - def heappushpop_max(heap: list[_T], item: _T, /) -> _T: ... - def heapreplace_max(heap: list[_T], item: _T, /) -> _T: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_imp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_imp.vpi deleted file mode 100644 index c12c26d0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_imp.vpi +++ /dev/null @@ -1,30 +0,0 @@ -import sys -import types -from _typeshed import ReadableBuffer -from importlib.machinery import ModuleSpec -from typing import Any - -check_hash_based_pycs: str -if sys.version_info >= (3, 14): - pyc_magic_number_token: int - -def source_hash(key: int, source: ReadableBuffer) -> bytes: ... -def create_builtin(spec: ModuleSpec, /) -> types.ModuleType: ... -def create_dynamic(spec: ModuleSpec, file: Any = None, /) -> types.ModuleType: ... -def acquire_lock() -> None: ... -def exec_builtin(mod: types.ModuleType, /) -> int: ... -def exec_dynamic(mod: types.ModuleType, /) -> int: ... -def extension_suffixes() -> list[str]: ... -def init_frozen(name: str, /) -> types.ModuleType: ... -def is_builtin(name: str, /) -> int: ... -def is_frozen(name: str, /) -> bool: ... -def is_frozen_package(name: str, /) -> bool: ... -def lock_held() -> bool: ... -def release_lock() -> None: ... - -if sys.version_info >= (3, 11): - def find_frozen(name: str, /, *, withdata: bool = False) -> tuple[memoryview | None, bool, str | None] | None: ... - def get_frozen_object(name: str, data: ReadableBuffer | None = None, /) -> types.CodeType: ... - -else: - def get_frozen_object(name: str, /) -> types.CodeType: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpchannels.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_interpchannels.vpi deleted file mode 100644 index a631a6f1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpchannels.vpi +++ /dev/null @@ -1,86 +0,0 @@ -from _typeshed import structseq -from typing import Any, Final, Literal, SupportsIndex, final -from typing_extensions import Buffer, Self - -class ChannelError(RuntimeError): ... -class ChannelClosedError(ChannelError): ... -class ChannelEmptyError(ChannelError): ... -class ChannelNotEmptyError(ChannelError): ... -class ChannelNotFoundError(ChannelError): ... - -# Mark as final, since instantiating ChannelID is not supported. -@final -class ChannelID: - @property - def end(self) -> Literal["send", "recv", "both"]: ... - @property - def send(self) -> Self: ... - @property - def recv(self) -> Self: ... - def __eq__(self, other: object, /) -> bool: ... - def __ge__(self, other: ChannelID, /) -> bool: ... - def __gt__(self, other: ChannelID, /) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __le__(self, other: ChannelID, /) -> bool: ... - def __lt__(self, other: ChannelID, /) -> bool: ... - def __ne__(self, other: object, /) -> bool: ... - -@final -class ChannelInfo(structseq[int], tuple[bool, bool, bool, int, int, int, int, int]): - __match_args__: Final = ( - "open", - "closing", - "closed", - "count", - "num_interp_send", - "num_interp_send_released", - "num_interp_recv", - "num_interp_recv_released", - ) - @property - def open(self) -> bool: ... - @property - def closing(self) -> bool: ... - @property - def closed(self) -> bool: ... - @property - def count(self) -> int: ... # type: ignore[override] - @property - def num_interp_send(self) -> int: ... - @property - def num_interp_send_released(self) -> int: ... - @property - def num_interp_recv(self) -> int: ... - @property - def num_interp_recv_released(self) -> int: ... - @property - def num_interp_both(self) -> int: ... - @property - def num_interp_both_recv_released(self) -> int: ... - @property - def num_interp_both_send_released(self) -> int: ... - @property - def num_interp_both_released(self) -> int: ... - @property - def recv_associated(self) -> bool: ... - @property - def recv_released(self) -> bool: ... - @property - def send_associated(self) -> bool: ... - @property - def send_released(self) -> bool: ... - -def create(unboundop: Literal[1, 2, 3]) -> ChannelID: ... -def destroy(cid: SupportsIndex) -> None: ... -def list_all() -> list[ChannelID]: ... -def list_interpreters(cid: SupportsIndex, *, send: bool) -> list[int]: ... -def send(cid: SupportsIndex, obj: object, *, blocking: bool = True, timeout: float | None = None) -> None: ... -def send_buffer(cid: SupportsIndex, obj: Buffer, *, blocking: bool = True, timeout: float | None = None) -> None: ... -def recv(cid: SupportsIndex, default: object = ...) -> tuple[Any, Literal[1, 2, 3]]: ... -def close(cid: SupportsIndex, *, send: bool = False, recv: bool = False) -> None: ... -def get_count(cid: SupportsIndex) -> int: ... -def get_info(cid: SupportsIndex) -> ChannelInfo: ... -def get_channel_defaults(cid: SupportsIndex) -> Literal[1, 2, 3]: ... -def release(cid: SupportsIndex, *, send: bool = False, recv: bool = False, force: bool = False) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpqueues.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_interpqueues.vpi deleted file mode 100644 index 94605e4c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpqueues.vpi +++ /dev/null @@ -1,31 +0,0 @@ -import sys -from typing import Any, Literal, SupportsIndex, TypeAlias - -_UnboundOp: TypeAlias = Literal[1, 2, 3] - -class QueueError(RuntimeError): ... -class QueueNotFoundError(QueueError): ... - -def bind(qid: SupportsIndex) -> None: ... - -if sys.version_info >= (3, 15): - def create(maxsize: SupportsIndex, unboundop: SupportsIndex = -1, fallback: SupportsIndex = -1) -> int: ... - -else: - def create(maxsize: SupportsIndex, fmt: SupportsIndex, unboundop: _UnboundOp) -> int: ... - -def destroy(qid: SupportsIndex) -> None: ... -def get(qid: SupportsIndex) -> tuple[Any, int, _UnboundOp | None]: ... -def get_count(qid: SupportsIndex) -> int: ... -def get_maxsize(qid: SupportsIndex) -> int: ... -def get_queue_defaults(qid: SupportsIndex) -> tuple[int, _UnboundOp]: ... -def is_full(qid: SupportsIndex) -> bool: ... -def list_all() -> list[tuple[int, int, _UnboundOp]]: ... - -if sys.version_info >= (3, 15): - def put(qid: SupportsIndex, obj: Any, unboundop: SupportsIndex = -1, fallback: SupportsIndex = -1) -> None: ... - -else: - def put(qid: SupportsIndex, obj: Any, fmt: SupportsIndex, unboundop: _UnboundOp) -> None: ... - -def release(qid: SupportsIndex) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpreters.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_interpreters.vpi deleted file mode 100644 index 38856692..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_interpreters.vpi +++ /dev/null @@ -1,62 +0,0 @@ -import types -from collections.abc import Callable -from typing import Any, Final, Literal, SupportsIndex, TypeAlias, TypeVar, overload -from typing_extensions import disjoint_base - -_R = TypeVar("_R") - -_Configs: TypeAlias = Literal["default", "isolated", "legacy", "empty", ""] -_SharedDict: TypeAlias = dict[str, Any] # many objects can be shared - -class InterpreterError(Exception): ... -class InterpreterNotFoundError(InterpreterError): ... -class NotShareableError(ValueError): ... - -@disjoint_base -class CrossInterpreterBufferView: - def __buffer__(self, flags: int, /) -> memoryview: ... - -def new_config(name: _Configs = "isolated", /, **overides: object) -> types.SimpleNamespace: ... -def create(config: types.SimpleNamespace | _Configs | None = "isolated", *, reqrefs: bool = False) -> int: ... -def destroy(id: SupportsIndex, *, restrict: bool = False) -> None: ... -def list_all(*, require_ready: bool = False) -> list[tuple[int, _Whence]]: ... -def get_current() -> tuple[int, _Whence]: ... -def get_main() -> tuple[int, _Whence]: ... -def is_running(id: SupportsIndex, *, restrict: bool = False) -> bool: ... -def get_config(id: SupportsIndex, *, restrict: bool = False) -> types.SimpleNamespace: ... -def whence(id: SupportsIndex) -> _Whence: ... -def exec( - id: SupportsIndex, code: str | types.CodeType | Callable[[], object], shared: _SharedDict = {}, *, restrict: bool = False -) -> None | types.SimpleNamespace: ... -def call( - id: SupportsIndex, - callable: Callable[..., _R], - args: tuple[Any, ...] = (), - kwargs: dict[str, Any] = {}, - *, - preserve_exc: bool = False, - restrict: bool = False, -) -> tuple[_R, types.SimpleNamespace]: ... -def run_string( - id: SupportsIndex, script: str | types.CodeType | Callable[[], object], shared: _SharedDict = {}, *, restrict: bool = False -) -> None: ... -def run_func( - id: SupportsIndex, func: types.CodeType | Callable[[], object], shared: _SharedDict = {}, *, restrict: bool = False -) -> None: ... -def set___main___attrs(id: SupportsIndex, updates: _SharedDict, *, restrict: bool = False) -> None: ... -def incref(id: SupportsIndex, *, implieslink: bool = False, restrict: bool = False) -> None: ... -def decref(id: SupportsIndex, *, restrict: bool = False) -> None: ... -def is_shareable(obj: object) -> bool: ... - -@overload -def capture_exception(exc: BaseException) -> types.SimpleNamespace: ... -@overload -def capture_exception(exc: None = None) -> types.SimpleNamespace | None: ... - -_Whence: TypeAlias = Literal[0, 1, 2, 3, 4, 5] -WHENCE_UNKNOWN: Final = 0 -WHENCE_RUNTIME: Final = 1 -WHENCE_LEGACY_CAPI: Final = 2 -WHENCE_CAPI: Final = 3 -WHENCE_XI: Final = 4 -WHENCE_STDLIB: Final = 5 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_json.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_json.vpi deleted file mode 100644 index c6c2c97e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_json.vpi +++ /dev/null @@ -1,59 +0,0 @@ -import sys -from collections.abc import Callable -from typing import Any, final -from typing_extensions import Self - -@final -class make_encoder: - @property - def sort_keys(self) -> bool: ... - @property - def skipkeys(self) -> bool: ... - @property - def key_separator(self) -> str: ... - @property - def indent(self) -> str | None: ... - @property - def markers(self) -> dict[int, Any] | None: ... - @property - def default(self) -> Callable[[Any], Any]: ... - @property - def encoder(self) -> Callable[[str], str]: ... - @property - def item_separator(self) -> str: ... - def __new__( - cls, - markers: dict[int, Any] | None, - default: Callable[[Any], Any], - encoder: Callable[[str], str], - indent: str | None, - key_separator: str, - item_separator: str, - sort_keys: bool, - skipkeys: bool, - allow_nan: bool, - ) -> Self: ... - def __call__(self, obj: object, _current_indent_level: int) -> Any: ... - -@final -class make_scanner: - if sys.version_info >= (3, 15): - array_hook: Any - object_hook: Any - object_pairs_hook: Any - parse_int: Any - parse_constant: Any - parse_float: Any - strict: bool - # TODO: 'context' needs the attrs above (ducktype), but not __call__. - def __new__(cls, context: make_scanner) -> Self: ... - def __call__(self, string: str, index: int) -> tuple[Any, int]: ... - -def encode_basestring(s: str, /) -> str: ... -def encode_basestring_ascii(s: str, /) -> str: ... - -if sys.version_info >= (3, 15): - def scanstring(pystr: str, end: int, strict: bool = True, /) -> tuple[str, int]: ... - -else: - def scanstring(string: str, end: int, strict: bool = True) -> tuple[str, int]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_locale.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_locale.vpi deleted file mode 100644 index ccce7a0d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_locale.vpi +++ /dev/null @@ -1,121 +0,0 @@ -import sys -from _typeshed import StrPath -from typing import Final, Literal, TypedDict, type_check_only - -@type_check_only -class _LocaleConv(TypedDict): - decimal_point: str - grouping: list[int] - thousands_sep: str - int_curr_symbol: str - currency_symbol: str - p_cs_precedes: Literal[0, 1, 127] - n_cs_precedes: Literal[0, 1, 127] - p_sep_by_space: Literal[0, 1, 127] - n_sep_by_space: Literal[0, 1, 127] - mon_decimal_point: str - frac_digits: int - int_frac_digits: int - mon_thousands_sep: str - mon_grouping: list[int] - positive_sign: str - negative_sign: str - p_sign_posn: Literal[0, 1, 2, 3, 4, 127] - n_sign_posn: Literal[0, 1, 2, 3, 4, 127] - -LC_CTYPE: Final[int] -LC_COLLATE: Final[int] -LC_TIME: Final[int] -LC_MONETARY: Final[int] -LC_NUMERIC: Final[int] -LC_ALL: Final[int] -CHAR_MAX: Final = 127 - -def setlocale(category: int, locale: str | None = None, /) -> str: ... -def localeconv() -> _LocaleConv: ... - -if sys.version_info >= (3, 11): - def getencoding() -> str: ... - -def strcoll(os1: str, os2: str, /) -> int: ... -def strxfrm(string: str, /) -> str: ... - -# native gettext functions -# https://docs.python.org/3/library/locale.html#access-to-message-catalogs -# https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Modules/_localemodule.c#L626 -if sys.platform != "win32": - LC_MESSAGES: int - - ABDAY_1: Final[int] - ABDAY_2: Final[int] - ABDAY_3: Final[int] - ABDAY_4: Final[int] - ABDAY_5: Final[int] - ABDAY_6: Final[int] - ABDAY_7: Final[int] - - ABMON_1: Final[int] - ABMON_2: Final[int] - ABMON_3: Final[int] - ABMON_4: Final[int] - ABMON_5: Final[int] - ABMON_6: Final[int] - ABMON_7: Final[int] - ABMON_8: Final[int] - ABMON_9: Final[int] - ABMON_10: Final[int] - ABMON_11: Final[int] - ABMON_12: Final[int] - - DAY_1: Final[int] - DAY_2: Final[int] - DAY_3: Final[int] - DAY_4: Final[int] - DAY_5: Final[int] - DAY_6: Final[int] - DAY_7: Final[int] - - ERA: Final[int] - ERA_D_T_FMT: Final[int] - ERA_D_FMT: Final[int] - ERA_T_FMT: Final[int] - - MON_1: Final[int] - MON_2: Final[int] - MON_3: Final[int] - MON_4: Final[int] - MON_5: Final[int] - MON_6: Final[int] - MON_7: Final[int] - MON_8: Final[int] - MON_9: Final[int] - MON_10: Final[int] - MON_11: Final[int] - MON_12: Final[int] - - CODESET: Final[int] - D_T_FMT: Final[int] - D_FMT: Final[int] - T_FMT: Final[int] - T_FMT_AMPM: Final[int] - AM_STR: Final[int] - PM_STR: Final[int] - - RADIXCHAR: Final[int] - THOUSEP: Final[int] - YESEXPR: Final[int] - NOEXPR: Final[int] - CRNCYSTR: Final[int] - ALT_DIGITS: Final[int] - - def nl_langinfo(key: int, /) -> str: ... - - # This is dependent on `libintl.h` which is a part of `gettext` - # system dependency. These functions might be missing. - # But, we always say that they are present. - def gettext(msg: str, /) -> str: ... - def dgettext(domain: str | None, msg: str, /) -> str: ... - def dcgettext(domain: str | None, msg: str, category: int, /) -> str: ... - def textdomain(domain: str | None, /) -> str: ... - def bindtextdomain(domain: str, dir: StrPath | None, /) -> str: ... - def bind_textdomain_codeset(domain: str, codeset: str | None, /) -> str | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_lsprof.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_lsprof.vpi deleted file mode 100644 index d04c2a74..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_lsprof.vpi +++ /dev/null @@ -1,34 +0,0 @@ -from _typeshed import structseq -from collections.abc import Callable -from types import CodeType -from typing import Any, Final, final -from typing_extensions import disjoint_base - -@disjoint_base -class Profiler: - def __init__( - self, timer: Callable[[], float] | None = None, timeunit: float = 0.0, subcalls: bool = True, builtins: bool = True - ) -> None: ... - def getstats(self) -> list[profiler_entry]: ... - def enable(self, subcalls: bool = True, builtins: bool = True) -> None: ... - def disable(self) -> None: ... - def clear(self) -> None: ... - -@final -class profiler_entry(structseq[Any], tuple[CodeType | str, int, int, float, float, list[profiler_subentry]]): - __match_args__: Final = ("code", "callcount", "reccallcount", "totaltime", "inlinetime", "calls") - code: CodeType | str - callcount: int - reccallcount: int - totaltime: float - inlinetime: float - calls: list[profiler_subentry] - -@final -class profiler_subentry(structseq[Any], tuple[CodeType | str, int, int, float, float]): - __match_args__: Final = ("code", "callcount", "reccallcount", "totaltime", "inlinetime") - code: CodeType | str - callcount: int - reccallcount: int - totaltime: float - inlinetime: float diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_lzma.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_lzma.vpi deleted file mode 100644 index 83cd8fd7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_lzma.vpi +++ /dev/null @@ -1,71 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from collections.abc import Mapping, Sequence -from typing import Any, Final, TypeAlias, final -from typing_extensions import Self - -_FilterChain: TypeAlias = Sequence[Mapping[str, Any]] - -FORMAT_AUTO: Final = 0 -FORMAT_XZ: Final = 1 -FORMAT_ALONE: Final = 2 -FORMAT_RAW: Final = 3 -CHECK_NONE: Final = 0 -CHECK_CRC32: Final = 1 -CHECK_CRC64: Final = 4 -CHECK_SHA256: Final = 10 -CHECK_ID_MAX: Final = 15 -CHECK_UNKNOWN: Final = 16 -FILTER_LZMA1: Final[int] # v big number -FILTER_LZMA2: Final = 33 -FILTER_DELTA: Final = 3 -FILTER_X86: Final = 4 -FILTER_IA64: Final = 6 -FILTER_ARM: Final = 7 -FILTER_ARMTHUMB: Final = 8 -FILTER_SPARC: Final = 9 -FILTER_POWERPC: Final = 5 -MF_HC3: Final = 3 -MF_HC4: Final = 4 -MF_BT2: Final = 18 -MF_BT3: Final = 19 -MF_BT4: Final = 20 -MODE_FAST: Final = 1 -MODE_NORMAL: Final = 2 -PRESET_DEFAULT: Final = 6 -PRESET_EXTREME: Final[int] # v big number - -@final -class LZMADecompressor: - if sys.version_info >= (3, 12): - def __new__(cls, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None) -> Self: ... - else: - def __init__(self, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None) -> None: ... - - def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes: ... - @property - def check(self) -> int: ... - @property - def eof(self) -> bool: ... - @property - def unused_data(self) -> bytes: ... - @property - def needs_input(self) -> bool: ... - -@final -class LZMACompressor: - if sys.version_info >= (3, 12): - def __new__( - cls, format: int = 1, check: int = -1, preset: int | None = None, filters: _FilterChain | None = None - ) -> Self: ... - else: - def __init__( - self, format: int = 1, check: int = -1, preset: int | None = None, filters: _FilterChain | None = None - ) -> None: ... - - def compress(self, data: ReadableBuffer, /) -> bytes: ... - def flush(self) -> bytes: ... - -class LZMAError(Exception): ... - -def is_check_supported(check_id: int, /) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_markupbase.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_markupbase.vpi deleted file mode 100644 index acc3ccac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_markupbase.vpi +++ /dev/null @@ -1,10 +0,0 @@ -class ParserBase: - def reset(self) -> None: ... - def getpos(self) -> tuple[int, int]: ... - def unknown_decl(self, data: str) -> None: ... - def parse_comment(self, i: int, report: bool = True) -> int: ... # undocumented - def parse_declaration(self, i: int) -> int: ... # undocumented - def parse_marked_section(self, i: int, report: bool = True) -> int: ... # undocumented - def updatepos(self, i: int, j: int) -> int: ... # undocumented - lineno: int # undocumented - offset: int # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_msi.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_msi.vpi deleted file mode 100644 index e5b40881..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_msi.vpi +++ /dev/null @@ -1,97 +0,0 @@ -import sys -from typing import Final, type_check_only - -if sys.platform == "win32": - class MSIError(Exception): ... - # Actual typename View, not exposed by the implementation - @type_check_only - class _View: - def Execute(self, params: _Record | None = ...) -> None: ... - def GetColumnInfo(self, kind: int) -> _Record: ... - def Fetch(self) -> _Record: ... - def Modify(self, mode: int, record: _Record) -> None: ... - def Close(self) -> None: ... - # Don't exist at runtime - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - # Actual typename SummaryInformation, not exposed by the implementation - @type_check_only - class _SummaryInformation: - def GetProperty(self, field: int) -> int | bytes | None: ... - def GetPropertyCount(self) -> int: ... - def SetProperty(self, field: int, value: int | str) -> None: ... - def Persist(self) -> None: ... - # Don't exist at runtime - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - # Actual typename Database, not exposed by the implementation - @type_check_only - class _Database: - def OpenView(self, sql: str) -> _View: ... - def Commit(self) -> None: ... - def GetSummaryInformation(self, updateCount: int) -> _SummaryInformation: ... - def Close(self) -> None: ... - # Don't exist at runtime - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - # Actual typename Record, not exposed by the implementation - @type_check_only - class _Record: - def GetFieldCount(self) -> int: ... - def GetInteger(self, field: int) -> int: ... - def GetString(self, field: int) -> str: ... - def SetString(self, field: int, str: str) -> None: ... - def SetStream(self, field: int, stream: str) -> None: ... - def SetInteger(self, field: int, int: int) -> None: ... - def ClearData(self) -> None: ... - # Don't exist at runtime - __new__: None # type: ignore[assignment] - __init__: None # type: ignore[assignment] - - def UuidCreate() -> str: ... - def FCICreate(cabname: str, files: list[tuple[str, str]], /) -> None: ... - def OpenDatabase(path: str, persist: int, /) -> _Database: ... - def CreateRecord(count: int, /) -> _Record: ... - - MSICOLINFO_NAMES: Final[int] - MSICOLINFO_TYPES: Final[int] - MSIDBOPEN_CREATE: Final[int] - MSIDBOPEN_CREATEDIRECT: Final[int] - MSIDBOPEN_DIRECT: Final[int] - MSIDBOPEN_PATCHFILE: Final[int] - MSIDBOPEN_READONLY: Final[int] - MSIDBOPEN_TRANSACT: Final[int] - MSIMODIFY_ASSIGN: Final[int] - MSIMODIFY_DELETE: Final[int] - MSIMODIFY_INSERT: Final[int] - MSIMODIFY_INSERT_TEMPORARY: Final[int] - MSIMODIFY_MERGE: Final[int] - MSIMODIFY_REFRESH: Final[int] - MSIMODIFY_REPLACE: Final[int] - MSIMODIFY_SEEK: Final[int] - MSIMODIFY_UPDATE: Final[int] - MSIMODIFY_VALIDATE: Final[int] - MSIMODIFY_VALIDATE_DELETE: Final[int] - MSIMODIFY_VALIDATE_FIELD: Final[int] - MSIMODIFY_VALIDATE_NEW: Final[int] - - PID_APPNAME: Final[int] - PID_AUTHOR: Final[int] - PID_CHARCOUNT: Final[int] - PID_CODEPAGE: Final[int] - PID_COMMENTS: Final[int] - PID_CREATE_DTM: Final[int] - PID_KEYWORDS: Final[int] - PID_LASTAUTHOR: Final[int] - PID_LASTPRINTED: Final[int] - PID_LASTSAVE_DTM: Final[int] - PID_PAGECOUNT: Final[int] - PID_REVNUMBER: Final[int] - PID_SECURITY: Final[int] - PID_SUBJECT: Final[int] - PID_TEMPLATE: Final[int] - PID_TITLE: Final[int] - PID_WORDCOUNT: Final[int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_multibytecodec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_multibytecodec.vpi deleted file mode 100644 index abe58cb6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_multibytecodec.vpi +++ /dev/null @@ -1,49 +0,0 @@ -from _typeshed import ReadableBuffer -from codecs import _ReadableStream, _WritableStream -from collections.abc import Iterable -from typing import final, type_check_only -from typing_extensions import disjoint_base - -# This class is not exposed. It calls itself _multibytecodec.MultibyteCodec. -@final -@type_check_only -class _MultibyteCodec: - def decode(self, input: ReadableBuffer, errors: str | None = None) -> str: ... - def encode(self, input: str, errors: str | None = None) -> bytes: ... - -@disjoint_base -class MultibyteIncrementalDecoder: - errors: str - def __init__(self, errors: str = "strict") -> None: ... - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - def getstate(self) -> tuple[bytes, int]: ... - def reset(self) -> None: ... - def setstate(self, state: tuple[bytes, int], /) -> None: ... - -@disjoint_base -class MultibyteIncrementalEncoder: - errors: str - def __init__(self, errors: str = "strict") -> None: ... - def encode(self, input: str, final: bool = False) -> bytes: ... - def getstate(self) -> int: ... - def reset(self) -> None: ... - def setstate(self, state: int, /) -> None: ... - -@disjoint_base -class MultibyteStreamReader: - errors: str - stream: _ReadableStream - def __init__(self, stream: _ReadableStream, errors: str = "strict") -> None: ... - def read(self, sizeobj: int | None = None, /) -> str: ... - def readline(self, sizeobj: int | None = None, /) -> str: ... - def readlines(self, sizehintobj: int | None = None, /) -> list[str]: ... - def reset(self) -> None: ... - -@disjoint_base -class MultibyteStreamWriter: - errors: str - stream: _WritableStream - def __init__(self, stream: _WritableStream, errors: str = "strict") -> None: ... - def reset(self) -> None: ... - def write(self, strobj: str, /) -> None: ... - def writelines(self, lines: Iterable[str], /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_operator.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_operator.vpi deleted file mode 100644 index 04dae79d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_operator.vpi +++ /dev/null @@ -1,157 +0,0 @@ -import sys -from _typeshed import ( - SupportsAdd, - SupportsGetItem, - SupportsMod, - SupportsMul, - SupportsRAdd, - SupportsRMod, - SupportsRMul, - SupportsRSub, - SupportsSub, -) -from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence -from operator import attrgetter as attrgetter, itemgetter as itemgetter, methodcaller as methodcaller -from typing import Any, AnyStr, ParamSpec, Protocol, SupportsAbs, SupportsIndex, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import TypeIs - -_R = TypeVar("_R") -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_T_contra = TypeVar("_T_contra", contravariant=True) -_K = TypeVar("_K") -_V = TypeVar("_V") -_P = ParamSpec("_P") - -# The following protocols return "Any" instead of bool, since the comparison -# operators can be overloaded to return an arbitrary object. For example, -# the numpy.array comparison dunders return another numpy.array. - -@type_check_only -class _SupportsDunderLT(Protocol): - def __lt__(self, other: Any, /) -> Any: ... - -@type_check_only -class _SupportsDunderGT(Protocol): - def __gt__(self, other: Any, /) -> Any: ... - -@type_check_only -class _SupportsDunderLE(Protocol): - def __le__(self, other: Any, /) -> Any: ... - -@type_check_only -class _SupportsDunderGE(Protocol): - def __ge__(self, other: Any, /) -> Any: ... - -_SupportsComparison: TypeAlias = _SupportsDunderLE | _SupportsDunderGE | _SupportsDunderGT | _SupportsDunderLT - -@type_check_only -class _SupportsInversion(Protocol[_T_co]): - def __invert__(self) -> _T_co: ... - -@type_check_only -class _SupportsNeg(Protocol[_T_co]): - def __neg__(self) -> _T_co: ... - -@type_check_only -class _SupportsPos(Protocol[_T_co]): - def __pos__(self) -> _T_co: ... - -# All four comparison functions must have the same signature, or we get false-positive errors -def lt(a: _SupportsComparison, b: _SupportsComparison, /) -> Any: ... -def le(a: _SupportsComparison, b: _SupportsComparison, /) -> Any: ... -def eq(a: object, b: object, /) -> Any: ... -def ne(a: object, b: object, /) -> Any: ... -def ge(a: _SupportsComparison, b: _SupportsComparison, /) -> Any: ... -def gt(a: _SupportsComparison, b: _SupportsComparison, /) -> Any: ... -def not_(a: object, /) -> bool: ... -def truth(a: object, /) -> bool: ... -def is_(a: object, b: object, /) -> bool: ... -def is_not(a: object, b: object, /) -> bool: ... -def abs(a: SupportsAbs[_T], /) -> _T: ... - -@overload -def add(a: SupportsAdd[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ... -@overload -def add(a: _T_contra, b: SupportsRAdd[_T_contra, _T_co], /) -> _T_co: ... - -def and_(a, b, /): ... -def floordiv(a, b, /): ... -def index(a: SupportsIndex, /) -> int: ... -def inv(a: _SupportsInversion[_T_co], /) -> _T_co: ... -def invert(a: _SupportsInversion[_T_co], /) -> _T_co: ... -def lshift(a, b, /): ... - -@overload -def mod(a: SupportsMod[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ... -@overload -def mod(a: _T_contra, b: SupportsRMod[_T_contra, _T_co], /) -> _T_co: ... - -@overload -def mul(a: SupportsMul[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ... -@overload -def mul(a: _T_contra, b: SupportsRMul[_T_contra, _T_co], /) -> _T_co: ... - -def matmul(a, b, /): ... -def neg(a: _SupportsNeg[_T_co], /) -> _T_co: ... -def or_(a, b, /): ... -def pos(a: _SupportsPos[_T_co], /) -> _T_co: ... -def pow(a, b, /): ... -def rshift(a, b, /): ... - -@overload -def sub(a: SupportsSub[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ... -@overload -def sub(a: _T_contra, b: SupportsRSub[_T_contra, _T_co], /) -> _T_co: ... - -def truediv(a, b, /): ... -def xor(a, b, /): ... -def concat(a: Sequence[_T], b: Sequence[_T], /) -> Sequence[_T]: ... -def contains(a: Container[object], b: object, /) -> bool: ... -def countOf(a: Iterable[object], b: object, /) -> int: ... - -@overload -def delitem(a: MutableSequence[Any], b: int, /) -> None: ... -@overload -def delitem(a: MutableSequence[Any], b: slice[int | None], /) -> None: ... -@overload -def delitem(a: MutableMapping[_K, Any], b: _K, /) -> None: ... - -@overload -def getitem(a: Sequence[_T], b: slice[int | None], /) -> Sequence[_T]: ... -@overload -def getitem(a: SupportsGetItem[_K, _V], b: _K, /) -> _V: ... - -def indexOf(a: Iterable[_T], b: _T, /) -> int: ... - -@overload -def setitem(a: MutableSequence[_T], b: int, c: _T, /) -> None: ... -@overload -def setitem(a: MutableSequence[_T], b: slice[int | None], c: Sequence[_T], /) -> None: ... -@overload -def setitem(a: MutableMapping[_K, _V], b: _K, c: _V, /) -> None: ... - -def length_hint(obj: object, default: int = 0, /) -> int: ... -def iadd(a, b, /): ... -def iand(a, b, /): ... -def iconcat(a, b, /): ... -def ifloordiv(a, b, /): ... -def ilshift(a, b, /): ... -def imod(a, b, /): ... -def imul(a, b, /): ... -def imatmul(a, b, /): ... -def ior(a, b, /): ... -def ipow(a, b, /): ... -def irshift(a, b, /): ... -def isub(a, b, /): ... -def itruediv(a, b, /): ... -def ixor(a, b, /): ... - -if sys.version_info >= (3, 11): - def call(obj: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ... - -def _compare_digest(a: AnyStr, b: AnyStr, /) -> bool: ... - -if sys.version_info >= (3, 14): - def is_none(a: object, /) -> TypeIs[None]: ... - def is_not_none(a: _T | None, /) -> TypeIs[_T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_osx_support.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_osx_support.vpi deleted file mode 100644 index fb00e698..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_osx_support.vpi +++ /dev/null @@ -1,34 +0,0 @@ -from collections.abc import Iterable, Sequence -from typing import Final, TypeVar - -_T = TypeVar("_T") -_K = TypeVar("_K") -_V = TypeVar("_V") - -__all__ = ["compiler_fixup", "customize_config_vars", "customize_compiler", "get_platform_osx"] - -_UNIVERSAL_CONFIG_VARS: Final[tuple[str, ...]] # undocumented -_COMPILER_CONFIG_VARS: Final[tuple[str, ...]] # undocumented -_INITPRE: Final[str] # undocumented - -def _find_executable(executable: str, path: str | None = None) -> str | None: ... # undocumented -def _read_output(commandstring: str, capture_stderr: bool = False) -> str | None: ... # undocumented -def _find_build_tool(toolname: str) -> str: ... # undocumented - -_SYSTEM_VERSION: Final[str | None] # undocumented - -def _get_system_version() -> str: ... # undocumented -def _remove_original_values(_config_vars: dict[str, str]) -> None: ... # undocumented -def _save_modified_value(_config_vars: dict[str, str], cv: str, newvalue: str) -> None: ... # undocumented -def _supports_universal_builds() -> bool: ... # undocumented -def _find_appropriate_compiler(_config_vars: dict[str, str]) -> dict[str, str]: ... # undocumented -def _remove_universal_flags(_config_vars: dict[str, str]) -> dict[str, str]: ... # undocumented -def _remove_unsupported_archs(_config_vars: dict[str, str]) -> dict[str, str]: ... # undocumented -def _override_all_archs(_config_vars: dict[str, str]) -> dict[str, str]: ... # undocumented -def _check_for_unavailable_sdk(_config_vars: dict[str, str]) -> dict[str, str]: ... # undocumented -def compiler_fixup(compiler_so: Iterable[str], cc_args: Sequence[str]) -> list[str]: ... -def customize_config_vars(_config_vars: dict[str, str]) -> dict[str, str]: ... -def customize_compiler(_config_vars: dict[str, str]) -> dict[str, str]: ... -def get_platform_osx( - _config_vars: dict[str, str], osname: _T, release: _K, machine: _V -) -> tuple[str | _T, str | _K, str | _V]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_pickle.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_pickle.vpi deleted file mode 100644 index f8411c6a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_pickle.vpi +++ /dev/null @@ -1,114 +0,0 @@ -from _typeshed import ReadableBuffer, SupportsWrite -from collections.abc import Callable, Iterable, Iterator, Mapping -from pickle import PickleBuffer as PickleBuffer -from typing import Any, Protocol, TypeAlias, type_check_only -from typing_extensions import disjoint_base - -@type_check_only -class _ReadableFileobj(Protocol): - def read(self, n: int, /) -> bytes: ... - def readline(self) -> bytes: ... - -_BufferCallback: TypeAlias = Callable[[PickleBuffer], Any] | None - -_ReducedType: TypeAlias = ( - str - | tuple[Callable[..., Any], tuple[Any, ...]] - | tuple[Callable[..., Any], tuple[Any, ...], Any] - | tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None] - | tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None, Iterator[Any] | None] -) - -def dump( - obj: Any, - file: SupportsWrite[bytes], - protocol: int | None = None, - *, - fix_imports: bool = True, - buffer_callback: _BufferCallback = None, -) -> None: ... -def dumps( - obj: Any, protocol: int | None = None, *, fix_imports: bool = True, buffer_callback: _BufferCallback = None -) -> bytes: ... -def load( - file: _ReadableFileobj, - *, - fix_imports: bool = True, - encoding: str = "ASCII", - errors: str = "strict", - buffers: Iterable[Any] | None = (), -) -> Any: ... -def loads( - data: ReadableBuffer, - /, - *, - fix_imports: bool = True, - encoding: str = "ASCII", - errors: str = "strict", - buffers: Iterable[Any] | None = (), -) -> Any: ... - -class PickleError(Exception): ... -class PicklingError(PickleError): ... -class UnpicklingError(PickleError): ... - -@type_check_only -class PicklerMemoProxy: - def clear(self, /) -> None: ... - def copy(self, /) -> dict[int, tuple[int, Any]]: ... - -@disjoint_base -class Pickler: - fast: bool - dispatch_table: Mapping[type, Callable[[Any], _ReducedType]] - bin: bool # undocumented - def __init__( - self, - file: SupportsWrite[bytes], - protocol: int | None = None, - fix_imports: bool = True, - buffer_callback: _BufferCallback = None, - ) -> None: ... - - @property - def memo(self) -> PicklerMemoProxy: ... - @memo.setter - def memo(self, value: PicklerMemoProxy | dict[int, tuple[int, Any]]) -> None: ... - - def dump(self, obj: Any, /) -> None: ... - def clear_memo(self) -> None: ... - - # this method has no default implementation for Python < 3.13 - def persistent_id(self, obj: Any, /) -> Any: ... - # The following method is not defined on _Pickler, but can be defined on - # sub-classes. Should return `NotImplemented` if pickling the supplied - # object is not supported and returns the same types as `__reduce__()`. - def reducer_override(self, obj: object, /) -> _ReducedType: ... - -@type_check_only -class UnpicklerMemoProxy: - def clear(self, /) -> None: ... - def copy(self, /) -> dict[int, tuple[int, Any]]: ... - -@disjoint_base -class Unpickler: - def __init__( - self, - file: _ReadableFileobj, - *, - fix_imports: bool = True, - encoding: str = "ASCII", - errors: str = "strict", - buffers: Iterable[Any] | None = (), - ) -> None: ... - - @property - def memo(self) -> UnpicklerMemoProxy: ... - @memo.setter - def memo(self, value: UnpicklerMemoProxy | dict[int, tuple[int, Any]]) -> None: ... - - def load(self) -> Any: ... - def find_class(self, module_name: str, global_name: str, /) -> Any: ... - - # this method has no default implementation for Python < 3.13 - def persistent_load(self, pid: Any, /) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_posixsubprocess.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_posixsubprocess.vpi deleted file mode 100644 index dd74e316..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_posixsubprocess.vpi +++ /dev/null @@ -1,59 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Sequence -from typing import SupportsIndex - -if sys.platform != "win32": - if sys.version_info >= (3, 14): - def fork_exec( - args: Sequence[StrOrBytesPath] | None, - executable_list: Sequence[bytes], - close_fds: bool, - pass_fds: tuple[int, ...], - cwd: str, - env: Sequence[bytes] | None, - p2cread: int, - p2cwrite: int, - c2pread: int, - c2pwrite: int, - errread: int, - errwrite: int, - errpipe_read: int, - errpipe_write: int, - restore_signals: int, - call_setsid: int, - pgid_to_set: int, - gid: SupportsIndex | None, - extra_groups: list[int] | None, - uid: SupportsIndex | None, - child_umask: int, - preexec_fn: Callable[[], None], - /, - ) -> int: ... - else: - def fork_exec( - args: Sequence[StrOrBytesPath] | None, - executable_list: Sequence[bytes], - close_fds: bool, - pass_fds: tuple[int, ...], - cwd: str, - env: Sequence[bytes] | None, - p2cread: int, - p2cwrite: int, - c2pread: int, - c2pwrite: int, - errread: int, - errwrite: int, - errpipe_read: int, - errpipe_write: int, - restore_signals: bool, - call_setsid: bool, - pgid_to_set: int, - gid: SupportsIndex | None, - extra_groups: list[int] | None, - uid: SupportsIndex | None, - child_umask: int, - preexec_fn: Callable[[], None], - allow_vfork: bool, - /, - ) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_py_abc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_py_abc.vpi deleted file mode 100644 index 12607174..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_py_abc.vpi +++ /dev/null @@ -1,14 +0,0 @@ -import _typeshed -from typing import Any, NewType, TypeVar - -_T = TypeVar("_T") - -_CacheToken = NewType("_CacheToken", int) - -def get_cache_token() -> _CacheToken: ... - -class ABCMeta(type): - def __new__( - mcls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], namespace: dict[str, Any], / - ) -> _typeshed.Self: ... - def register(cls, subclass: type[_T]) -> type[_T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_pydecimal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_pydecimal.vpi deleted file mode 100644 index 9fabcc64..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_pydecimal.vpi +++ /dev/null @@ -1,50 +0,0 @@ -# This is a slight lie, the implementations aren't exactly identical -# However, in all likelihood, the differences are inconsequential -import sys -from _decimal import * - -__all__ = [ - "Decimal", - "Context", - "DecimalTuple", - "DefaultContext", - "BasicContext", - "ExtendedContext", - "DecimalException", - "Clamped", - "InvalidOperation", - "DivisionByZero", - "Inexact", - "Rounded", - "Subnormal", - "Overflow", - "Underflow", - "FloatOperation", - "DivisionImpossible", - "InvalidContext", - "ConversionSyntax", - "DivisionUndefined", - "ROUND_DOWN", - "ROUND_HALF_UP", - "ROUND_HALF_EVEN", - "ROUND_CEILING", - "ROUND_FLOOR", - "ROUND_UP", - "ROUND_HALF_DOWN", - "ROUND_05UP", - "setcontext", - "getcontext", - "localcontext", - "MAX_PREC", - "MAX_EMAX", - "MIN_EMIN", - "MIN_ETINY", - "HAVE_THREADS", - "HAVE_CONTEXTVAR", -] - -if sys.version_info >= (3, 14): - __all__ += ["IEEEContext", "IEEE_CONTEXT_MAX_BITS"] - -if sys.version_info >= (3, 15): - __all__ += ["SPEC_VERSION"] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_queue.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_queue.vpi deleted file mode 100644 index edd484a9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_queue.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from types import GenericAlias -from typing import Any, Generic, TypeVar -from typing_extensions import disjoint_base - -_T = TypeVar("_T") - -class Empty(Exception): ... - -@disjoint_base -class SimpleQueue(Generic[_T]): - def __init__(self) -> None: ... - def empty(self) -> bool: ... - def get(self, block: bool = True, timeout: float | None = None) -> _T: ... - def get_nowait(self) -> _T: ... - def put(self, item: _T, block: bool = True, timeout: float | None = None) -> None: ... - def put_nowait(self, item: _T) -> None: ... - def qsize(self) -> int: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_random.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_random.vpi deleted file mode 100644 index e333b00d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_random.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import TypeAlias -from typing_extensions import disjoint_base - -# Actually Tuple[(int,) * 625] -_State: TypeAlias = tuple[int, ...] - -@disjoint_base -class Random: - def __init__(self, seed: object = ..., /) -> None: ... - def seed(self, n: object = None, /) -> None: ... - def getstate(self) -> _State: ... - def setstate(self, state: _State, /) -> None: ... - def random(self) -> float: ... - def getrandbits(self, k: int, /) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_remote_debugging.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_remote_debugging.vpi deleted file mode 100644 index b001962a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_remote_debugging.vpi +++ /dev/null @@ -1,183 +0,0 @@ -from _typeshed import StrOrBytesPath, structseq -from collections.abc import Callable -from typing import Final, TypeAlias, final -from typing_extensions import Self - -_Location: TypeAlias = tuple[int, int, int, int] | LocationInfo | None -_Frame: TypeAlias = tuple[str, _Location, str, int | None] | FrameInfo -_Stats: TypeAlias = dict[str, int | float] - -PROCESS_VM_READV_SUPPORTED: Final[int] -THREAD_STATUS_GIL_REQUESTED: Final[int] -THREAD_STATUS_HAS_EXCEPTION: Final[int] -THREAD_STATUS_HAS_GIL: Final[int] -THREAD_STATUS_MAIN_THREAD: Final[int] -THREAD_STATUS_ON_CPU: Final[int] -THREAD_STATUS_UNKNOWN: Final[int] - -@final -class LocationInfo(structseq[int], tuple[int, int, int, int]): - __match_args__: Final = ("lineno", "end_lineno", "col_offset", "end_col_offset") - @property - def lineno(self) -> int: ... - @property - def end_lineno(self) -> int: ... - @property - def col_offset(self) -> int: ... - @property - def end_col_offset(self) -> int: ... - -@final -class FrameInfo(structseq[object], tuple[str, _Location, str, int | None]): - __match_args__: Final = ("filename", "location", "funcname", "opcode") - @property - def filename(self) -> str: ... - @property - def location(self) -> _Location: ... - @property - def funcname(self) -> str: ... - @property - def opcode(self) -> int | None: ... - -@final -class CoroInfo(structseq[object], tuple[list[_Frame], int | str]): - __match_args__: Final = ("call_stack", "task_name") - @property - def call_stack(self) -> list[_Frame]: ... - @property - def task_name(self) -> int | str: ... - -@final -class TaskInfo(structseq[object], tuple[int, str, list[CoroInfo], list[CoroInfo]]): - __match_args__: Final = ("task_id", "task_name", "coroutine_stack", "awaited_by") - @property - def task_id(self) -> int: ... - @property - def task_name(self) -> str: ... - @property - def coroutine_stack(self) -> list[CoroInfo]: ... - @property - def awaited_by(self) -> list[CoroInfo]: ... - -@final -class ThreadInfo(structseq[object], tuple[int, int, list[_Frame]]): - __match_args__: Final = ("thread_id", "status", "frame_info") - @property - def thread_id(self) -> int: ... - @property - def status(self) -> int: ... - @property - def frame_info(self) -> list[_Frame]: ... - -@final -class InterpreterInfo(structseq[object], tuple[int, list[ThreadInfo]]): - __match_args__: Final = ("interpreter_id", "threads") - @property - def interpreter_id(self) -> int: ... - @property - def threads(self) -> list[ThreadInfo]: ... - -@final -class AwaitedInfo(structseq[object], tuple[int, list[TaskInfo]]): - __match_args__: Final = ("thread_id", "awaited_by") - @property - def thread_id(self) -> int: ... - @property - def awaited_by(self) -> list[TaskInfo]: ... - -@final -class GCStatsInfo(structseq[object], tuple[int, int, int, int, int, int, int, int, int, float]): - __match_args__: Final = ( - "gen", - "iid", - "ts_start", - "ts_stop", - "collections", - "collected", - "uncollectable", - "candidates", - "heap_size", - "duration", - ) - @property - def gen(self) -> int: ... - @property - def iid(self) -> int: ... - @property - def ts_start(self) -> int: ... - @property - def ts_stop(self) -> int: ... - @property - def collections(self) -> int: ... - @property - def collected(self) -> int: ... - @property - def uncollectable(self) -> int: ... - @property - def candidates(self) -> int: ... - @property - def heap_size(self) -> int: ... - @property - def duration(self) -> float: ... - -@final -class RemoteUnwinder: - def __init__( - self, - pid: int, - *, - all_threads: bool = False, - only_active_thread: bool = False, - mode: int = 0, - debug: bool = False, - skip_non_matching_threads: bool = True, - native: bool = False, - gc: bool = False, - opcodes: bool = False, - cache_frames: bool = False, - stats: bool = False, - ) -> None: ... - def get_stack_trace(self) -> list[InterpreterInfo]: ... - def get_all_awaited_by(self) -> list[AwaitedInfo]: ... - def get_async_stack_trace(self) -> list[AwaitedInfo]: ... - def get_stats(self) -> _Stats: ... - def pause_threads(self) -> bool: ... - def resume_threads(self) -> bool: ... - -@final -class GCMonitor: - def __init__(self, pid: int, *, debug: bool = False) -> None: ... - def get_gc_stats(self, all_interpreters: bool = False) -> list[GCStatsInfo]: ... - -@final -class BinaryWriter: - def __init__( - self, filename: StrOrBytesPath, sample_interval_us: int, start_time_us: int, *, compression: int = 0 - ) -> None: ... - @property - def total_samples(self) -> int: ... - def write_sample(self, stack_frames: list[InterpreterInfo], timestamp_us: int) -> None: ... - def finalize(self) -> None: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc_type: object = None, exc_val: object = None, exc_tb: object = None) -> bool: ... - def get_stats(self) -> _Stats: ... - -@final -class BinaryReader: - def __init__(self, filename: StrOrBytesPath) -> None: ... - @property - def sample_count(self) -> int: ... - @property - def sample_interval_us(self) -> int: ... - def replay(self, collector: object, progress_callback: Callable[[int, int], object] | None = None) -> int: ... - def get_info(self) -> dict[str, object]: ... - def get_stats(self) -> _Stats: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc_type: object = None, exc_val: object = None, exc_tb: object = None) -> bool: ... - -def zstd_available() -> bool: ... -def get_child_pids(pid: int, *, recursive: bool = True) -> list[int]: ... -def is_python_process(pid: int) -> bool: ... -def get_gc_stats(pid: int, *, all_interpreters: bool = False) -> list[GCStatsInfo]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_socket.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_socket.vpi deleted file mode 100644 index 4450d46e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_socket.vpi +++ /dev/null @@ -1,966 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, WriteableBuffer -from collections.abc import Iterable -from socket import error as error, gaierror as gaierror, herror as herror, timeout as timeout -from typing import Any, Final, SupportsIndex, TypeAlias, overload -from typing_extensions import CapsuleType, disjoint_base - -_CMSG: TypeAlias = tuple[int, int, bytes] -_CMSGArg: TypeAlias = tuple[int, int, ReadableBuffer] - -# Addresses can be either tuples of varying lengths (AF_INET, AF_INET6, -# AF_NETLINK, AF_TIPC) or strings/buffers (AF_UNIX). -# See getsockaddrarg() in socketmodule.c. -if sys.version_info >= (3, 14): - # A bare int is accepted for Bluetooth HCI device IDs. - _Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer | int -else: - _Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer -_RetAddress: TypeAlias = Any - -# ===== Constants ===== -# This matches the order in the CPython documentation -# https://docs.python.org/3/library/socket.html#constants - -if sys.platform != "win32": - AF_UNIX: Final[int] - -AF_INET: Final[int] -AF_INET6: Final[int] - -AF_UNSPEC: Final[int] - -SOCK_STREAM: Final[int] -SOCK_DGRAM: Final[int] -SOCK_RAW: Final[int] -SOCK_RDM: Final[int] -SOCK_SEQPACKET: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 2.6.27 - SOCK_CLOEXEC: Final[int] - SOCK_NONBLOCK: Final[int] - -# -------------------- -# Many constants of these forms, documented in the Unix documentation on -# sockets and/or the IP protocol, are also defined in the socket module. -# SO_* -# socket.SOMAXCONN -# MSG_* -# SOL_* -# SCM_* -# IPPROTO_* -# IPPORT_* -# INADDR_* -# IP_* -# IPV6_* -# EAI_* -# AI_* -# NI_* -# TCP_* -# -------------------- - -SO_ACCEPTCONN: Final[int] -SO_BROADCAST: Final[int] -SO_DEBUG: Final[int] -SO_DONTROUTE: Final[int] -SO_ERROR: Final[int] -SO_KEEPALIVE: Final[int] -SO_LINGER: Final[int] -SO_OOBINLINE: Final[int] -SO_RCVBUF: Final[int] -SO_RCVLOWAT: Final[int] -SO_RCVTIMEO: Final[int] -SO_REUSEADDR: Final[int] -SO_SNDBUF: Final[int] -SO_SNDLOWAT: Final[int] -SO_SNDTIMEO: Final[int] -SO_TYPE: Final[int] -if sys.platform != "linux": - SO_USELOOPBACK: Final[int] -if sys.platform == "win32": - SO_EXCLUSIVEADDRUSE: Final[int] -if sys.platform != "win32": - SO_REUSEPORT: Final[int] - if sys.platform != "darwin" or sys.version_info >= (3, 13): - SO_BINDTODEVICE: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - SO_DOMAIN: Final[int] - SO_MARK: Final[int] - SO_PASSCRED: Final[int] - SO_PASSSEC: Final[int] - SO_PEERCRED: Final[int] - SO_PEERSEC: Final[int] - SO_PRIORITY: Final[int] - SO_PROTOCOL: Final[int] -if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux": - SO_SETFIB: Final[int] -if sys.platform == "linux" and sys.version_info >= (3, 13): - SO_BINDTOIFINDEX: Final[int] - -SOMAXCONN: Final[int] - -MSG_CTRUNC: Final[int] -MSG_DONTROUTE: Final[int] -MSG_OOB: Final[int] -MSG_PEEK: Final[int] -MSG_TRUNC: Final[int] -MSG_WAITALL: Final[int] -if sys.platform != "win32": - MSG_DONTWAIT: Final[int] - MSG_EOR: Final[int] - MSG_NOSIGNAL: Final[int] # Sometimes this exists on darwin, sometimes not -if sys.platform != "darwin": - MSG_ERRQUEUE: Final[int] -if sys.platform == "win32": - MSG_BCAST: Final[int] - MSG_MCAST: Final[int] -if sys.platform != "win32" and sys.platform != "darwin": - MSG_CMSG_CLOEXEC: Final[int] - MSG_CONFIRM: Final[int] - MSG_FASTOPEN: Final[int] - MSG_MORE: Final[int] -if sys.platform != "win32" and sys.platform != "linux": - MSG_EOF: Final[int] -if sys.platform != "win32" and sys.platform != "linux" and sys.platform != "darwin": - MSG_NOTIFICATION: Final[int] - MSG_BTAG: Final[int] # Not FreeBSD either - MSG_ETAG: Final[int] # Not FreeBSD either - -SOL_IP: Final[int] -SOL_SOCKET: Final[int] -SOL_TCP: Final[int] -SOL_UDP: Final[int] -if sys.platform != "win32" and sys.platform != "darwin": - # Defined in socket.h for Linux, but these aren't always present for - # some reason. - SOL_ATALK: Final[int] - SOL_AX25: Final[int] - SOL_HCI: Final[int] - SOL_IPX: Final[int] - SOL_NETROM: Final[int] - SOL_ROSE: Final[int] - -if sys.platform != "win32": - SCM_RIGHTS: Final[int] -if sys.platform != "win32" and sys.platform != "darwin": - SCM_CREDENTIALS: Final[int] -if sys.platform != "win32" and sys.platform != "linux": - SCM_CREDS: Final[int] - -IPPROTO_ICMP: Final[int] -IPPROTO_IP: Final[int] -IPPROTO_RAW: Final[int] -IPPROTO_TCP: Final[int] -IPPROTO_UDP: Final[int] -IPPROTO_AH: Final[int] -IPPROTO_DSTOPTS: Final[int] -IPPROTO_EGP: Final[int] -IPPROTO_ESP: Final[int] -IPPROTO_FRAGMENT: Final[int] -IPPROTO_HOPOPTS: Final[int] -IPPROTO_ICMPV6: Final[int] -IPPROTO_IDP: Final[int] -IPPROTO_IGMP: Final[int] -IPPROTO_IPV6: Final[int] -IPPROTO_NONE: Final[int] -IPPROTO_PIM: Final[int] -IPPROTO_PUP: Final[int] -IPPROTO_ROUTING: Final[int] -IPPROTO_SCTP: Final[int] -if sys.platform != "linux": - IPPROTO_GGP: Final[int] - IPPROTO_IPV4: Final[int] - IPPROTO_MAX: Final[int] - IPPROTO_ND: Final[int] -if sys.platform == "win32": - IPPROTO_CBT: Final[int] - IPPROTO_ICLFXBM: Final[int] - IPPROTO_IGP: Final[int] - IPPROTO_L2TP: Final[int] - IPPROTO_PGM: Final[int] - IPPROTO_RDP: Final[int] - IPPROTO_ST: Final[int] -if sys.platform != "win32": - IPPROTO_GRE: Final[int] - IPPROTO_IPIP: Final[int] - IPPROTO_RSVP: Final[int] - IPPROTO_TP: Final[int] -if sys.platform != "win32" and sys.platform != "linux": - IPPROTO_EON: Final[int] - IPPROTO_HELLO: Final[int] - IPPROTO_IPCOMP: Final[int] - IPPROTO_XTP: Final[int] -if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux": - IPPROTO_BIP: Final[int] # Not FreeBSD either - IPPROTO_MOBILE: Final[int] # Not FreeBSD either - IPPROTO_VRRP: Final[int] # Not FreeBSD either -if sys.platform == "linux": - # Availability: Linux >= 2.6.20, FreeBSD >= 10.1 - IPPROTO_UDPLITE: Final[int] -if sys.platform == "linux": - IPPROTO_MPTCP: Final[int] - -IPPORT_RESERVED: Final[int] -IPPORT_USERRESERVED: Final[int] - -INADDR_ALLHOSTS_GROUP: Final[int] -INADDR_ANY: Final[int] -INADDR_BROADCAST: Final[int] -INADDR_LOOPBACK: Final[int] -INADDR_MAX_LOCAL_GROUP: Final[int] -INADDR_NONE: Final[int] -INADDR_UNSPEC_GROUP: Final[int] - -IP_ADD_MEMBERSHIP: Final[int] -IP_DROP_MEMBERSHIP: Final[int] -IP_HDRINCL: Final[int] -IP_MULTICAST_IF: Final[int] -IP_MULTICAST_LOOP: Final[int] -IP_MULTICAST_TTL: Final[int] -IP_OPTIONS: Final[int] -if sys.platform != "linux": - IP_RECVDSTADDR: Final[int] -IP_RECVTOS: Final[int] -IP_TOS: Final[int] -IP_TTL: Final[int] -if sys.platform != "win32": - IP_DEFAULT_MULTICAST_LOOP: Final[int] - IP_DEFAULT_MULTICAST_TTL: Final[int] - IP_MAX_MEMBERSHIPS: Final[int] - IP_RECVOPTS: Final[int] - IP_RECVRETOPTS: Final[int] - IP_RETOPTS: Final[int] -if sys.version_info >= (3, 13) and sys.platform == "linux": - CAN_RAW_ERR_FILTER: Final[int] -if sys.version_info >= (3, 15): - if sys.platform == "win32" or sys.platform == "linux": - IPV6_HDRINCL: Final[int] -if sys.version_info >= (3, 14): - IP_RECVTTL: Final[int] - - if sys.platform == "win32" or sys.platform == "linux": - IPV6_RECVERR: Final[int] - IP_RECVERR: Final[int] - SO_ORIGINAL_DST: Final[int] - - if sys.platform == "win32": - SOL_RFCOMM: Final[int] - SO_BTH_ENCRYPT: Final[int] - SO_BTH_MTU: Final[int] - SO_BTH_MTU_MAX: Final[int] - SO_BTH_MTU_MIN: Final[int] - TCP_QUICKACK: Final[int] - - if sys.platform == "linux": - BDADDR_BREDR: Final[int] - BDADDR_LE_PUBLIC: Final[int] - BDADDR_LE_RANDOM: Final[int] - BT_CHANNEL_POLICY: Final[int] - BT_CHANNEL_POLICY_BREDR_ONLY: Final[int] - BT_CHANNEL_POLICY_BREDR_PREFERRED: Final[int] - BT_CODEC: Final[int] - BT_DEFER_SETUP: Final[int] - BT_FLUSHABLE: Final[int] - BT_FLUSHABLE_OFF: Final[int] - BT_FLUSHABLE_ON: Final[int] - BT_ISO_QOS: Final[int] - BT_MODE: Final[int] - BT_MODE_BASIC: Final[int] - BT_MODE_ERTM: Final[int] - BT_MODE_EXT_FLOWCTL: Final[int] - BT_MODE_LE_FLOWCTL: Final[int] - BT_MODE_STREAMING: Final[int] - BT_PHY: Final[int] - BT_PHY_BR_1M_1SLOT: Final[int] - BT_PHY_BR_1M_3SLOT: Final[int] - BT_PHY_BR_1M_5SLOT: Final[int] - BT_PHY_EDR_2M_1SLOT: Final[int] - BT_PHY_EDR_2M_3SLOT: Final[int] - BT_PHY_EDR_2M_5SLOT: Final[int] - BT_PHY_EDR_3M_1SLOT: Final[int] - BT_PHY_EDR_3M_3SLOT: Final[int] - BT_PHY_EDR_3M_5SLOT: Final[int] - BT_PHY_LE_1M_RX: Final[int] - BT_PHY_LE_1M_TX: Final[int] - BT_PHY_LE_2M_RX: Final[int] - BT_PHY_LE_2M_TX: Final[int] - BT_PHY_LE_CODED_RX: Final[int] - BT_PHY_LE_CODED_TX: Final[int] - BT_PKT_STATUS: Final[int] - BT_POWER: Final[int] - BT_POWER_FORCE_ACTIVE_OFF: Final[int] - BT_POWER_FORCE_ACTIVE_ON: Final[int] - BT_RCVMTU: Final[int] - BT_SECURITY: Final[int] - BT_SECURITY_FIPS: Final[int] - BT_SECURITY_HIGH: Final[int] - BT_SECURITY_LOW: Final[int] - BT_SECURITY_MEDIUM: Final[int] - BT_SECURITY_SDP: Final[int] - BT_SNDMTU: Final[int] - BT_VOICE: Final[int] - BT_VOICE_CVSD_16BIT: Final[int] - BT_VOICE_TRANSPARENT: Final[int] - BT_VOICE_TRANSPARENT_16BIT: Final[int] - HCI_CHANNEL_CONTROL: Final[int] - HCI_CHANNEL_LOGGING: Final[int] - HCI_CHANNEL_MONITOR: Final[int] - HCI_CHANNEL_RAW: Final[int] - HCI_CHANNEL_USER: Final[int] - HCI_DEV_NONE: Final[int] - IP_FREEBIND: Final[int] - IP_RECVORIGDSTADDR: Final[int] - L2CAP_LM: Final[int] - L2CAP_LM_AUTH: Final[int] - L2CAP_LM_ENCRYPT: Final[int] - L2CAP_LM_MASTER: Final[int] - L2CAP_LM_RELIABLE: Final[int] - L2CAP_LM_SECURE: Final[int] - L2CAP_LM_TRUSTED: Final[int] - SOL_BLUETOOTH: Final[int] - SOL_L2CAP: Final[int] - SOL_RFCOMM: Final[int] - SOL_SCO: Final[int] - VMADDR_CID_LOCAL: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - IP_TRANSPARENT: Final[int] -if sys.platform != "win32" and sys.platform != "darwin" and sys.version_info >= (3, 11): - IP_BIND_ADDRESS_NO_PORT: Final[int] -if sys.version_info >= (3, 12): - IP_ADD_SOURCE_MEMBERSHIP: Final[int] - IP_BLOCK_SOURCE: Final[int] - IP_DROP_SOURCE_MEMBERSHIP: Final[int] - IP_PKTINFO: Final[int] - IP_UNBLOCK_SOURCE: Final[int] - -IPV6_CHECKSUM: Final[int] -IPV6_JOIN_GROUP: Final[int] -IPV6_LEAVE_GROUP: Final[int] -IPV6_MULTICAST_HOPS: Final[int] -IPV6_MULTICAST_IF: Final[int] -IPV6_MULTICAST_LOOP: Final[int] -IPV6_RECVTCLASS: Final[int] -IPV6_TCLASS: Final[int] -IPV6_UNICAST_HOPS: Final[int] -IPV6_V6ONLY: Final[int] -IPV6_DONTFRAG: Final[int] -IPV6_HOPLIMIT: Final[int] -IPV6_HOPOPTS: Final[int] -IPV6_PKTINFO: Final[int] -IPV6_RECVRTHDR: Final[int] -IPV6_RTHDR: Final[int] -if sys.platform != "win32": - IPV6_RTHDR_TYPE_0: Final[int] - IPV6_DSTOPTS: Final[int] - IPV6_NEXTHOP: Final[int] - IPV6_PATHMTU: Final[int] - IPV6_RECVDSTOPTS: Final[int] - IPV6_RECVHOPLIMIT: Final[int] - IPV6_RECVHOPOPTS: Final[int] - IPV6_RECVPATHMTU: Final[int] - IPV6_RECVPKTINFO: Final[int] - IPV6_RTHDRDSTOPTS: Final[int] - -if sys.platform != "win32" and sys.platform != "linux": - IPV6_USE_MIN_MTU: Final[int] - -EAI_AGAIN: Final[int] -EAI_BADFLAGS: Final[int] -EAI_FAIL: Final[int] -EAI_FAMILY: Final[int] -EAI_MEMORY: Final[int] -EAI_NODATA: Final[int] -EAI_NONAME: Final[int] -EAI_SERVICE: Final[int] -EAI_SOCKTYPE: Final[int] -if sys.platform != "win32": - EAI_ADDRFAMILY: Final[int] - EAI_OVERFLOW: Final[int] - EAI_SYSTEM: Final[int] -if sys.platform != "win32" and sys.platform != "linux": - EAI_BADHINTS: Final[int] - EAI_MAX: Final[int] - EAI_PROTOCOL: Final[int] - -AI_ADDRCONFIG: Final[int] -AI_ALL: Final[int] -AI_CANONNAME: Final[int] -AI_NUMERICHOST: Final[int] -AI_NUMERICSERV: Final[int] -AI_PASSIVE: Final[int] -AI_V4MAPPED: Final[int] -if sys.platform != "win32" and sys.platform != "linux": - AI_DEFAULT: Final[int] - AI_MASK: Final[int] - AI_V4MAPPED_CFG: Final[int] - -NI_DGRAM: Final[int] -NI_MAXHOST: Final[int] -NI_MAXSERV: Final[int] -NI_NAMEREQD: Final[int] -NI_NOFQDN: Final[int] -NI_NUMERICHOST: Final[int] -NI_NUMERICSERV: Final[int] -if sys.platform == "linux" and sys.version_info >= (3, 13): - NI_IDN: Final[int] - -TCP_FASTOPEN: Final[int] -TCP_KEEPCNT: Final[int] -TCP_KEEPINTVL: Final[int] -TCP_MAXSEG: Final[int] -TCP_NODELAY: Final[int] -if sys.platform != "win32": - TCP_NOTSENT_LOWAT: Final[int] -if sys.platform != "darwin": - TCP_KEEPIDLE: Final[int] -if sys.platform == "darwin": - TCP_KEEPALIVE: Final[int] -if sys.version_info >= (3, 11) and sys.platform == "darwin": - TCP_CONNECTION_INFO: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - TCP_CONGESTION: Final[int] - TCP_CORK: Final[int] - TCP_DEFER_ACCEPT: Final[int] - TCP_INFO: Final[int] - TCP_LINGER2: Final[int] - TCP_QUICKACK: Final[int] - TCP_SYNCNT: Final[int] - TCP_USER_TIMEOUT: Final[int] - TCP_WINDOW_CLAMP: Final[int] -if sys.platform == "linux" and sys.version_info >= (3, 12): - TCP_CC_INFO: Final[int] - TCP_FASTOPEN_CONNECT: Final[int] - TCP_FASTOPEN_KEY: Final[int] - TCP_FASTOPEN_NO_COOKIE: Final[int] - TCP_INQ: Final[int] - TCP_MD5SIG: Final[int] - TCP_MD5SIG_EXT: Final[int] - TCP_QUEUE_SEQ: Final[int] - TCP_REPAIR: Final[int] - TCP_REPAIR_OPTIONS: Final[int] - TCP_REPAIR_QUEUE: Final[int] - TCP_REPAIR_WINDOW: Final[int] - TCP_SAVED_SYN: Final[int] - TCP_SAVE_SYN: Final[int] - TCP_THIN_DUPACK: Final[int] - TCP_THIN_LINEAR_TIMEOUTS: Final[int] - TCP_TIMESTAMP: Final[int] - TCP_TX_DELAY: Final[int] - TCP_ULP: Final[int] - TCP_ZEROCOPY_RECEIVE: Final[int] - -# -------------------- -# Specifically documented constants -# -------------------- - -if sys.platform == "linux": - # Availability: Linux >= 2.6.25, NetBSD >= 8 - AF_CAN: Final[int] - PF_CAN: Final[int] - SOL_CAN_BASE: Final[int] - SOL_CAN_RAW: Final[int] - CAN_EFF_FLAG: Final[int] - CAN_EFF_MASK: Final[int] - CAN_ERR_FLAG: Final[int] - CAN_ERR_MASK: Final[int] - CAN_RAW: Final[int] - CAN_RAW_FILTER: Final[int] - CAN_RAW_LOOPBACK: Final[int] - CAN_RAW_RECV_OWN_MSGS: Final[int] - CAN_RTR_FLAG: Final[int] - CAN_SFF_MASK: Final[int] - if sys.version_info < (3, 11): - CAN_RAW_ERR_FILTER: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 2.6.25 - CAN_BCM: Final[int] - CAN_BCM_TX_SETUP: Final[int] - CAN_BCM_TX_DELETE: Final[int] - CAN_BCM_TX_READ: Final[int] - CAN_BCM_TX_SEND: Final[int] - CAN_BCM_RX_SETUP: Final[int] - CAN_BCM_RX_DELETE: Final[int] - CAN_BCM_RX_READ: Final[int] - CAN_BCM_TX_STATUS: Final[int] - CAN_BCM_TX_EXPIRED: Final[int] - CAN_BCM_RX_STATUS: Final[int] - CAN_BCM_RX_TIMEOUT: Final[int] - CAN_BCM_RX_CHANGED: Final[int] - CAN_BCM_SETTIMER: Final[int] - CAN_BCM_STARTTIMER: Final[int] - CAN_BCM_TX_COUNTEVT: Final[int] - CAN_BCM_TX_ANNOUNCE: Final[int] - CAN_BCM_TX_CP_CAN_ID: Final[int] - CAN_BCM_RX_FILTER_ID: Final[int] - CAN_BCM_RX_CHECK_DLC: Final[int] - CAN_BCM_RX_NO_AUTOTIMER: Final[int] - CAN_BCM_RX_ANNOUNCE_RESUME: Final[int] - CAN_BCM_TX_RESET_MULTI_IDX: Final[int] - CAN_BCM_RX_RTR_FRAME: Final[int] - CAN_BCM_CAN_FD_FRAME: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 3.6 - CAN_RAW_FD_FRAMES: Final[int] - # Availability: Linux >= 4.1 - CAN_RAW_JOIN_FILTERS: Final[int] - # Availability: Linux >= 2.6.25 - CAN_ISOTP: Final[int] - if sys.version_info >= (3, 15): - CAN_ISOTP_CHK_PAD_DATA: Final[int] - CAN_ISOTP_CHK_PAD_LEN: Final[int] - CAN_ISOTP_DEFAULT_EXT_ADDRESS: Final[int] - CAN_ISOTP_DEFAULT_FLAGS: Final[int] - CAN_ISOTP_DEFAULT_FRAME_TXTIME: Final[int] - CAN_ISOTP_DEFAULT_LL_MTU: Final[int] - CAN_ISOTP_DEFAULT_LL_TX_DL: Final[int] - CAN_ISOTP_DEFAULT_LL_TX_FLAGS: Final[int] - CAN_ISOTP_DEFAULT_PAD_CONTENT: Final[int] - CAN_ISOTP_DEFAULT_RECV_BS: Final[int] - CAN_ISOTP_DEFAULT_RECV_STMIN: Final[int] - CAN_ISOTP_DEFAULT_RECV_WFTMAX: Final[int] - CAN_ISOTP_EXTEND_ADDR: Final[int] - CAN_ISOTP_FORCE_RXSTMIN: Final[int] - CAN_ISOTP_FORCE_TXSTMIN: Final[int] - CAN_ISOTP_HALF_DUPLEX: Final[int] - CAN_ISOTP_LL_OPTS: Final[int] - CAN_ISOTP_LISTEN_MODE: Final[int] - CAN_ISOTP_OPTS: Final[int] - CAN_ISOTP_RECV_FC: Final[int] - CAN_ISOTP_RX_EXT_ADDR: Final[int] - CAN_ISOTP_RX_PADDING: Final[int] - CAN_ISOTP_RX_STMIN: Final[int] - CAN_ISOTP_SF_BROADCAST: Final[int] - CAN_ISOTP_TX_PADDING: Final[int] - CAN_ISOTP_TX_STMIN: Final[int] - CAN_ISOTP_WAIT_TX_DONE: Final[int] - SOL_CAN_ISOTP: Final[int] - # Availability: Linux >= 5.4 - CAN_J1939: Final[int] - - J1939_MAX_UNICAST_ADDR: Final[int] - J1939_IDLE_ADDR: Final[int] - J1939_NO_ADDR: Final[int] - J1939_NO_NAME: Final[int] - J1939_PGN_REQUEST: Final[int] - J1939_PGN_ADDRESS_CLAIMED: Final[int] - J1939_PGN_ADDRESS_COMMANDED: Final[int] - J1939_PGN_PDU1_MAX: Final[int] - J1939_PGN_MAX: Final[int] - J1939_NO_PGN: Final[int] - - SO_J1939_FILTER: Final[int] - SO_J1939_PROMISC: Final[int] - SO_J1939_SEND_PRIO: Final[int] - SO_J1939_ERRQUEUE: Final[int] - - SCM_J1939_DEST_ADDR: Final[int] - SCM_J1939_DEST_NAME: Final[int] - SCM_J1939_PRIO: Final[int] - SCM_J1939_ERRQUEUE: Final[int] - - J1939_NLA_PAD: Final[int] - J1939_NLA_BYTES_ACKED: Final[int] - J1939_EE_INFO_NONE: Final[int] - J1939_EE_INFO_TX_ABORT: Final[int] - J1939_FILTER_MAX: Final[int] - -if sys.version_info >= (3, 12) and sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": - # Availability: FreeBSD >= 14.0 - AF_DIVERT: Final[int] - PF_DIVERT: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 2.2 - AF_PACKET: Final[int] - PF_PACKET: Final[int] - PACKET_BROADCAST: Final[int] - PACKET_FASTROUTE: Final[int] - PACKET_HOST: Final[int] - PACKET_LOOPBACK: Final[int] - PACKET_MULTICAST: Final[int] - PACKET_OTHERHOST: Final[int] - PACKET_OUTGOING: Final[int] - -if sys.version_info >= (3, 12) and sys.platform == "linux": - ETH_P_ALL: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 2.6.30 - AF_RDS: Final[int] - PF_RDS: Final[int] - SOL_RDS: Final[int] - # These are present in include/linux/rds.h but don't always show up - # here. - RDS_CANCEL_SENT_TO: Final[int] - RDS_CMSG_RDMA_ARGS: Final[int] - RDS_CMSG_RDMA_DEST: Final[int] - RDS_CMSG_RDMA_MAP: Final[int] - RDS_CMSG_RDMA_STATUS: Final[int] - RDS_CONG_MONITOR: Final[int] - RDS_FREE_MR: Final[int] - RDS_GET_MR: Final[int] - RDS_GET_MR_FOR_DEST: Final[int] - RDS_RDMA_DONTWAIT: Final[int] - RDS_RDMA_FENCE: Final[int] - RDS_RDMA_INVALIDATE: Final[int] - RDS_RDMA_NOTIFY_ME: Final[int] - RDS_RDMA_READWRITE: Final[int] - RDS_RDMA_SILENT: Final[int] - RDS_RDMA_USE_ONCE: Final[int] - RDS_RECVERR: Final[int] - - # This is supported by CPython but doesn't seem to be a real thing. - # The closest existing constant in rds.h is RDS_CMSG_CONG_UPDATE - # RDS_CMSG_RDMA_UPDATE: Final[int] - -if sys.platform == "win32": - SIO_RCVALL: Final[int] - SIO_KEEPALIVE_VALS: Final[int] - SIO_LOOPBACK_FAST_PATH: Final[int] - RCVALL_MAX: Final[int] - RCVALL_OFF: Final[int] - RCVALL_ON: Final[int] - RCVALL_SOCKETLEVELONLY: Final[int] - -if sys.platform == "linux": - AF_TIPC: Final[int] - SOL_TIPC: Final[int] - TIPC_ADDR_ID: Final[int] - TIPC_ADDR_NAME: Final[int] - TIPC_ADDR_NAMESEQ: Final[int] - TIPC_CFG_SRV: Final[int] - TIPC_CLUSTER_SCOPE: Final[int] - TIPC_CONN_TIMEOUT: Final[int] - TIPC_CRITICAL_IMPORTANCE: Final[int] - TIPC_DEST_DROPPABLE: Final[int] - TIPC_HIGH_IMPORTANCE: Final[int] - TIPC_IMPORTANCE: Final[int] - TIPC_LOW_IMPORTANCE: Final[int] - TIPC_MEDIUM_IMPORTANCE: Final[int] - TIPC_NODE_SCOPE: Final[int] - TIPC_PUBLISHED: Final[int] - TIPC_SRC_DROPPABLE: Final[int] - TIPC_SUBSCR_TIMEOUT: Final[int] - TIPC_SUB_CANCEL: Final[int] - TIPC_SUB_PORTS: Final[int] - TIPC_SUB_SERVICE: Final[int] - TIPC_TOP_SRV: Final[int] - TIPC_WAIT_FOREVER: Final[int] - TIPC_WITHDRAWN: Final[int] - TIPC_ZONE_SCOPE: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 2.6.38 - AF_ALG: Final[int] - SOL_ALG: Final[int] - ALG_OP_DECRYPT: Final[int] - ALG_OP_ENCRYPT: Final[int] - ALG_OP_SIGN: Final[int] - ALG_OP_VERIFY: Final[int] - ALG_SET_AEAD_ASSOCLEN: Final[int] - ALG_SET_AEAD_AUTHSIZE: Final[int] - ALG_SET_IV: Final[int] - ALG_SET_KEY: Final[int] - ALG_SET_OP: Final[int] - ALG_SET_PUBKEY: Final[int] - -if sys.platform == "linux": - # Availability: Linux >= 4.8 (or maybe 3.9, CPython docs are confusing) - AF_VSOCK: Final[int] - IOCTL_VM_SOCKETS_GET_LOCAL_CID: Final = 0x7B9 - VMADDR_CID_ANY: Final = 0xFFFFFFFF - VMADDR_CID_HOST: Final = 2 - VMADDR_PORT_ANY: Final = 0xFFFFFFFF - SO_VM_SOCKETS_BUFFER_MAX_SIZE: Final = 2 - SO_VM_SOCKETS_BUFFER_SIZE: Final = 0 - SO_VM_SOCKETS_BUFFER_MIN_SIZE: Final = 1 - VM_SOCKETS_INVALID_VERSION: Final = 0xFFFFFFFF # undocumented - -# Documented as only available on BSD, macOS, but empirically sometimes -# available on Windows -if sys.platform != "linux": - AF_LINK: Final[int] - -has_ipv6: bool - -if sys.platform != "darwin": - BDADDR_ANY: Final = "00:00:00:00:00:00" - BDADDR_LOCAL: Final = "00:00:00:FF:FF:FF" - -if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux": - HCI_FILTER: Final[int] # not in NetBSD or DragonFlyBSD - HCI_TIME_STAMP: Final[int] # not in FreeBSD, NetBSD, or DragonFlyBSD - HCI_DATA_DIR: Final[int] # not in FreeBSD, NetBSD, or DragonFlyBSD - -if sys.platform == "linux": - AF_QIPCRTR: Final[int] # Availability: Linux >= 4.7 - -if sys.version_info >= (3, 11) and sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": - # FreeBSD - SCM_CREDS2: Final[int] - LOCAL_CREDS: Final[int] - LOCAL_CREDS_PERSISTENT: Final[int] - -if sys.version_info >= (3, 11) and sys.platform == "linux": - SO_INCOMING_CPU: Final[int] # Availability: Linux >= 3.9 - -if sys.version_info >= (3, 12) and sys.platform == "win32": - # Availability: Windows - AF_HYPERV: Final[int] - HV_PROTOCOL_RAW: Final[int] - HVSOCKET_CONNECT_TIMEOUT: Final[int] - HVSOCKET_CONNECT_TIMEOUT_MAX: Final[int] - HVSOCKET_CONNECTED_SUSPEND: Final[int] - HVSOCKET_ADDRESS_FLAG_PASSTHRU: Final[int] - HV_GUID_ZERO: Final = "00000000-0000-0000-0000-000000000000" - HV_GUID_WILDCARD: Final = "00000000-0000-0000-0000-000000000000" - HV_GUID_BROADCAST: Final = "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" - HV_GUID_CHILDREN: Final = "90DB8B89-0D35-4F79-8CE9-49EA0AC8B7CD" - HV_GUID_LOOPBACK: Final = "E0E16197-DD56-4A10-9195-5EE7A155A838" - HV_GUID_PARENT: Final = "A42E7CDA-D03F-480C-9CC2-A4DE20ABB878" - -if sys.version_info >= (3, 12): - if sys.platform != "win32": - # Availability: Linux, FreeBSD, macOS - ETHERTYPE_ARP: Final[int] - ETHERTYPE_IP: Final[int] - ETHERTYPE_IPV6: Final[int] - ETHERTYPE_VLAN: Final[int] - -# -------------------- -# Semi-documented constants -# These are alluded to under the "Socket families" section in the docs -# https://docs.python.org/3/library/socket.html#socket-families -# -------------------- - -if sys.platform == "linux": - # Netlink is defined by Linux - AF_NETLINK: Final[int] - NETLINK_CRYPTO: Final[int] - NETLINK_DNRTMSG: Final[int] - NETLINK_FIREWALL: Final[int] - NETLINK_IP6_FW: Final[int] - NETLINK_NFLOG: Final[int] - NETLINK_ROUTE: Final[int] - NETLINK_USERSOCK: Final[int] - NETLINK_XFRM: Final[int] - # Technically still supported by CPython - # NETLINK_ARPD: Final[int] # linux 2.0 to 2.6.12 (EOL August 2005) - # NETLINK_ROUTE6: Final[int] # linux 2.2 to 2.6.12 (EOL August 2005) - # NETLINK_SKIP: Final[int] # linux 2.0 to 2.6.12 (EOL August 2005) - # NETLINK_TAPBASE: Final[int] # linux 2.2 to 2.6.12 (EOL August 2005) - # NETLINK_TCPDIAG: Final[int] # linux 2.6.0 to 2.6.13 (EOL December 2005) - # NETLINK_W1: Final[int] # linux 2.6.13 to 2.6.17 (EOL October 2006) - -if sys.platform == "darwin": - PF_SYSTEM: Final[int] - SYSPROTO_CONTROL: Final[int] - -if sys.platform != "darwin": - AF_BLUETOOTH: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - # Linux and some BSD support is explicit in the docs - # Windows and macOS do not support in practice - BTPROTO_HCI: Final[int] - BTPROTO_L2CAP: Final[int] - BTPROTO_SCO: Final[int] # not in FreeBSD -if sys.platform != "darwin": - BTPROTO_RFCOMM: Final[int] - -if sys.platform == "linux": - UDPLITE_RECV_CSCOV: Final[int] - UDPLITE_SEND_CSCOV: Final[int] - -# -------------------- -# Documented under socket.shutdown -# -------------------- -SHUT_RD: Final[int] -SHUT_RDWR: Final[int] -SHUT_WR: Final[int] - -# -------------------- -# Undocumented constants -# -------------------- - -# Undocumented address families -AF_APPLETALK: Final[int] -AF_DECnet: Final[int] -AF_IPX: Final[int] -AF_SNA: Final[int] - -if sys.platform != "win32": - AF_ROUTE: Final[int] - -if sys.platform == "darwin": - AF_SYSTEM: Final[int] - -if sys.platform != "darwin": - AF_IRDA: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - AF_ASH: Final[int] - AF_ATMPVC: Final[int] - AF_ATMSVC: Final[int] - AF_AX25: Final[int] - AF_BRIDGE: Final[int] - AF_ECONET: Final[int] - AF_KEY: Final[int] - AF_LLC: Final[int] - AF_NETBEUI: Final[int] - AF_NETROM: Final[int] - AF_PPPOX: Final[int] - AF_ROSE: Final[int] - AF_SECURITY: Final[int] - AF_WANPIPE: Final[int] - AF_X25: Final[int] - -# Miscellaneous undocumented - -if sys.platform != "win32" and sys.platform != "linux": - LOCAL_PEERCRED: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - # Defined in linux socket.h, but this isn't always present for - # some reason. - IPX_TYPE: Final[int] - -# ===== Classes ===== - -@disjoint_base -class socket: - @property - def family(self) -> int: ... - @property - def type(self) -> int: ... - @property - def proto(self) -> int: ... - # F811: "Redefinition of unused `timeout`" - @property - def timeout(self) -> float | None: ... - if sys.platform == "win32": - def __init__( - self, family: int = ..., type: int = ..., proto: int = ..., fileno: SupportsIndex | bytes | None = None - ) -> None: ... - else: - def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: SupportsIndex | None = None) -> None: ... - - def bind(self, address: _Address, /) -> None: ... - def close(self) -> None: ... - def connect(self, address: _Address, /) -> None: ... - def connect_ex(self, address: _Address, /) -> int: ... - def detach(self) -> int: ... - def fileno(self) -> int: ... - def getpeername(self) -> _RetAddress: ... - def getsockname(self) -> _RetAddress: ... - - @overload - def getsockopt(self, level: int, optname: int, /) -> int: ... - @overload - def getsockopt(self, level: int, optname: int, buflen: int, /) -> bytes: ... - - def getblocking(self) -> bool: ... - def gettimeout(self) -> float | None: ... - if sys.platform == "win32": - def ioctl(self, control: int, option: int | tuple[int, int, int] | bool, /) -> None: ... - - def listen(self, backlog: int = ..., /) -> None: ... - def recv(self, bufsize: int, flags: int = 0, /) -> bytes: ... - def recvfrom(self, bufsize: int, flags: int = 0, /) -> tuple[bytes, _RetAddress]: ... - if sys.platform != "win32": - def recvmsg(self, bufsize: int, ancbufsize: int = 0, flags: int = 0, /) -> tuple[bytes, list[_CMSG], int, Any]: ... - def recvmsg_into( - self, buffers: Iterable[WriteableBuffer], ancbufsize: int = 0, flags: int = 0, / - ) -> tuple[int, list[_CMSG], int, Any]: ... - - def recvfrom_into(self, buffer: WriteableBuffer, nbytes: int = 0, flags: int = 0) -> tuple[int, _RetAddress]: ... - def recv_into(self, buffer: WriteableBuffer, nbytes: int = 0, flags: int = 0) -> int: ... - def send(self, data: ReadableBuffer, flags: int = 0, /) -> int: ... - def sendall(self, data: ReadableBuffer, flags: int = 0, /) -> None: ... - - @overload - def sendto(self, data: ReadableBuffer, address: _Address, /) -> int: ... - @overload - def sendto(self, data: ReadableBuffer, flags: int, address: _Address, /) -> int: ... - - if sys.platform != "win32": - def sendmsg( - self, - buffers: Iterable[ReadableBuffer], - ancdata: Iterable[_CMSGArg] = ..., - flags: int = 0, - address: _Address | None = None, - /, - ) -> int: ... - if sys.platform == "linux": - def sendmsg_afalg( - self, msg: Iterable[ReadableBuffer] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = 0 - ) -> int: ... - - def setblocking(self, flag: bool, /) -> None: ... - def settimeout(self, value: float | None, /) -> None: ... - - @overload - def setsockopt(self, level: int, optname: int, value: int | ReadableBuffer, /) -> None: ... - @overload - def setsockopt(self, level: int, optname: int, value: None, optlen: int, /) -> None: ... - - if sys.platform == "win32": - def share(self, process_id: int, /) -> bytes: ... - - def shutdown(self, how: int, /) -> None: ... - -SocketType = socket - -# ===== Functions ===== - -def close(fd: SupportsIndex, /) -> None: ... -def dup(fd: SupportsIndex, /) -> int: ... - -# the 5th tuple item is an address -def getaddrinfo( - host: bytes | str | None, port: bytes | str | int | None, family: int = ..., type: int = 0, proto: int = 0, flags: int = 0 -) -> list[tuple[int, int, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]]: ... -def gethostbyname(hostname: str, /) -> str: ... -def gethostbyname_ex(hostname: str, /) -> tuple[str, list[str], list[str]]: ... -def gethostname() -> str: ... -def gethostbyaddr(ip_address: str, /) -> tuple[str, list[str], list[str]]: ... -def getnameinfo(sockaddr: tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes], flags: int, /) -> tuple[str, str]: ... -def getprotobyname(protocolname: str, /) -> int: ... -def getservbyname(servicename: str, protocolname: str = ..., /) -> int: ... -def getservbyport(port: int, protocolname: str = ..., /) -> str: ... -def ntohl(x: int, /) -> int: ... # param & ret val are 32-bit ints -def ntohs(x: int, /) -> int: ... # param & ret val are 16-bit ints -def htonl(x: int, /) -> int: ... # param & ret val are 32-bit ints -def htons(x: int, /) -> int: ... # param & ret val are 16-bit ints -def inet_aton(ip_addr: str, /) -> bytes: ... # ret val 4 bytes in length -def inet_ntoa(packed_ip: ReadableBuffer, /) -> str: ... -def inet_pton(address_family: int, ip_string: str, /) -> bytes: ... -def inet_ntop(address_family: int, packed_ip: ReadableBuffer, /) -> str: ... -def getdefaulttimeout() -> float | None: ... - -# F811: "Redefinition of unused `timeout`" -def setdefaulttimeout(timeout: float | None, /) -> None: ... - -if sys.platform != "win32": - def sethostname(name: str, /) -> None: ... - def CMSG_LEN(length: int, /) -> int: ... - def CMSG_SPACE(length: int, /) -> int: ... - def socketpair(family: int = ..., type: int = ..., proto: int = 0, /) -> tuple[socket, socket]: ... - -def if_nameindex() -> list[tuple[int, str]]: ... -def if_nametoindex(oname: str, /) -> int: ... - -if sys.version_info >= (3, 14): - def if_indextoname(if_index: int, /) -> str: ... - -else: - def if_indextoname(index: int, /) -> str: ... - -CAPI: CapsuleType diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_sqlite3.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_sqlite3.vpi deleted file mode 100644 index b6d96121..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_sqlite3.vpi +++ /dev/null @@ -1,311 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath -from collections.abc import Callable -from sqlite3 import ( - Connection as Connection, - Cursor as Cursor, - DatabaseError as DatabaseError, - DataError as DataError, - Error as Error, - IntegrityError as IntegrityError, - InterfaceError as InterfaceError, - InternalError as InternalError, - NotSupportedError as NotSupportedError, - OperationalError as OperationalError, - PrepareProtocol as PrepareProtocol, - ProgrammingError as ProgrammingError, - Row as Row, - Warning as Warning, - _IsolationLevel, -) -from typing import Any, Final, Literal, TypeAlias, TypeVar, overload -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - from sqlite3 import Blob as Blob - -_T = TypeVar("_T") -_ConnectionT = TypeVar("_ConnectionT", bound=Connection) -_SqliteData: TypeAlias = str | ReadableBuffer | int | float | None -_Adapter: TypeAlias = Callable[[_T], _SqliteData] -_Converter: TypeAlias = Callable[[bytes], Any] - -PARSE_COLNAMES: Final = 2 -PARSE_DECLTYPES: Final = 1 -SQLITE_ALTER_TABLE: Final = 26 -SQLITE_ANALYZE: Final = 28 -SQLITE_ATTACH: Final = 24 -SQLITE_CREATE_INDEX: Final = 1 -SQLITE_CREATE_TABLE: Final = 2 -SQLITE_CREATE_TEMP_INDEX: Final = 3 -SQLITE_CREATE_TEMP_TABLE: Final = 4 -SQLITE_CREATE_TEMP_TRIGGER: Final = 5 -SQLITE_CREATE_TEMP_VIEW: Final = 6 -SQLITE_CREATE_TRIGGER: Final = 7 -SQLITE_CREATE_VIEW: Final = 8 -SQLITE_CREATE_VTABLE: Final = 29 -SQLITE_DELETE: Final = 9 -SQLITE_DENY: Final = 1 -SQLITE_DETACH: Final = 25 -SQLITE_DONE: Final = 101 -SQLITE_DROP_INDEX: Final = 10 -SQLITE_DROP_TABLE: Final = 11 -SQLITE_DROP_TEMP_INDEX: Final = 12 -SQLITE_DROP_TEMP_TABLE: Final = 13 -SQLITE_DROP_TEMP_TRIGGER: Final = 14 -SQLITE_DROP_TEMP_VIEW: Final = 15 -SQLITE_DROP_TRIGGER: Final = 16 -SQLITE_DROP_VIEW: Final = 17 -SQLITE_DROP_VTABLE: Final = 30 -SQLITE_FUNCTION: Final = 31 -SQLITE_IGNORE: Final = 2 -SQLITE_INSERT: Final = 18 -SQLITE_OK: Final = 0 -SQLITE_PRAGMA: Final = 19 -SQLITE_READ: Final = 20 -SQLITE_RECURSIVE: Final = 33 -SQLITE_REINDEX: Final = 27 -SQLITE_SAVEPOINT: Final = 32 -SQLITE_SELECT: Final = 21 -SQLITE_TRANSACTION: Final = 22 -SQLITE_UPDATE: Final = 23 -if sys.version_info >= (3, 15): - SQLITE_KEYWORDS: tuple[str, ...] -adapters: dict[tuple[type[Any], type[Any]], _Adapter[Any]] -converters: dict[str, _Converter] -sqlite_version: str - -if sys.version_info < (3, 12): - version: str - -if sys.version_info >= (3, 12): - LEGACY_TRANSACTION_CONTROL: Final = -1 - SQLITE_DBCONFIG_DEFENSIVE: Final = 1010 - SQLITE_DBCONFIG_DQS_DDL: Final = 1014 - SQLITE_DBCONFIG_DQS_DML: Final = 1013 - SQLITE_DBCONFIG_ENABLE_FKEY: Final = 1002 - SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER: Final = 1004 - SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION: Final = 1005 - SQLITE_DBCONFIG_ENABLE_QPSG: Final = 1007 - SQLITE_DBCONFIG_ENABLE_TRIGGER: Final = 1003 - SQLITE_DBCONFIG_ENABLE_VIEW: Final = 1015 - SQLITE_DBCONFIG_LEGACY_ALTER_TABLE: Final = 1012 - SQLITE_DBCONFIG_LEGACY_FILE_FORMAT: Final = 1016 - SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE: Final = 1006 - SQLITE_DBCONFIG_RESET_DATABASE: Final = 1009 - SQLITE_DBCONFIG_TRIGGER_EQP: Final = 1008 - SQLITE_DBCONFIG_TRUSTED_SCHEMA: Final = 1017 - SQLITE_DBCONFIG_WRITABLE_SCHEMA: Final = 1011 - -if sys.version_info >= (3, 11): - SQLITE_ABORT: Final = 4 - SQLITE_ABORT_ROLLBACK: Final = 516 - SQLITE_AUTH: Final = 23 - SQLITE_AUTH_USER: Final = 279 - SQLITE_BUSY: Final = 5 - SQLITE_BUSY_RECOVERY: Final = 261 - SQLITE_BUSY_SNAPSHOT: Final = 517 - SQLITE_BUSY_TIMEOUT: Final = 773 - SQLITE_CANTOPEN: Final = 14 - SQLITE_CANTOPEN_CONVPATH: Final = 1038 - SQLITE_CANTOPEN_DIRTYWAL: Final = 1294 - SQLITE_CANTOPEN_FULLPATH: Final = 782 - SQLITE_CANTOPEN_ISDIR: Final = 526 - SQLITE_CANTOPEN_NOTEMPDIR: Final = 270 - SQLITE_CANTOPEN_SYMLINK: Final = 1550 - SQLITE_CONSTRAINT: Final = 19 - SQLITE_CONSTRAINT_CHECK: Final = 275 - SQLITE_CONSTRAINT_COMMITHOOK: Final = 531 - SQLITE_CONSTRAINT_FOREIGNKEY: Final = 787 - SQLITE_CONSTRAINT_FUNCTION: Final = 1043 - SQLITE_CONSTRAINT_NOTNULL: Final = 1299 - SQLITE_CONSTRAINT_PINNED: Final = 2835 - SQLITE_CONSTRAINT_PRIMARYKEY: Final = 1555 - SQLITE_CONSTRAINT_ROWID: Final = 2579 - SQLITE_CONSTRAINT_TRIGGER: Final = 1811 - SQLITE_CONSTRAINT_UNIQUE: Final = 2067 - SQLITE_CONSTRAINT_VTAB: Final = 2323 - SQLITE_CORRUPT: Final = 11 - SQLITE_CORRUPT_INDEX: Final = 779 - SQLITE_CORRUPT_SEQUENCE: Final = 523 - SQLITE_CORRUPT_VTAB: Final = 267 - SQLITE_EMPTY: Final = 16 - SQLITE_ERROR: Final = 1 - SQLITE_ERROR_MISSING_COLLSEQ: Final = 257 - SQLITE_ERROR_RETRY: Final = 513 - SQLITE_ERROR_SNAPSHOT: Final = 769 - SQLITE_FORMAT: Final = 24 - SQLITE_FULL: Final = 13 - SQLITE_INTERNAL: Final = 2 - SQLITE_INTERRUPT: Final = 9 - SQLITE_IOERR: Final = 10 - SQLITE_IOERR_ACCESS: Final = 3338 - SQLITE_IOERR_AUTH: Final = 7178 - SQLITE_IOERR_BEGIN_ATOMIC: Final = 7434 - SQLITE_IOERR_BLOCKED: Final = 2826 - SQLITE_IOERR_CHECKRESERVEDLOCK: Final = 3594 - SQLITE_IOERR_CLOSE: Final = 4106 - SQLITE_IOERR_COMMIT_ATOMIC: Final = 7690 - SQLITE_IOERR_CONVPATH: Final = 6666 - SQLITE_IOERR_CORRUPTFS: Final = 8458 - SQLITE_IOERR_DATA: Final = 8202 - SQLITE_IOERR_DELETE: Final = 2570 - SQLITE_IOERR_DELETE_NOENT: Final = 5898 - SQLITE_IOERR_DIR_CLOSE: Final = 4362 - SQLITE_IOERR_DIR_FSYNC: Final = 1290 - SQLITE_IOERR_FSTAT: Final = 1802 - SQLITE_IOERR_FSYNC: Final = 1034 - SQLITE_IOERR_GETTEMPPATH: Final = 6410 - SQLITE_IOERR_LOCK: Final = 3850 - SQLITE_IOERR_MMAP: Final = 6154 - SQLITE_IOERR_NOMEM: Final = 3082 - SQLITE_IOERR_RDLOCK: Final = 2314 - SQLITE_IOERR_READ: Final = 266 - SQLITE_IOERR_ROLLBACK_ATOMIC: Final = 7946 - SQLITE_IOERR_SEEK: Final = 5642 - SQLITE_IOERR_SHMLOCK: Final = 5130 - SQLITE_IOERR_SHMMAP: Final = 5386 - SQLITE_IOERR_SHMOPEN: Final = 4618 - SQLITE_IOERR_SHMSIZE: Final = 4874 - SQLITE_IOERR_SHORT_READ: Final = 522 - SQLITE_IOERR_TRUNCATE: Final = 1546 - SQLITE_IOERR_UNLOCK: Final = 2058 - SQLITE_IOERR_VNODE: Final = 6922 - SQLITE_IOERR_WRITE: Final = 778 - SQLITE_LIMIT_ATTACHED: Final = 7 - SQLITE_LIMIT_COLUMN: Final = 2 - SQLITE_LIMIT_COMPOUND_SELECT: Final = 4 - SQLITE_LIMIT_EXPR_DEPTH: Final = 3 - SQLITE_LIMIT_FUNCTION_ARG: Final = 6 - SQLITE_LIMIT_LENGTH: Final = 0 - SQLITE_LIMIT_LIKE_PATTERN_LENGTH: Final = 8 - SQLITE_LIMIT_SQL_LENGTH: Final = 1 - SQLITE_LIMIT_TRIGGER_DEPTH: Final = 10 - SQLITE_LIMIT_VARIABLE_NUMBER: Final = 9 - SQLITE_LIMIT_VDBE_OP: Final = 5 - SQLITE_LIMIT_WORKER_THREADS: Final = 11 - SQLITE_LOCKED: Final = 6 - SQLITE_LOCKED_SHAREDCACHE: Final = 262 - SQLITE_LOCKED_VTAB: Final = 518 - SQLITE_MISMATCH: Final = 20 - SQLITE_MISUSE: Final = 21 - SQLITE_NOLFS: Final = 22 - SQLITE_NOMEM: Final = 7 - SQLITE_NOTADB: Final = 26 - SQLITE_NOTFOUND: Final = 12 - SQLITE_NOTICE: Final = 27 - SQLITE_NOTICE_RECOVER_ROLLBACK: Final = 539 - SQLITE_NOTICE_RECOVER_WAL: Final = 283 - SQLITE_OK_LOAD_PERMANENTLY: Final = 256 - SQLITE_OK_SYMLINK: Final = 512 - SQLITE_PERM: Final = 3 - SQLITE_PROTOCOL: Final = 15 - SQLITE_RANGE: Final = 25 - SQLITE_READONLY: Final = 8 - SQLITE_READONLY_CANTINIT: Final = 1288 - SQLITE_READONLY_CANTLOCK: Final = 520 - SQLITE_READONLY_DBMOVED: Final = 1032 - SQLITE_READONLY_DIRECTORY: Final = 1544 - SQLITE_READONLY_RECOVERY: Final = 264 - SQLITE_READONLY_ROLLBACK: Final = 776 - SQLITE_ROW: Final = 100 - SQLITE_SCHEMA: Final = 17 - SQLITE_TOOBIG: Final = 18 - SQLITE_WARNING: Final = 28 - SQLITE_WARNING_AUTOINDEX: Final = 284 - threadsafety: Literal[0, 1, 3] - -# Can take or return anything depending on what's in the registry. -@overload -def adapt(obj: Any, proto: Any, /) -> Any: ... -@overload -def adapt(obj: Any, proto: Any, alt: _T, /) -> Any | _T: ... - -def complete_statement(statement: str) -> bool: ... - -if sys.version_info >= (3, 12): - @overload - def connect( - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - cached_statements: int = 128, - uri: bool = False, - *, - autocommit: bool = ..., - ) -> Connection: ... - @overload - def connect( - database: StrOrBytesPath, - timeout: float, - detect_types: int, - isolation_level: _IsolationLevel, - check_same_thread: bool, - factory: type[_ConnectionT], - cached_statements: int = 128, - uri: bool = False, - *, - autocommit: bool = ..., - ) -> _ConnectionT: ... - @overload - def connect( - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - *, - factory: type[_ConnectionT], - cached_statements: int = 128, - uri: bool = False, - autocommit: bool = ..., - ) -> _ConnectionT: ... -else: - @overload - def connect( - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - cached_statements: int = 128, - uri: bool = False, - ) -> Connection: ... - @overload - def connect( - database: StrOrBytesPath, - timeout: float, - detect_types: int, - isolation_level: _IsolationLevel, - check_same_thread: bool, - factory: type[_ConnectionT], - cached_statements: int = 128, - uri: bool = False, - ) -> _ConnectionT: ... - @overload - def connect( - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - *, - factory: type[_ConnectionT], - cached_statements: int = 128, - uri: bool = False, - ) -> _ConnectionT: ... - -def enable_callback_tracebacks(enable: bool, /) -> None: ... - -if sys.version_info < (3, 12): - # takes a pos-or-keyword argument because there is a C wrapper - @deprecated( - "Deprecated since Python 3.10; removed in Python 3.12. " - "Open database in URI mode using `cache=shared` parameter instead." - ) - def enable_shared_cache(do_enable: int) -> None: ... # undocumented - -def register_adapter(type: type[_T], adapter: _Adapter[_T], /) -> None: ... -def register_converter(typename: str, converter: _Converter, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_ssl.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_ssl.vpi deleted file mode 100644 index 87023d90..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_ssl.vpi +++ /dev/null @@ -1,303 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath -from collections.abc import Callable -from ssl import ( - SSLCertVerificationError as SSLCertVerificationError, - SSLContext, - SSLEOFError as SSLEOFError, - SSLError as SSLError, - SSLObject, - SSLSyscallError as SSLSyscallError, - SSLWantReadError as SSLWantReadError, - SSLWantWriteError as SSLWantWriteError, - SSLZeroReturnError as SSLZeroReturnError, -) -from typing import Any, ClassVar, Final, Literal, TypeAlias, TypedDict, final, overload, type_check_only -from typing_extensions import NotRequired, Self, deprecated, disjoint_base - -_PasswordType: TypeAlias = Callable[[], str | bytes | bytearray] | str | bytes | bytearray -_PCTRTT: TypeAlias = tuple[tuple[str, str], ...] -_PCTRTTT: TypeAlias = tuple[_PCTRTT, ...] -_PeerCertRetDictType: TypeAlias = dict[str, str | _PCTRTTT | _PCTRTT] - -@type_check_only -class _Cipher(TypedDict): - aead: bool - alg_bits: int - auth: str - description: str - digest: str | None - id: int - kea: str - name: str - protocol: str - strength_bits: int - symmetric: str - -@type_check_only -class _CertInfo(TypedDict): - subject: tuple[tuple[tuple[str, str], ...], ...] - issuer: tuple[tuple[tuple[str, str], ...], ...] - version: int - serialNumber: str - notBefore: str - notAfter: str - subjectAltName: NotRequired[tuple[tuple[str, str], ...] | None] - OCSP: NotRequired[tuple[str, ...] | None] - caIssuers: NotRequired[tuple[str, ...] | None] - crlDistributionPoints: NotRequired[tuple[str, ...] | None] - -def RAND_add(string: str | ReadableBuffer, entropy: float, /) -> None: ... -def RAND_bytes(n: int, /) -> bytes: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.6; removed in Python 3.12. Use `ssl.RAND_bytes()` instead.") - def RAND_pseudo_bytes(n: int, /) -> tuple[bytes, bool]: ... - -def RAND_status() -> bool: ... -def get_default_verify_paths() -> tuple[str, str, str, str]: ... - -if sys.version_info >= (3, 15): - def get_sigalgs() -> list[str]: ... - -if sys.platform == "win32": - _EnumRetType: TypeAlias = list[tuple[bytes, str, set[str] | bool]] - def enum_certificates(store_name: str) -> _EnumRetType: ... - def enum_crls(store_name: str) -> _EnumRetType: ... - -def txt2obj(txt: str, name: bool = False) -> tuple[int, str, str, str]: ... -def nid2obj(nid: int, /) -> tuple[int, str, str, str]: ... - -@disjoint_base -class _SSLContext: - check_hostname: bool - keylog_filename: str | None - maximum_version: int - minimum_version: int - num_tickets: int - options: int - post_handshake_auth: bool - protocol: int - security_level: int - sni_callback: Callable[[SSLObject, str, SSLContext], None | int] | None - verify_flags: int - verify_mode: int - def __new__(cls, protocol: int, /) -> Self: ... - def cert_store_stats(self) -> dict[str, int]: ... - - @overload - def get_ca_certs(self, binary_form: Literal[False] = False) -> list[_PeerCertRetDictType]: ... - @overload - def get_ca_certs(self, binary_form: Literal[True]) -> list[bytes]: ... - @overload - def get_ca_certs(self, binary_form: bool = False) -> Any: ... - - def get_ciphers(self) -> list[_Cipher]: ... - def load_cert_chain( - self, certfile: StrOrBytesPath, keyfile: StrOrBytesPath | None = None, password: _PasswordType | None = None - ) -> None: ... - def load_dh_params(self, path: str, /) -> None: ... - def load_verify_locations( - self, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadata: str | ReadableBuffer | None = None, - ) -> None: ... - def session_stats(self) -> dict[str, int]: ... - def set_ciphers(self, cipherlist: str, /) -> None: ... - def set_default_verify_paths(self) -> None: ... - def set_ecdh_curve(self, name: str, /) -> None: ... - if sys.version_info >= (3, 15): - def get_groups(self, *, include_aliases: bool = False) -> list[str]: ... - def set_ciphersuites(self, ciphersuites: str, /) -> None: ... - def set_client_sigalgs(self, sigalgslist: str, /) -> None: ... - def set_groups(self, grouplist: str, /) -> None: ... - def set_server_sigalgs(self, sigalgslist: str, /) -> None: ... - if sys.version_info >= (3, 13): - def set_psk_client_callback(self, callback: Callable[[str | None], tuple[str | None, bytes]] | None) -> None: ... - def set_psk_server_callback( - self, callback: Callable[[str | None], bytes] | None, identity_hint: str | None = None - ) -> None: ... - -@final -class MemoryBIO: - eof: bool - pending: int - def __new__(self) -> Self: ... - def read(self, size: int = -1, /) -> bytes: ... - def write(self, b: ReadableBuffer, /) -> int: ... - def write_eof(self) -> None: ... - -@final -class SSLSession: - __hash__: ClassVar[None] # type: ignore[assignment] - @property - def has_ticket(self) -> bool: ... - @property - def id(self) -> bytes: ... - @property - def ticket_lifetime_hint(self) -> int: ... - @property - def time(self) -> int: ... - @property - def timeout(self) -> int: ... - -# _ssl.Certificate is weird: it can't be instantiated or subclassed. -# Instances can only be created via methods of the private _ssl._SSLSocket class, -# for which the relevant method signatures are: -# -# class _SSLSocket: -# def get_unverified_chain(self) -> list[Certificate] | None: ... -# def get_verified_chain(self) -> list[Certificate] | None: ... -# -# You can find a _ssl._SSLSocket object as the _sslobj attribute of a ssl.SSLSocket object - -@final -class Certificate: - def get_info(self) -> _CertInfo: ... - - @overload - def public_bytes(self) -> str: ... - @overload - def public_bytes(self, format: Literal[1] = 1, /) -> str: ... # ENCODING_PEM - @overload - def public_bytes(self, format: Literal[2], /) -> bytes: ... # ENCODING_DER - @overload - def public_bytes(self, format: int, /) -> str | bytes: ... - -if sys.version_info < (3, 12): - err_codes_to_names: dict[tuple[int, int], str] - err_names_to_codes: dict[str, tuple[int, int]] - lib_codes_to_names: dict[int, str] - -_DEFAULT_CIPHERS: Final[str] - -# SSL error numbers -SSL_ERROR_ZERO_RETURN: Final = 6 -SSL_ERROR_WANT_READ: Final = 2 -SSL_ERROR_WANT_WRITE: Final = 3 -SSL_ERROR_WANT_X509_LOOKUP: Final = 4 -SSL_ERROR_SYSCALL: Final = 5 -SSL_ERROR_SSL: Final = 1 -SSL_ERROR_WANT_CONNECT: Final = 7 -SSL_ERROR_EOF: Final = 8 -SSL_ERROR_INVALID_ERROR_CODE: Final = 10 - -# verify modes -CERT_NONE: Final = 0 -CERT_OPTIONAL: Final = 1 -CERT_REQUIRED: Final = 2 - -# verify flags -VERIFY_DEFAULT: Final = 0 -VERIFY_CRL_CHECK_LEAF: Final = 0x04 -VERIFY_CRL_CHECK_CHAIN: Final = 0x0C -VERIFY_X509_STRICT: Final = 0x20 -VERIFY_X509_TRUSTED_FIRST: Final = 0x8000 -VERIFY_ALLOW_PROXY_CERTS: Final = 0x40 -VERIFY_X509_PARTIAL_CHAIN: Final = 0x80000 - -# alert descriptions -ALERT_DESCRIPTION_CLOSE_NOTIFY: Final = 0 -ALERT_DESCRIPTION_UNEXPECTED_MESSAGE: Final = 10 -ALERT_DESCRIPTION_BAD_RECORD_MAC: Final = 20 -ALERT_DESCRIPTION_RECORD_OVERFLOW: Final = 22 -ALERT_DESCRIPTION_DECOMPRESSION_FAILURE: Final = 30 -ALERT_DESCRIPTION_HANDSHAKE_FAILURE: Final = 40 -ALERT_DESCRIPTION_BAD_CERTIFICATE: Final = 42 -ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE: Final = 43 -ALERT_DESCRIPTION_CERTIFICATE_REVOKED: Final = 44 -ALERT_DESCRIPTION_CERTIFICATE_EXPIRED: Final = 45 -ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN: Final = 46 -ALERT_DESCRIPTION_ILLEGAL_PARAMETER: Final = 47 -ALERT_DESCRIPTION_UNKNOWN_CA: Final = 48 -ALERT_DESCRIPTION_ACCESS_DENIED: Final = 49 -ALERT_DESCRIPTION_DECODE_ERROR: Final = 50 -ALERT_DESCRIPTION_DECRYPT_ERROR: Final = 51 -ALERT_DESCRIPTION_PROTOCOL_VERSION: Final = 70 -ALERT_DESCRIPTION_INSUFFICIENT_SECURITY: Final = 71 -ALERT_DESCRIPTION_INTERNAL_ERROR: Final = 80 -ALERT_DESCRIPTION_USER_CANCELLED: Final = 90 -ALERT_DESCRIPTION_NO_RENEGOTIATION: Final = 100 -ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION: Final = 110 -ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE: Final = 111 -ALERT_DESCRIPTION_UNRECOGNIZED_NAME: Final = 112 -ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE: Final = 113 -ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE: Final = 114 -ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY: Final = 115 - -# protocol versions -PROTOCOL_SSLv23: Final = 2 -PROTOCOL_TLS: Final = 2 -PROTOCOL_TLS_CLIENT: Final = 16 -PROTOCOL_TLS_SERVER: Final = 17 -PROTOCOL_TLSv1: Final = 3 -PROTOCOL_TLSv1_1: Final = 4 -PROTOCOL_TLSv1_2: Final = 5 - -# protocol options -OP_ALL: Final[int] -OP_NO_SSLv2: Final = 0x0 -OP_NO_SSLv3: Final = 0x2000000 -OP_NO_TLSv1: Final = 0x4000000 -OP_NO_TLSv1_1: Final = 0x10000000 -OP_NO_TLSv1_2: Final = 0x8000000 -OP_NO_TLSv1_3: Final = 0x20000000 -OP_CIPHER_SERVER_PREFERENCE: Final = 0x400000 -OP_SINGLE_DH_USE: Final = 0x0 -OP_NO_TICKET: Final = 0x4000 -OP_SINGLE_ECDH_USE: Final = 0x0 -OP_NO_COMPRESSION: Final = 0x20000 -OP_ENABLE_MIDDLEBOX_COMPAT: Final = 0x100000 -OP_NO_RENEGOTIATION: Final = 0x40000000 -if sys.version_info >= (3, 11) or sys.platform == "linux": - OP_IGNORE_UNEXPECTED_EOF: Final = 0x80 -if sys.version_info >= (3, 12): - OP_LEGACY_SERVER_CONNECT: Final = 0x4 - OP_ENABLE_KTLS: Final = 0x8 - -# host flags -HOSTFLAG_ALWAYS_CHECK_SUBJECT: Final = 0x1 -HOSTFLAG_NEVER_CHECK_SUBJECT: Final = 0x20 -HOSTFLAG_NO_WILDCARDS: Final = 0x2 -HOSTFLAG_NO_PARTIAL_WILDCARDS: Final = 0x4 -HOSTFLAG_MULTI_LABEL_WILDCARDS: Final = 0x8 -HOSTFLAG_SINGLE_LABEL_SUBDOMAINS: Final = 0x10 - -# certificate file types -ENCODING_PEM: Final = 1 -ENCODING_DER: Final = 2 - -# protocol versions -PROTO_MINIMUM_SUPPORTED: Final = -2 -PROTO_MAXIMUM_SUPPORTED: Final = -1 -PROTO_SSLv3: Final[int] -PROTO_TLSv1: Final[int] -PROTO_TLSv1_1: Final[int] -PROTO_TLSv1_2: Final[int] -PROTO_TLSv1_3: Final[int] - -# feature support -HAS_SNI: Final[bool] -HAS_TLS_UNIQUE: Final[bool] -HAS_ECDH: Final[bool] -HAS_NPN: Final[bool] -if sys.version_info >= (3, 13): - HAS_PSK: Final[bool] -if sys.version_info >= (3, 15): - HAS_PSK_TLS13: Final[bool] -HAS_ALPN: Final[bool] -HAS_SSLv2: Final[bool] -HAS_SSLv3: Final[bool] -HAS_TLSv1: Final[bool] -HAS_TLSv1_1: Final[bool] -HAS_TLSv1_2: Final[bool] -HAS_TLSv1_3: Final[bool] -if sys.version_info >= (3, 14): - HAS_PHA: Final[bool] - -# version info -OPENSSL_VERSION_NUMBER: Final[int] -OPENSSL_VERSION_INFO: Final[tuple[int, int, int, int, int]] -OPENSSL_VERSION: Final[str] -_OPENSSL_API_VERSION: Final[tuple[int, int, int, int, int]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_stat.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_stat.vpi deleted file mode 100644 index 7129a282..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_stat.vpi +++ /dev/null @@ -1,119 +0,0 @@ -import sys -from typing import Final - -SF_APPEND: Final = 0x00040000 -SF_ARCHIVED: Final = 0x00010000 -SF_IMMUTABLE: Final = 0x00020000 -SF_NOUNLINK: Final = 0x00100000 -SF_SNAPSHOT: Final = 0x00200000 - -ST_MODE: Final = 0 -ST_INO: Final = 1 -ST_DEV: Final = 2 -ST_NLINK: Final = 3 -ST_UID: Final = 4 -ST_GID: Final = 5 -ST_SIZE: Final = 6 -ST_ATIME: Final = 7 -ST_MTIME: Final = 8 -ST_CTIME: Final = 9 - -S_IFIFO: Final = 0o010000 -S_IFLNK: Final = 0o120000 -S_IFREG: Final = 0o100000 -S_IFSOCK: Final = 0o140000 -S_IFBLK: Final = 0o060000 -S_IFCHR: Final = 0o020000 -S_IFDIR: Final = 0o040000 - -# These are 0 on systems that don't support the specific kind of file. -# Example: Linux doesn't support door files, so S_IFDOOR is 0 on linux. -S_IFDOOR: Final[int] -S_IFPORT: Final[int] -S_IFWHT: Final[int] - -S_ISUID: Final = 0o4000 -S_ISGID: Final = 0o2000 -S_ISVTX: Final = 0o1000 - -S_IRWXU: Final = 0o0700 -S_IRUSR: Final = 0o0400 -S_IWUSR: Final = 0o0200 -S_IXUSR: Final = 0o0100 - -S_IRWXG: Final = 0o0070 -S_IRGRP: Final = 0o0040 -S_IWGRP: Final = 0o0020 -S_IXGRP: Final = 0o0010 - -S_IRWXO: Final = 0o0007 -S_IROTH: Final = 0o0004 -S_IWOTH: Final = 0o0002 -S_IXOTH: Final = 0o0001 - -S_ENFMT: Final = 0o2000 -S_IREAD: Final = 0o0400 -S_IWRITE: Final = 0o0200 -S_IEXEC: Final = 0o0100 - -UF_APPEND: Final = 0x00000004 -UF_COMPRESSED: Final = 0x00000020 # OS X 10.6+ only -UF_HIDDEN: Final = 0x00008000 # OX X 10.5+ only -UF_IMMUTABLE: Final = 0x00000002 -UF_NODUMP: Final = 0x00000001 -UF_NOUNLINK: Final = 0x00000010 -UF_OPAQUE: Final = 0x00000008 - -def S_IMODE(mode: int, /) -> int: ... -def S_IFMT(mode: int, /) -> int: ... -def S_ISBLK(mode: int, /) -> bool: ... -def S_ISCHR(mode: int, /) -> bool: ... -def S_ISDIR(mode: int, /) -> bool: ... -def S_ISDOOR(mode: int, /) -> bool: ... -def S_ISFIFO(mode: int, /) -> bool: ... -def S_ISLNK(mode: int, /) -> bool: ... -def S_ISPORT(mode: int, /) -> bool: ... -def S_ISREG(mode: int, /) -> bool: ... -def S_ISSOCK(mode: int, /) -> bool: ... -def S_ISWHT(mode: int, /) -> bool: ... -def filemode(mode: int, /) -> str: ... - -if sys.platform == "win32": - IO_REPARSE_TAG_SYMLINK: Final = 0xA000000C - IO_REPARSE_TAG_MOUNT_POINT: Final = 0xA0000003 - IO_REPARSE_TAG_APPEXECLINK: Final = 0x8000001B - -if sys.platform == "win32": - FILE_ATTRIBUTE_ARCHIVE: Final = 32 - FILE_ATTRIBUTE_COMPRESSED: Final = 2048 - FILE_ATTRIBUTE_DEVICE: Final = 64 - FILE_ATTRIBUTE_DIRECTORY: Final = 16 - FILE_ATTRIBUTE_ENCRYPTED: Final = 16384 - FILE_ATTRIBUTE_HIDDEN: Final = 2 - FILE_ATTRIBUTE_INTEGRITY_STREAM: Final = 32768 - FILE_ATTRIBUTE_NORMAL: Final = 128 - FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: Final = 8192 - FILE_ATTRIBUTE_NO_SCRUB_DATA: Final = 131072 - FILE_ATTRIBUTE_OFFLINE: Final = 4096 - FILE_ATTRIBUTE_READONLY: Final = 1 - FILE_ATTRIBUTE_REPARSE_POINT: Final = 1024 - FILE_ATTRIBUTE_SPARSE_FILE: Final = 512 - FILE_ATTRIBUTE_SYSTEM: Final = 4 - FILE_ATTRIBUTE_TEMPORARY: Final = 256 - FILE_ATTRIBUTE_VIRTUAL: Final = 65536 - -if sys.version_info >= (3, 13): - # Varies by platform. - SF_SETTABLE: Final[int] - # https://github.com/python/cpython/issues/114081#issuecomment-2119017790 - # SF_RESTRICTED: Literal[0x00080000] - SF_FIRMLINK: Final = 0x00800000 - SF_DATALESS: Final = 0x40000000 - - if sys.platform == "darwin": - SF_SUPPORTED: Final = 0x9F0000 - SF_SYNTHETIC: Final = 0xC0000000 - - UF_TRACKED: Final = 0x00000040 - UF_DATAVAULT: Final = 0x00000080 - UF_SETTABLE: Final = 0x0000FFFF diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_struct.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_struct.vpi deleted file mode 100644 index c13e440e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_struct.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from _typeshed import ReadableBuffer, WriteableBuffer -from collections.abc import Iterator -from typing import Any -from typing_extensions import disjoint_base - -def pack(fmt: str | bytes, /, *v: Any) -> bytes: ... -def pack_into(fmt: str | bytes, buffer: WriteableBuffer, offset: int, /, *v: Any) -> None: ... -def unpack(format: str | bytes, buffer: ReadableBuffer, /) -> tuple[Any, ...]: ... -def unpack_from(format: str | bytes, /, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]: ... -def iter_unpack(format: str | bytes, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]: ... -def calcsize(format: str | bytes, /) -> int: ... - -@disjoint_base -class Struct: - @property - def format(self) -> str: ... - @property - def size(self) -> int: ... - def __init__(self, format: str | bytes) -> None: ... - def pack(self, *v: Any) -> bytes: ... - def pack_into(self, buffer: WriteableBuffer, offset: int, *v: Any) -> None: ... - def unpack(self, buffer: ReadableBuffer, /) -> tuple[Any, ...]: ... - def unpack_from(self, buffer: ReadableBuffer, offset: int = 0) -> tuple[Any, ...]: ... - def iter_unpack(self, buffer: ReadableBuffer, /) -> Iterator[tuple[Any, ...]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_thread.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_thread.vpi deleted file mode 100644 index e2d257c9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_thread.vpi +++ /dev/null @@ -1,123 +0,0 @@ -import signal -import sys -from _typeshed import structseq -from collections.abc import Callable -from threading import Thread -from types import TracebackType -from typing import Any, Final, NoReturn, final, overload -from typing_extensions import TypeVarTuple, Unpack, deprecated, disjoint_base - -_Ts = TypeVarTuple("_Ts") - -error = RuntimeError - -def _count() -> int: ... - -@final -class RLock: - def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ... - def release(self) -> None: ... - __enter__ = acquire - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - if sys.version_info >= (3, 14): - def locked(self) -> bool: ... - -if sys.version_info >= (3, 13): - @final - class _ThreadHandle: - ident: int - - def join(self, timeout: float | None = None, /) -> None: ... - def is_done(self) -> bool: ... - def _set_done(self) -> None: ... - - def start_joinable_thread( - function: Callable[[], object], handle: _ThreadHandle | None = None, daemon: bool = True - ) -> _ThreadHandle: ... - - @final - class lock: - def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ... - def release(self) -> None: ... - def locked(self) -> bool: ... - @deprecated("Obsolete synonym. Use `acquire()` instead.") - def acquire_lock(self, blocking: bool = True, timeout: float = -1) -> bool: ... # undocumented - @deprecated("Obsolete synonym. Use `release()` instead.") - def release_lock(self) -> None: ... # undocumented - @deprecated("Obsolete synonym. Use `locked()` instead.") - def locked_lock(self) -> bool: ... # undocumented - def __enter__(self) -> bool: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - - LockType = lock -else: - @final - class LockType: - def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ... - def release(self) -> None: ... - def locked(self) -> bool: ... - @deprecated("Obsolete synonym. Use `acquire()` instead.") - def acquire_lock(self, blocking: bool = True, timeout: float = -1) -> bool: ... # undocumented - @deprecated("Obsolete synonym. Use `release()` instead.") - def release_lock(self) -> None: ... # undocumented - @deprecated("Obsolete synonym. Use `locked()` instead.") - def locked_lock(self) -> bool: ... # undocumented - def __enter__(self) -> bool: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - -@overload -def start_new_thread(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ... -@overload -def start_new_thread(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ... - -@overload -@deprecated("Obsolete synonym. Use `start_new_thread()` instead.") -def start_new(function: Callable[[Unpack[_Ts]], object], args: tuple[Unpack[_Ts]], /) -> int: ... # undocumented -@overload -@deprecated("Obsolete synonym. Use `start_new_thread()` instead.") -def start_new(function: Callable[..., object], args: tuple[Any, ...], kwargs: dict[str, Any], /) -> int: ... # undocumented - -def interrupt_main(signum: signal.Signals = signal.SIGINT, /) -> None: ... -def exit() -> NoReturn: ... -@deprecated("Obsolete synonym. Use `exit()` instead.") -def exit_thread() -> NoReturn: ... # undocumented -def allocate_lock() -> LockType: ... -@deprecated("Obsolete synonym. Use `allocate_lock()` instead.") -def allocate() -> LockType: ... # undocumented -def get_ident() -> int: ... -def stack_size(size: int = 0, /) -> int: ... - -TIMEOUT_MAX: Final[float] - -def get_native_id() -> int: ... # only available on some platforms - -@final -class _ExceptHookArgs(structseq[Any], tuple[type[BaseException], BaseException | None, TracebackType | None, Thread | None]): - __match_args__: Final = ("exc_type", "exc_value", "exc_traceback", "thread") - - @property - def exc_type(self) -> type[BaseException]: ... - @property - def exc_value(self) -> BaseException | None: ... - @property - def exc_traceback(self) -> TracebackType | None: ... - @property - def thread(self) -> Thread | None: ... - -_excepthook: Callable[[_ExceptHookArgs], Any] - -if sys.version_info >= (3, 12): - def daemon_threads_allowed() -> bool: ... - -if sys.version_info >= (3, 14): - def set_name(name: str) -> None: ... - -@disjoint_base -class _local: - def __getattribute__(self, name: str, /) -> Any: ... - def __setattr__(self, name: str, value: Any, /) -> None: ... - def __delattr__(self, name: str, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_threading_local.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_threading_local.vpi deleted file mode 100644 index 7d4e61c6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_threading_local.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from threading import RLock -from typing import Any, TypeAlias -from typing_extensions import Self -from weakref import ReferenceType - -__all__ = ["local"] -_LocalDict: TypeAlias = dict[Any, Any] - -class _localimpl: - __slots__ = ("key", "dicts", "localargs", "locallock", "__weakref__") - key: str - dicts: dict[int, tuple[ReferenceType[Any], _LocalDict]] - # Keep localargs in sync with the *args, **kwargs annotation on local.__new__ - localargs: tuple[list[Any], dict[str, Any]] - locallock: RLock - def get_dict(self) -> _LocalDict: ... - def create_dict(self) -> _LocalDict: ... - -class local: - __slots__ = ("_local__impl", "__dict__") - def __new__(cls, /, *args: Any, **kw: Any) -> Self: ... - def __getattribute__(self, name: str) -> Any: ... - def __setattr__(self, name: str, value: Any) -> None: ... - def __delattr__(self, name: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_tkinter.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_tkinter.vpi deleted file mode 100644 index 500345f9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_tkinter.vpi +++ /dev/null @@ -1,156 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike, Incomplete -from collections.abc import Callable -from typing import Any, ClassVar, Final, Literal, TypeAlias, final, overload -from typing_extensions import deprecated - -# _tkinter is meant to be only used internally by tkinter, but some tkinter -# functions e.g. return _tkinter.Tcl_Obj objects. Tcl_Obj represents a Tcl -# object that hasn't been converted to a string. -# -# There are not many ways to get Tcl_Objs from tkinter, and I'm not sure if the -# only existing ways are supposed to return Tcl_Objs as opposed to returning -# strings. Here's one of these things that return Tcl_Objs: -# -# >>> import tkinter -# >>> text = tkinter.Text() -# >>> text.tag_add('foo', '1.0', 'end') -# >>> text.tag_ranges('foo') -# (, ) -@final -class Tcl_Obj: - @property - def string(self) -> str: ... - @property - def typename(self) -> str: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, value, /): ... - def __ge__(self, value, /): ... - def __gt__(self, value, /): ... - def __le__(self, value, /): ... - def __lt__(self, value, /): ... - def __ne__(self, value, /): ... - -class TclError(Exception): ... - -_TkinterTraceFunc: TypeAlias = Callable[[tuple[str, ...]], object] - -# This class allows running Tcl code. Tkinter uses it internally a lot, and -# it's often handy to drop a piece of Tcl code into a tkinter program. Example: -# -# >>> import tkinter, _tkinter -# >>> tkapp = tkinter.Tk().tk -# >>> isinstance(tkapp, _tkinter.TkappType) -# True -# >>> tkapp.call('set', 'foo', (1,2,3)) -# (1, 2, 3) -# >>> tkapp.eval('return $foo') -# '1 2 3' -# >>> -# -# call args can be pretty much anything. Also, call(some_tuple) is same as call(*some_tuple). -# -# eval always returns str because _tkinter_tkapp_eval_impl in _tkinter.c calls -# Tkapp_UnicodeResult, and it returns a string when it succeeds. -@final -class TkappType: - # Please keep in sync with tkinter.Tk - def adderrorinfo(self, msg: str, /) -> None: ... - def call(self, command: Any, /, *args: Any) -> Any: ... - # TODO: Figure out what arguments the following `func` callbacks should accept - def createcommand(self, name: str, func: Callable[..., object], /) -> None: ... - if sys.platform != "win32": - def createfilehandler(self, file: FileDescriptorLike, mask: int, func: Callable[..., object], /) -> None: ... - def deletefilehandler(self, file: FileDescriptorLike, /) -> None: ... - - def createtimerhandler(self, milliseconds: int, func: Callable[..., object], /): ... - def deletecommand(self, name: str, /) -> None: ... - def dooneevent(self, flags: int = 0, /) -> int: ... - def eval(self, script: str, /) -> str: ... - def evalfile(self, fileName: str, /) -> str: ... - def exprboolean(self, s: str, /) -> Literal[0, 1]: ... - def exprdouble(self, s: str, /) -> float: ... - def exprlong(self, s: str, /) -> int: ... - def exprstring(self, s: str, /) -> str: ... - def getboolean(self, arg, /) -> bool: ... - def getdouble(self, arg, /) -> float: ... - def getint(self, arg, /) -> int: ... - def getvar(self, *args, **kwargs): ... - def globalgetvar(self, *args, **kwargs): ... - def globalsetvar(self, *args, **kwargs): ... - def globalunsetvar(self, *args, **kwargs): ... - def interpaddr(self) -> int: ... - def loadtk(self) -> None: ... - def mainloop(self, threshold: int = 0, /) -> None: ... - def quit(self) -> None: ... - def record(self, script: str, /) -> str: ... - def setvar(self, *ags, **kwargs): ... - if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.9; removed in Python 3.11. Use `splitlist()` instead.") - def split(self, arg, /): ... - - def splitlist(self, arg, /) -> tuple[Incomplete, ...]: ... - def unsetvar(self, *args, **kwargs): ... - - if sys.version_info >= (3, 14): - @overload - def wantobjects(self) -> Literal[0, 1]: ... - else: - @overload - def wantobjects(self) -> bool: ... - - @overload - def wantobjects(self, wantobjects: Literal[0, 1] | bool, /) -> None: ... - - def willdispatch(self) -> None: ... - if sys.version_info >= (3, 12): - def gettrace(self, /) -> _TkinterTraceFunc | None: ... - def settrace(self, func: _TkinterTraceFunc | None, /) -> None: ... - -# These should be kept in sync with tkinter.tix constants, except ALL_EVENTS which doesn't match TCL_ALL_EVENTS -ALL_EVENTS: Final = -3 -FILE_EVENTS: Final = 8 -IDLE_EVENTS: Final = 32 -TIMER_EVENTS: Final = 16 -WINDOW_EVENTS: Final = 4 - -DONT_WAIT: Final = 2 -EXCEPTION: Final = 8 -READABLE: Final = 2 -WRITABLE: Final = 4 - -TCL_VERSION: Final[str] -TK_VERSION: Final[str] - -@final -class TkttType: - def deletetimerhandler(self) -> None: ... - -if sys.version_info >= (3, 13): - def create( - screenName: str | None = None, - baseName: str = "", - className: str = "Tk", - interactive: bool = False, - wantobjects: int = 0, - wantTk: bool = True, - sync: bool = False, - use: str | None = None, - /, - ) -> TkappType: ... - -else: - def create( - screenName: str | None = None, - baseName: str = "", - className: str = "Tk", - interactive: bool = False, - wantobjects: bool = False, - wantTk: bool = True, - sync: bool = False, - use: str | None = None, - /, - ) -> TkappType: ... - -def getbusywaitinterval() -> int: ... -def setbusywaitinterval(new_val: int, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_tracemalloc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_tracemalloc.vpi deleted file mode 100644 index e9720f46..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_tracemalloc.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from collections.abc import Sequence -from tracemalloc import _FrameTuple, _TraceTuple - -def _get_object_traceback(obj: object, /) -> Sequence[_FrameTuple] | None: ... -def _get_traces() -> Sequence[_TraceTuple]: ... -def clear_traces() -> None: ... -def get_traceback_limit() -> int: ... -def get_traced_memory() -> tuple[int, int]: ... -def get_tracemalloc_memory() -> int: ... -def is_tracing() -> bool: ... -def reset_peak() -> None: ... -def start(nframe: int = 1, /) -> None: ... -def stop() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_weakref.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_weakref.vpi deleted file mode 100644 index a744340a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_weakref.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from collections.abc import Callable -from typing import Any, TypeVar, overload -from weakref import CallableProxyType as CallableProxyType, ProxyType as ProxyType, ReferenceType as ReferenceType, ref as ref - -_C = TypeVar("_C", bound=Callable[..., Any]) -_T = TypeVar("_T") - -def getweakrefcount(object: Any, /) -> int: ... -def getweakrefs(object: Any, /) -> list[Any]: ... - -# Return CallableProxyType if object is callable, ProxyType otherwise -@overload -def proxy(object: _C, callback: Callable[[_C], Any] | None = None, /) -> CallableProxyType[_C]: ... -@overload -def proxy(object: _T, callback: Callable[[_T], Any] | None = None, /) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_weakrefset.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_weakrefset.vpi deleted file mode 100644 index 82ffa446..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_weakrefset.vpi +++ /dev/null @@ -1,49 +0,0 @@ -from collections.abc import Iterable, Iterator, MutableSet -from types import GenericAlias -from typing import Any, ClassVar, TypeVar, overload -from typing_extensions import Self - -__all__ = ["WeakSet"] - -_S = TypeVar("_S") -_T = TypeVar("_T") - -class WeakSet(MutableSet[_T]): - @overload - def __init__(self, data: None = None) -> None: ... - @overload - def __init__(self, data: Iterable[_T]) -> None: ... - - def add(self, item: _T) -> None: ... - def discard(self, item: _T) -> None: ... - def copy(self) -> Self: ... - def remove(self, item: _T) -> None: ... - def update(self, other: Iterable[_T]) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __contains__(self, item: object) -> bool: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[_T]: ... - def __ior__(self, other: Iterable[_T]) -> Self: ... # type: ignore[override,misc] - def difference(self, other: Iterable[_T]) -> Self: ... - def __sub__(self, other: Iterable[Any]) -> Self: ... - def difference_update(self, other: Iterable[Any]) -> None: ... - def __isub__(self, other: Iterable[Any]) -> Self: ... - def intersection(self, other: Iterable[_T]) -> Self: ... - def __and__(self, other: Iterable[Any]) -> Self: ... - def intersection_update(self, other: Iterable[Any]) -> None: ... - def __iand__(self, other: Iterable[Any]) -> Self: ... - def issubset(self, other: Iterable[_T]) -> bool: ... - def __le__(self, other: Iterable[_T]) -> bool: ... - def __lt__(self, other: Iterable[_T]) -> bool: ... - def issuperset(self, other: Iterable[_T]) -> bool: ... - def __ge__(self, other: Iterable[_T]) -> bool: ... - def __gt__(self, other: Iterable[_T]) -> bool: ... - def __eq__(self, other: object) -> bool: ... - def symmetric_difference(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ... - def __xor__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ... - def symmetric_difference_update(self, other: Iterable[_T]) -> None: ... - def __ixor__(self, other: Iterable[_T]) -> Self: ... # type: ignore[override,misc] - def union(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ... - def __or__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ... - def isdisjoint(self, other: Iterable[_T]) -> bool: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_winapi.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_winapi.vpi deleted file mode 100644 index 7fd918d9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_winapi.vpi +++ /dev/null @@ -1,314 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from collections.abc import Sequence -from typing import Any, Final, Literal, NoReturn, final, overload - -if sys.platform == "win32": - ABOVE_NORMAL_PRIORITY_CLASS: Final = 0x8000 - BELOW_NORMAL_PRIORITY_CLASS: Final = 0x4000 - - CREATE_BREAKAWAY_FROM_JOB: Final = 0x1000000 - CREATE_DEFAULT_ERROR_MODE: Final = 0x4000000 - CREATE_NO_WINDOW: Final = 0x8000000 - CREATE_NEW_CONSOLE: Final = 0x10 - CREATE_NEW_PROCESS_GROUP: Final = 0x200 - - DETACHED_PROCESS: Final = 8 - DUPLICATE_CLOSE_SOURCE: Final = 1 - DUPLICATE_SAME_ACCESS: Final = 2 - - ERROR_ALREADY_EXISTS: Final = 183 - ERROR_BROKEN_PIPE: Final = 109 - ERROR_IO_PENDING: Final = 997 - ERROR_MORE_DATA: Final = 234 - ERROR_NETNAME_DELETED: Final = 64 - ERROR_NO_DATA: Final = 232 - ERROR_NO_SYSTEM_RESOURCES: Final = 1450 - ERROR_OPERATION_ABORTED: Final = 995 - ERROR_PIPE_BUSY: Final = 231 - ERROR_PIPE_CONNECTED: Final = 535 - ERROR_SEM_TIMEOUT: Final = 121 - - if sys.version_info >= (3, 15): - EVENTLOG_AUDIT_FAILURE: Final = 16 - EVENTLOG_AUDIT_SUCCESS: Final = 8 - EVENTLOG_ERROR_TYPE: Final = 1 - EVENTLOG_INFORMATION_TYPE: Final = 4 - EVENTLOG_SUCCESS: Final = 0 - EVENTLOG_WARNING_TYPE: Final = 2 - - FILE_FLAG_FIRST_PIPE_INSTANCE: Final = 0x80000 - FILE_FLAG_OVERLAPPED: Final = 0x40000000 - - FILE_GENERIC_READ: Final = 1179785 - FILE_GENERIC_WRITE: Final = 1179926 - - FILE_MAP_ALL_ACCESS: Final = 983071 - FILE_MAP_COPY: Final = 1 - FILE_MAP_EXECUTE: Final = 32 - FILE_MAP_READ: Final = 4 - FILE_MAP_WRITE: Final = 2 - - FILE_TYPE_CHAR: Final = 2 - FILE_TYPE_DISK: Final = 1 - FILE_TYPE_PIPE: Final = 3 - FILE_TYPE_REMOTE: Final = 32768 - FILE_TYPE_UNKNOWN: Final = 0 - - GENERIC_READ: Final = 0x80000000 - GENERIC_WRITE: Final = 0x40000000 - HIGH_PRIORITY_CLASS: Final = 0x80 - INFINITE: Final = 0xFFFFFFFF - # Ignore the Flake8 error -- flake8-pyi assumes - # most numbers this long will be implementation details, - # but here we can see that it's a power of 2 - INVALID_HANDLE_VALUE: Final = 0xFFFFFFFFFFFFFFFF # noqa: Y054 - IDLE_PRIORITY_CLASS: Final = 0x40 - NORMAL_PRIORITY_CLASS: Final = 0x20 - REALTIME_PRIORITY_CLASS: Final = 0x100 - NMPWAIT_WAIT_FOREVER: Final = 0xFFFFFFFF - - MEM_COMMIT: Final = 0x1000 - MEM_FREE: Final = 0x10000 - MEM_IMAGE: Final = 0x1000000 - MEM_MAPPED: Final = 0x40000 - MEM_PRIVATE: Final = 0x20000 - MEM_RESERVE: Final = 0x2000 - - NULL: Final = 0 - OPEN_EXISTING: Final = 3 - - PIPE_ACCESS_DUPLEX: Final = 3 - PIPE_ACCESS_INBOUND: Final = 1 - PIPE_READMODE_MESSAGE: Final = 2 - PIPE_TYPE_MESSAGE: Final = 4 - PIPE_UNLIMITED_INSTANCES: Final = 255 - PIPE_WAIT: Final = 0 - - PAGE_EXECUTE: Final = 0x10 - PAGE_EXECUTE_READ: Final = 0x20 - PAGE_EXECUTE_READWRITE: Final = 0x40 - PAGE_EXECUTE_WRITECOPY: Final = 0x80 - PAGE_GUARD: Final = 0x100 - PAGE_NOACCESS: Final = 0x1 - PAGE_NOCACHE: Final = 0x200 - PAGE_READONLY: Final = 0x2 - PAGE_READWRITE: Final = 0x4 - PAGE_WRITECOMBINE: Final = 0x400 - PAGE_WRITECOPY: Final = 0x8 - - PROCESS_ALL_ACCESS: Final = 0x1FFFFF - PROCESS_DUP_HANDLE: Final = 0x40 - - SEC_COMMIT: Final = 0x8000000 - SEC_IMAGE: Final = 0x1000000 - SEC_LARGE_PAGES: Final = 0x80000000 - SEC_NOCACHE: Final = 0x10000000 - SEC_RESERVE: Final = 0x4000000 - SEC_WRITECOMBINE: Final = 0x40000000 - - if sys.version_info >= (3, 13): - STARTF_FORCEOFFFEEDBACK: Final = 0x80 - STARTF_FORCEONFEEDBACK: Final = 0x40 - STARTF_PREVENTPINNING: Final = 0x2000 - STARTF_RUNFULLSCREEN: Final = 0x20 - STARTF_TITLEISAPPID: Final = 0x1000 - STARTF_TITLEISLINKNAME: Final = 0x800 - STARTF_UNTRUSTEDSOURCE: Final = 0x8000 - STARTF_USECOUNTCHARS: Final = 0x8 - STARTF_USEFILLATTRIBUTE: Final = 0x10 - STARTF_USEHOTKEY: Final = 0x200 - STARTF_USEPOSITION: Final = 0x4 - STARTF_USESIZE: Final = 0x2 - - STARTF_USESHOWWINDOW: Final = 0x1 - STARTF_USESTDHANDLES: Final = 0x100 - - STD_ERROR_HANDLE: Final = 0xFFFFFFF4 - STD_OUTPUT_HANDLE: Final = 0xFFFFFFF5 - STD_INPUT_HANDLE: Final = 0xFFFFFFF6 - - STILL_ACTIVE: Final = 259 - SW_HIDE: Final = 0 - SYNCHRONIZE: Final = 0x100000 - WAIT_ABANDONED_0: Final = 128 - WAIT_OBJECT_0: Final = 0 - WAIT_TIMEOUT: Final = 258 - - LOCALE_NAME_INVARIANT: Final[str] - LOCALE_NAME_MAX_LENGTH: Final[int] - LOCALE_NAME_SYSTEM_DEFAULT: Final[str] - LOCALE_NAME_USER_DEFAULT: Final[str | None] - - LCMAP_FULLWIDTH: Final[int] - LCMAP_HALFWIDTH: Final[int] - LCMAP_HIRAGANA: Final[int] - LCMAP_KATAKANA: Final[int] - LCMAP_LINGUISTIC_CASING: Final[int] - LCMAP_LOWERCASE: Final[int] - LCMAP_SIMPLIFIED_CHINESE: Final[int] - LCMAP_TITLECASE: Final[int] - LCMAP_TRADITIONAL_CHINESE: Final[int] - LCMAP_UPPERCASE: Final[int] - - if sys.version_info >= (3, 12): - COPYFILE2_CALLBACK_CHUNK_STARTED: Final = 1 - COPYFILE2_CALLBACK_CHUNK_FINISHED: Final = 2 - COPYFILE2_CALLBACK_STREAM_STARTED: Final = 3 - COPYFILE2_CALLBACK_STREAM_FINISHED: Final = 4 - COPYFILE2_CALLBACK_POLL_CONTINUE: Final = 5 - COPYFILE2_CALLBACK_ERROR: Final = 6 - - COPYFILE2_PROGRESS_CONTINUE: Final = 0 - COPYFILE2_PROGRESS_CANCEL: Final = 1 - COPYFILE2_PROGRESS_STOP: Final = 2 - COPYFILE2_PROGRESS_QUIET: Final = 3 - COPYFILE2_PROGRESS_PAUSE: Final = 4 - - COPY_FILE_FAIL_IF_EXISTS: Final = 0x1 - COPY_FILE_RESTARTABLE: Final = 0x2 - COPY_FILE_OPEN_SOURCE_FOR_WRITE: Final = 0x4 - COPY_FILE_ALLOW_DECRYPTED_DESTINATION: Final = 0x8 - COPY_FILE_COPY_SYMLINK: Final = 0x800 - COPY_FILE_NO_BUFFERING: Final = 0x1000 - COPY_FILE_REQUEST_SECURITY_PRIVILEGES: Final = 0x2000 - COPY_FILE_RESUME_FROM_PAUSE: Final = 0x4000 - COPY_FILE_NO_OFFLOAD: Final = 0x40000 - COPY_FILE_REQUEST_COMPRESSED_TRAFFIC: Final = 0x10000000 - - ERROR_ACCESS_DENIED: Final = 5 - ERROR_PRIVILEGE_NOT_HELD: Final = 1314 - - if sys.version_info >= (3, 14): - COPY_FILE_DIRECTORY: Final = 0x00000080 - - def CloseHandle(handle: int, /) -> None: ... - - @overload - def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ... - @overload - def ConnectNamedPipe(handle: int, overlapped: Literal[False] = False) -> None: ... - @overload - def ConnectNamedPipe(handle: int, overlapped: bool) -> Overlapped | None: ... - - def CreateFile( - file_name: str, - desired_access: int, - share_mode: int, - security_attributes: int, - creation_disposition: int, - flags_and_attributes: int, - template_file: int, - /, - ) -> int: ... - def CreateFileMapping( - file_handle: int, security_attributes: int, protect: int, max_size_high: int, max_size_low: int, name: str, / - ) -> int: ... - def CreateJunction(src_path: str, dst_path: str, /) -> None: ... - def CreateNamedPipe( - name: str, - open_mode: int, - pipe_mode: int, - max_instances: int, - out_buffer_size: int, - in_buffer_size: int, - default_timeout: int, - security_attributes: int, - /, - ) -> int: ... - def CreatePipe(pipe_attrs: Any, size: int, /) -> tuple[int, int]: ... - def CreateProcess( - application_name: str | None, - command_line: str | None, - proc_attrs: Any, - thread_attrs: Any, - inherit_handles: bool, - creation_flags: int, - env_mapping: dict[str, str], - current_directory: str | None, - startup_info: Any, - /, - ) -> tuple[int, int, int, int]: ... - def DuplicateHandle( - source_process_handle: int, - source_handle: int, - target_process_handle: int, - desired_access: int, - inherit_handle: bool, - options: int = 0, - /, - ) -> int: ... - def ExitProcess(ExitCode: int, /) -> NoReturn: ... - def GetACP() -> int: ... - if sys.version_info >= (3, 15): - def DeregisterEventSource(handle: int, /) -> None: ... - def GetOEMCP() -> int: ... - - def GetFileType(handle: int) -> int: ... - def GetCurrentProcess() -> int: ... - def GetExitCodeProcess(process: int, /) -> int: ... - def GetLastError() -> int: ... - def GetModuleFileName(module_handle: int, /) -> str: ... - def GetStdHandle(std_handle: int, /) -> int: ... - def GetVersion() -> int: ... - def MapViewOfFile( - file_map: int, desired_access: int, file_offset_high: int, file_offset_low: int, number_bytes: int, / - ) -> int: ... - def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int, /) -> int: ... - def PeekNamedPipe(handle: int, size: int = 0, /) -> tuple[int, int] | tuple[bytes, int, int]: ... - def LCMapStringEx(locale: str, flags: int, src: str) -> str: ... - if sys.version_info >= (3, 15): - def RegisterEventSource(unc_server_name: str | None, source_name: str, /) -> int: ... - def ReportEvent(handle: int, type: int, category: int, event_id: int, string: str, /) -> None: ... - - def UnmapViewOfFile(address: int, /) -> None: ... - - @overload - def ReadFile(handle: int, size: int, overlapped: Literal[True]) -> tuple[Overlapped, int]: ... - @overload - def ReadFile(handle: int, size: int, overlapped: Literal[False] = False) -> tuple[bytes, int]: ... - @overload - def ReadFile(handle: int, size: int, overlapped: int | bool) -> tuple[Any, int]: ... - - def SetNamedPipeHandleState( - named_pipe: int, mode: int | None, max_collection_count: int | None, collect_data_timeout: int | None, / - ) -> None: ... - def TerminateProcess(handle: int, exit_code: int, /) -> None: ... - def VirtualQuerySize(address: int, /) -> int: ... - def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = 0xFFFFFFFF, /) -> int: ... - def WaitForSingleObject(handle: int, milliseconds: int, /) -> int: ... - def WaitNamedPipe(name: str, timeout: int, /) -> None: ... - - @overload - def WriteFile(handle: int, buffer: ReadableBuffer, overlapped: Literal[True]) -> tuple[Overlapped, int]: ... - @overload - def WriteFile(handle: int, buffer: ReadableBuffer, overlapped: Literal[False] = False) -> tuple[int, int]: ... - @overload - def WriteFile(handle: int, buffer: ReadableBuffer, overlapped: int | bool) -> tuple[Any, int]: ... - - @final - class Overlapped: - event: int - def GetOverlappedResult(self, wait: bool, /) -> tuple[int, int]: ... - def cancel(self) -> None: ... - def getbuffer(self) -> bytes | None: ... - - if sys.version_info >= (3, 13): - def BatchedWaitForMultipleObjects( - handle_seq: Sequence[int], wait_all: bool, milliseconds: int = 0xFFFFFFFF - ) -> list[int]: ... - def CreateEventW(security_attributes: int, manual_reset: bool, initial_state: bool, name: str | None) -> int: ... - def CreateMutexW(security_attributes: int, initial_owner: bool, name: str) -> int: ... - def GetLongPathName(path: str) -> str: ... - def GetShortPathName(path: str) -> str: ... - def OpenEventW(desired_access: int, inherit_handle: bool, name: str) -> int: ... - def OpenMutexW(desired_access: int, inherit_handle: bool, name: str) -> int: ... - def ReleaseMutex(mutex: int) -> None: ... - def ResetEvent(event: int) -> None: ... - def SetEvent(event: int) -> None: ... - - def OpenFileMapping(desired_access: int, inherit_handle: bool, name: str, /) -> int: ... - - if sys.version_info >= (3, 12): - def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ... - def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/_zstd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/_zstd.vpi deleted file mode 100644 index 34b619f9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/_zstd.vpi +++ /dev/null @@ -1,102 +0,0 @@ -from _typeshed import ReadableBuffer -from collections.abc import Mapping -from compression.zstd import CompressionParameter, DecompressionParameter -from typing import Final, Literal, TypeAlias, final -from typing_extensions import Self - -ZSTD_CLEVEL_DEFAULT: Final = 3 -ZSTD_DStreamOutSize: Final = 131072 -ZSTD_btlazy2: Final = 6 -ZSTD_btopt: Final = 7 -ZSTD_btultra: Final = 8 -ZSTD_btultra2: Final = 9 -ZSTD_c_chainLog: Final = 103 -ZSTD_c_checksumFlag: Final = 201 -ZSTD_c_compressionLevel: Final = 100 -ZSTD_c_contentSizeFlag: Final = 200 -ZSTD_c_dictIDFlag: Final = 202 -ZSTD_c_enableLongDistanceMatching: Final = 160 -ZSTD_c_hashLog: Final = 102 -ZSTD_c_jobSize: Final = 401 -ZSTD_c_ldmBucketSizeLog: Final = 163 -ZSTD_c_ldmHashLog: Final = 161 -ZSTD_c_ldmHashRateLog: Final = 164 -ZSTD_c_ldmMinMatch: Final = 162 -ZSTD_c_minMatch: Final = 105 -ZSTD_c_nbWorkers: Final = 400 -ZSTD_c_overlapLog: Final = 402 -ZSTD_c_searchLog: Final = 104 -ZSTD_c_strategy: Final = 107 -ZSTD_c_targetLength: Final = 106 -ZSTD_c_windowLog: Final = 101 -ZSTD_d_windowLogMax: Final = 100 -ZSTD_dfast: Final = 2 -ZSTD_fast: Final = 1 -ZSTD_greedy: Final = 3 -ZSTD_lazy: Final = 4 -ZSTD_lazy2: Final = 5 - -_ZstdCompressorContinue: TypeAlias = Literal[0] -_ZstdCompressorFlushBlock: TypeAlias = Literal[1] -_ZstdCompressorFlushFrame: TypeAlias = Literal[2] - -@final -class ZstdCompressor: - CONTINUE: Final = 0 - FLUSH_BLOCK: Final = 1 - FLUSH_FRAME: Final = 2 - def __new__( - cls, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> Self: ... - def compress( - self, /, data: ReadableBuffer, mode: _ZstdCompressorContinue | _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 0 - ) -> bytes: ... - def flush(self, /, mode: _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 2) -> bytes: ... - def set_pledged_input_size(self, size: int | None, /) -> None: ... - @property - def last_mode(self) -> _ZstdCompressorContinue | _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame: ... - -@final -class ZstdDecompressor: - def __new__( - cls, zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, options: Mapping[int, int] | None = None - ) -> Self: ... - def decompress(self, /, data: ReadableBuffer, max_length: int = -1) -> bytes: ... - @property - def eof(self) -> bool: ... - @property - def needs_input(self) -> bool: ... - @property - def unused_data(self) -> bytes: ... - -@final -class ZstdDict: - def __new__(cls, dict_content: ReadableBuffer, /, *, is_raw: bool = False) -> Self: ... - def __len__(self, /) -> int: ... - @property - def as_digested_dict(self) -> tuple[Self, int]: ... - @property - def as_prefix(self) -> tuple[Self, int]: ... - @property - def as_undigested_dict(self) -> tuple[Self, int]: ... - @property - def dict_content(self) -> bytes: ... - @property - def dict_id(self) -> int: ... - -class ZstdError(Exception): ... - -def finalize_dict( - custom_dict_bytes: bytes, samples_bytes: bytes, samples_sizes: tuple[int, ...], dict_size: int, compression_level: int, / -) -> bytes: ... -def get_frame_info(frame_buffer: ReadableBuffer) -> tuple[int, int]: ... -def get_frame_size(frame_buffer: ReadableBuffer) -> int: ... -def get_param_bounds(parameter: int, is_compress: bool) -> tuple[int, int]: ... -def set_parameter_types(c_parameter_type: type[CompressionParameter], d_parameter_type: type[DecompressionParameter]) -> None: ... -def train_dict(samples_bytes: bytes, samples_sizes: tuple[int, ...], dict_size: int, /) -> bytes: ... - -zstd_version: Final[str] -zstd_version_number: Final[int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/aifc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/aifc.vpi deleted file mode 100644 index afb9029f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/aifc.vpi +++ /dev/null @@ -1,79 +0,0 @@ -from types import TracebackType -from typing import IO, Any, Literal, NamedTuple, TypeAlias, overload -from typing_extensions import Self - -__all__ = ["Error", "open"] - -class Error(Exception): ... - -class _aifc_params(NamedTuple): - nchannels: int - sampwidth: int - framerate: int - nframes: int - comptype: bytes - compname: bytes - -_File: TypeAlias = str | IO[bytes] -_Marker: TypeAlias = tuple[int, int, bytes] - -class Aifc_read: - def __init__(self, f: _File) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def initfp(self, file: IO[bytes]) -> None: ... - def getfp(self) -> IO[bytes]: ... - def rewind(self) -> None: ... - def close(self) -> None: ... - def tell(self) -> int: ... - def getnchannels(self) -> int: ... - def getnframes(self) -> int: ... - def getsampwidth(self) -> int: ... - def getframerate(self) -> int: ... - def getcomptype(self) -> bytes: ... - def getcompname(self) -> bytes: ... - def getparams(self) -> _aifc_params: ... - def getmarkers(self) -> list[_Marker] | None: ... - def getmark(self, id: int) -> _Marker: ... - def setpos(self, pos: int) -> None: ... - def readframes(self, nframes: int) -> bytes: ... - -class Aifc_write: - def __init__(self, f: _File) -> None: ... - def __del__(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def initfp(self, file: IO[bytes]) -> None: ... - def aiff(self) -> None: ... - def aifc(self) -> None: ... - def setnchannels(self, nchannels: int) -> None: ... - def getnchannels(self) -> int: ... - def setsampwidth(self, sampwidth: int) -> None: ... - def getsampwidth(self) -> int: ... - def setframerate(self, framerate: int) -> None: ... - def getframerate(self) -> int: ... - def setnframes(self, nframes: int) -> None: ... - def getnframes(self) -> int: ... - def setcomptype(self, comptype: bytes, compname: bytes) -> None: ... - def getcomptype(self) -> bytes: ... - def getcompname(self) -> bytes: ... - def setparams(self, params: tuple[int, int, int, int, bytes, bytes]) -> None: ... - def getparams(self) -> _aifc_params: ... - def setmark(self, id: int, pos: int, name: bytes) -> None: ... - def getmark(self, id: int) -> _Marker: ... - def getmarkers(self) -> list[_Marker] | None: ... - def tell(self) -> int: ... - def writeframesraw(self, data: Any) -> None: ... # Actual type for data is Buffer Protocol - def writeframes(self, data: Any) -> None: ... - def close(self) -> None: ... - -@overload -def open(f: _File, mode: Literal["r", "rb"]) -> Aifc_read: ... -@overload -def open(f: _File, mode: Literal["w", "wb"]) -> Aifc_write: ... -@overload -def open(f: _File, mode: str | None = None) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/annotationlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/annotationlib.vpi deleted file mode 100644 index c3e843d9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/annotationlib.vpi +++ /dev/null @@ -1,156 +0,0 @@ -import sys -from typing import Literal - -if sys.version_info >= (3, 14): - import enum - import types - from _typeshed import AnnotateFunc, AnnotationForm, EvaluateFunc, SupportsItems - from collections.abc import Mapping - from typing import Any, ParamSpec, TypeVar, TypeVarTuple, final, overload - from warnings import deprecated - - __all__ = [ - "Format", - "ForwardRef", - "call_annotate_function", - "call_evaluate_function", - "get_annotate_from_class_namespace", - "get_annotations", - "annotations_to_string", - "type_repr", - ] - - class Format(enum.IntEnum): - VALUE = 1 - VALUE_WITH_FAKE_GLOBALS = 2 - FORWARDREF = 3 - STRING = 4 - - @final - class ForwardRef: - __slots__ = ( - "__forward_is_argument__", - "__forward_is_class__", - "__forward_module__", - "__weakref__", - "__arg__", - "__globals__", - "__extra_names__", - "__code__", - "__ast_node__", - "__cell__", - "__owner__", - "__stringifier_dict__", - "__resolved_str_cache__", - ) - __forward_is_argument__: bool - __forward_is_class__: bool - __forward_module__: str | None - __resolved_str_cache__: str | None - def __init__( - self, arg: str, *, module: str | None = None, owner: object = None, is_argument: bool = True, is_class: bool = False - ) -> None: ... - - @overload - def evaluate( - self, - *, - globals: dict[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None, - owner: object = None, - format: Literal[Format.STRING], - ) -> str: ... - @overload - def evaluate( - self, - *, - globals: dict[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None, - owner: object = None, - format: Literal[Format.FORWARDREF], - ) -> AnnotationForm | ForwardRef: ... - @overload - def evaluate( - self, - *, - globals: dict[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] | None = None, - owner: object = None, - format: Format = Format.VALUE, # noqa: Y011 - ) -> AnnotationForm: ... - - @deprecated("Use `ForwardRef.evaluate()` or `typing.evaluate_forward_ref()` instead.") - def _evaluate( - self, - globalns: dict[str, Any] | None, - localns: Mapping[str, Any] | None, - type_params: tuple[TypeVar | ParamSpec | TypeVarTuple, ...] = ..., - *, - recursive_guard: frozenset[str], - ) -> AnnotationForm: ... - @property - def __forward_arg__(self) -> str: ... - @property - def __forward_code__(self) -> types.CodeType: ... - @property - def __resolved_str__(self) -> str: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __or__(self, other: Any) -> types.UnionType: ... - def __ror__(self, other: Any) -> types.UnionType: ... - - @overload - def call_evaluate_function(evaluate: EvaluateFunc, format: Literal[Format.STRING], *, owner: object = None) -> str: ... - @overload - def call_evaluate_function( - evaluate: EvaluateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None - ) -> AnnotationForm | ForwardRef: ... - @overload - def call_evaluate_function(evaluate: EvaluateFunc, format: Format, *, owner: object = None) -> AnnotationForm: ... - - @overload - def call_annotate_function( - annotate: AnnotateFunc, format: Literal[Format.STRING], *, owner: object = None - ) -> dict[str, str]: ... - @overload - def call_annotate_function( - annotate: AnnotateFunc, format: Literal[Format.FORWARDREF], *, owner: object = None - ) -> dict[str, AnnotationForm | ForwardRef]: ... - @overload - def call_annotate_function(annotate: AnnotateFunc, format: Format, *, owner: object = None) -> dict[str, AnnotationForm]: ... - - def get_annotate_from_class_namespace(obj: Mapping[str, object]) -> AnnotateFunc | None: ... - - @overload - def get_annotations( - obj: Any, # any object with __annotations__ or __annotate__ - *, - globals: dict[str, object] | None = None, - locals: Mapping[str, object] | None = None, - eval_str: bool = False, - format: Literal[Format.STRING], - ) -> dict[str, str]: ... - @overload - def get_annotations( - obj: Any, - *, - globals: dict[str, object] | None = None, - locals: Mapping[str, object] | None = None, - eval_str: bool = False, - format: Literal[Format.FORWARDREF], - ) -> dict[str, AnnotationForm | ForwardRef]: ... - @overload - def get_annotations( - obj: Any, - *, - globals: dict[str, object] | None = None, - locals: Mapping[str, object] | None = None, - eval_str: bool = False, - format: Format = Format.VALUE, # noqa: Y011 - ) -> dict[str, AnnotationForm]: ... - - def type_repr(value: object) -> str: ... - def annotations_to_string(annotations: SupportsItems[str, object]) -> dict[str, str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/antigravity.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/antigravity.vpi deleted file mode 100644 index 3986e7d1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/antigravity.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from _typeshed import ReadableBuffer - -def geohash(latitude: float, longitude: float, datedow: ReadableBuffer) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/array.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/array.vpi deleted file mode 100644 index 2c83146e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/array.vpi +++ /dev/null @@ -1,113 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite -from collections.abc import Iterable, MutableSequence -from types import GenericAlias -from typing import Any, ClassVar, Literal, SupportsIndex, TypeAlias, TypeVar, overload -from typing_extensions import Self, deprecated, disjoint_base - -_IntTypeCode: TypeAlias = Literal["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q"] -if sys.version_info >= (3, 15): - _FloatTypeCode: TypeAlias = Literal["f", "d", "e", "Zf", "Zd"] -else: - _FloatTypeCode: TypeAlias = Literal["f", "d"] -if sys.version_info >= (3, 13): - _UnicodeTypeCode: TypeAlias = Literal["u", "w"] -else: - _UnicodeTypeCode: TypeAlias = Literal["u"] -_TypeCode: TypeAlias = _IntTypeCode | _FloatTypeCode | _UnicodeTypeCode - -_T = TypeVar("_T", int, float, str) - -if sys.version_info >= (3, 15): - typecodes: tuple[str, ...] -else: - typecodes: str - -@disjoint_base -class array(MutableSequence[_T]): - @property - def typecode(self) -> _TypeCode: ... - @property - def itemsize(self) -> int: ... - - @overload - def __new__( - cls: type[array[int]], typecode: _IntTypeCode, initializer: bytes | bytearray | Iterable[int] = ..., / - ) -> array[int]: ... - @overload - def __new__( - cls: type[array[float]], typecode: _FloatTypeCode, initializer: bytes | bytearray | Iterable[float] = ..., / - ) -> array[float]: ... - if sys.version_info >= (3, 13): - @overload - def __new__( - cls: type[array[str]], typecode: Literal["w"], initializer: bytes | bytearray | Iterable[str] = ..., / - ) -> array[str]: ... - @overload - @deprecated("Deprecated since Python 3.3; will be removed in Python 3.16. Use 'w' typecode instead.") - def __new__( - cls: type[array[str]], typecode: Literal["u"], initializer: bytes | bytearray | Iterable[str] = ..., / - ) -> array[str]: ... - else: - @overload - @deprecated("Deprecated since Python 3.3; will be removed in Python 3.16.") - def __new__( - cls: type[array[str]], typecode: Literal["u"], initializer: bytes | bytearray | Iterable[str] = ..., / - ) -> array[str]: ... - - @overload - def __new__(cls, typecode: str, initializer: Iterable[_T], /) -> Self: ... - @overload - def __new__(cls, typecode: str, initializer: bytes | bytearray = ..., /) -> Self: ... - - def append(self, v: _T, /) -> None: ... - def buffer_info(self) -> tuple[int, int]: ... - def byteswap(self) -> None: ... - def count(self, v: _T, /) -> int: ... - def extend(self, bb: Iterable[_T], /) -> None: ... - def frombytes(self, buffer: ReadableBuffer, /) -> None: ... - def fromfile(self, f: SupportsRead[bytes], n: int, /) -> None: ... - def fromlist(self, list: list[_T], /) -> None: ... - def fromunicode(self, ustr: str, /) -> None: ... - def index(self, v: _T, start: int = 0, stop: int = sys.maxsize, /) -> int: ... - def insert(self, i: int, v: _T, /) -> None: ... - def pop(self, i: int = -1, /) -> _T: ... - def remove(self, v: _T, /) -> None: ... - def tobytes(self) -> bytes: ... - def tofile(self, f: SupportsWrite[bytes], /) -> None: ... - def tolist(self) -> list[_T]: ... - def tounicode(self) -> str: ... - - __hash__: ClassVar[None] # type: ignore[assignment] - def __contains__(self, value: object, /) -> bool: ... - def __len__(self) -> int: ... - - @overload - def __getitem__(self, key: SupportsIndex, /) -> _T: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None], /) -> array[_T]: ... - - @overload # type: ignore[override] - def __setitem__(self, key: SupportsIndex, value: _T, /) -> None: ... - @overload - def __setitem__(self, key: slice[SupportsIndex | None], value: array[_T], /) -> None: ... - - def __delitem__(self, key: SupportsIndex | slice[SupportsIndex | None], /) -> None: ... - def __add__(self, value: array[_T], /) -> array[_T]: ... - def __eq__(self, value: object, /) -> bool: ... - def __ge__(self, value: array[_T], /) -> bool: ... - def __gt__(self, value: array[_T], /) -> bool: ... - def __iadd__(self, value: array[_T], /) -> Self: ... # type: ignore[override] - def __imul__(self, value: int, /) -> Self: ... - def __le__(self, value: array[_T], /) -> bool: ... - def __lt__(self, value: array[_T], /) -> bool: ... - def __mul__(self, value: int, /) -> array[_T]: ... - def __rmul__(self, value: int, /) -> array[_T]: ... - def __copy__(self) -> array[_T]: ... - def __deepcopy__(self, unused: Any, /) -> array[_T]: ... - def __buffer__(self, flags: int, /) -> memoryview: ... - def __release_buffer__(self, buffer: memoryview, /) -> None: ... - if sys.version_info >= (3, 12): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -ArrayType = array diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ast.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ast.vpi deleted file mode 100644 index 3d4b8f23..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ast.vpi +++ /dev/null @@ -1,2199 +0,0 @@ -import ast -import builtins -import os -import sys -import typing_extensions -from _ast import ( - PyCF_ALLOW_TOP_LEVEL_AWAIT as PyCF_ALLOW_TOP_LEVEL_AWAIT, - PyCF_ONLY_AST as PyCF_ONLY_AST, - PyCF_TYPE_COMMENTS as PyCF_TYPE_COMMENTS, -) -from _typeshed import ReadableBuffer, Unused -from collections.abc import Iterable, Iterator, Sequence -from types import EllipsisType -from typing import Any, ClassVar, Generic, Literal, TypedDict, TypeVar as _TypeVar, overload, type_check_only -from typing_extensions import Self, Unpack, deprecated, disjoint_base - -if sys.version_info >= (3, 13): - from _ast import PyCF_OPTIMIZED_AST as PyCF_OPTIMIZED_AST - -# Used for node end positions in constructor keyword arguments -_EndPositionT = typing_extensions.TypeVar("_EndPositionT", int, int | None, default=int | None) - -# Corresponds to the names in the `_attributes` class variable which is non-empty in certain AST nodes -@type_check_only -class _Attributes(TypedDict, Generic[_EndPositionT], total=False): - lineno: int - col_offset: int - end_lineno: _EndPositionT - end_col_offset: _EndPositionT - -# The various AST classes are implemented in C, and imported from _ast at runtime, -# but they consider themselves to live in the ast module, -# so we'll define the stubs in this file. -if sys.version_info >= (3, 12): - @disjoint_base - class AST: - __match_args__ = () - _attributes: ClassVar[tuple[str, ...]] - _fields: ClassVar[tuple[str, ...]] - if sys.version_info >= (3, 13): - _field_types: ClassVar[dict[str, Any]] - - if sys.version_info >= (3, 14): - def __replace__(self) -> Self: ... - -else: - class AST: - __match_args__ = () - _attributes: ClassVar[tuple[str, ...]] - _fields: ClassVar[tuple[str, ...]] - -class mod(AST): ... - -class Module(mod): - __match_args__ = ("body", "type_ignores") - body: list[stmt] - type_ignores: list[TypeIgnore] - if sys.version_info >= (3, 13): - def __init__(self, body: list[stmt] = ..., type_ignores: list[TypeIgnore] = ...) -> None: ... - else: - def __init__(self, body: list[stmt], type_ignores: list[TypeIgnore]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, body: list[stmt] = ..., type_ignores: list[TypeIgnore] = ...) -> Self: ... - -class Interactive(mod): - __match_args__ = ("body",) - body: list[stmt] - if sys.version_info >= (3, 13): - def __init__(self, body: list[stmt] = ...) -> None: ... - else: - def __init__(self, body: list[stmt]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, body: list[stmt] = ...) -> Self: ... - -class Expression(mod): - __match_args__ = ("body",) - body: expr - def __init__(self, body: expr) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, body: expr = ...) -> Self: ... - -class FunctionType(mod): - __match_args__ = ("argtypes", "returns") - argtypes: list[expr] - returns: expr - if sys.version_info >= (3, 13): - @overload - def __init__(self, argtypes: list[expr], returns: expr) -> None: ... - @overload - def __init__(self, argtypes: list[expr] = ..., *, returns: expr) -> None: ... - else: - def __init__(self, argtypes: list[expr], returns: expr) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, argtypes: list[expr] = ..., returns: expr = ...) -> Self: ... - -class stmt(AST): - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - def __init__(self, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self: ... - -class FunctionDef(stmt): - if sys.version_info >= (3, 12): - __match_args__ = ("name", "args", "body", "decorator_list", "returns", "type_comment", "type_params") - else: - __match_args__ = ("name", "args", "body", "decorator_list", "returns", "type_comment") - name: str - args: arguments - body: list[stmt] - decorator_list: list[expr] - returns: expr | None - type_comment: str | None - if sys.version_info >= (3, 12): - type_params: list[type_param] - if sys.version_info >= (3, 13): - def __init__( - self, - name: str, - args: arguments, - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - returns: expr | None = None, - type_comment: str | None = None, - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - elif sys.version_info >= (3, 12): - @overload - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None, - type_comment: str | None, - type_params: list[type_param], - **kwargs: Unpack[_Attributes], - ) -> None: ... - @overload - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None = None, - type_comment: str | None = None, - *, - type_params: list[type_param], - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None = None, - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - name: str = ..., - args: arguments = ..., - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - returns: expr | None = ..., - type_comment: str | None = ..., - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class AsyncFunctionDef(stmt): - if sys.version_info >= (3, 12): - __match_args__ = ("name", "args", "body", "decorator_list", "returns", "type_comment", "type_params") - else: - __match_args__ = ("name", "args", "body", "decorator_list", "returns", "type_comment") - name: str - args: arguments - body: list[stmt] - decorator_list: list[expr] - returns: expr | None - type_comment: str | None - if sys.version_info >= (3, 12): - type_params: list[type_param] - if sys.version_info >= (3, 13): - def __init__( - self, - name: str, - args: arguments, - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - returns: expr | None = None, - type_comment: str | None = None, - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - elif sys.version_info >= (3, 12): - @overload - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None, - type_comment: str | None, - type_params: list[type_param], - **kwargs: Unpack[_Attributes], - ) -> None: ... - @overload - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None = None, - type_comment: str | None = None, - *, - type_params: list[type_param], - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - name: str, - args: arguments, - body: list[stmt], - decorator_list: list[expr], - returns: expr | None = None, - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - name: str = ..., - args: arguments = ..., - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - returns: expr | None = ..., - type_comment: str | None = ..., - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class ClassDef(stmt): - if sys.version_info >= (3, 12): - __match_args__ = ("name", "bases", "keywords", "body", "decorator_list", "type_params") - else: - __match_args__ = ("name", "bases", "keywords", "body", "decorator_list") - name: str - bases: list[expr] - keywords: list[keyword] - body: list[stmt] - decorator_list: list[expr] - if sys.version_info >= (3, 12): - type_params: list[type_param] - if sys.version_info >= (3, 13): - def __init__( - self, - name: str, - bases: list[expr] = ..., - keywords: list[keyword] = ..., - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - elif sys.version_info >= (3, 12): - def __init__( - self, - name: str, - bases: list[expr], - keywords: list[keyword], - body: list[stmt], - decorator_list: list[expr], - type_params: list[type_param], - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - name: str, - bases: list[expr], - keywords: list[keyword], - body: list[stmt], - decorator_list: list[expr], - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - name: str = ..., - bases: list[expr] = ..., - keywords: list[keyword] = ..., - body: list[stmt] = ..., - decorator_list: list[expr] = ..., - type_params: list[type_param] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class Return(stmt): - __match_args__ = ("value",) - value: expr | None - def __init__(self, value: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Delete(stmt): - __match_args__ = ("targets",) - targets: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, targets: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, targets: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, targets: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Assign(stmt): - __match_args__ = ("targets", "value", "type_comment") - targets: list[expr] - value: expr - type_comment: str | None - if sys.version_info >= (3, 13): - @overload - def __init__( - self, targets: list[expr], value: expr, type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - @overload - def __init__( - self, targets: list[expr] = ..., *, value: expr, type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__( - self, targets: list[expr], value: expr, type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, targets: list[expr] = ..., value: expr = ..., type_comment: str | None = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -if sys.version_info >= (3, 12): - class TypeAlias(stmt): - __match_args__ = ("name", "type_params", "value") - name: Name - type_params: list[type_param] - value: expr - if sys.version_info >= (3, 13): - @overload - def __init__( - self, name: Name, type_params: list[type_param], value: expr, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - @overload - def __init__( - self, name: Name, type_params: list[type_param] = ..., *, value: expr, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - else: - def __init__( - self, name: Name, type_params: list[type_param], value: expr, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( # type: ignore[override] - self, - *, - name: Name = ..., - type_params: list[type_param] = ..., - value: expr = ..., - **kwargs: Unpack[_Attributes[int]], - ) -> Self: ... - -class AugAssign(stmt): - __match_args__ = ("target", "op", "value") - target: Name | Attribute | Subscript - op: operator - value: expr - def __init__( - self, target: Name | Attribute | Subscript, op: operator, value: expr, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - target: Name | Attribute | Subscript = ..., - op: operator = ..., - value: expr = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class AnnAssign(stmt): - __match_args__ = ("target", "annotation", "value", "simple") - target: Name | Attribute | Subscript - annotation: expr - value: expr | None - simple: int - - @overload - def __init__( - self, - target: Name | Attribute | Subscript, - annotation: expr, - value: expr | None, - simple: int, - **kwargs: Unpack[_Attributes], - ) -> None: ... - @overload - def __init__( - self, - target: Name | Attribute | Subscript, - annotation: expr, - value: expr | None = None, - *, - simple: int, - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - target: Name | Attribute | Subscript = ..., - annotation: expr = ..., - value: expr | None = ..., - simple: int = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class For(stmt): - __match_args__ = ("target", "iter", "body", "orelse", "type_comment") - target: expr - iter: expr - body: list[stmt] - orelse: list[stmt] - type_comment: str | None - if sys.version_info >= (3, 13): - def __init__( - self, - target: expr, - iter: expr, - body: list[stmt] = ..., - orelse: list[stmt] = ..., - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - target: expr, - iter: expr, - body: list[stmt], - orelse: list[stmt], - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - target: expr = ..., - iter: expr = ..., - body: list[stmt] = ..., - orelse: list[stmt] = ..., - type_comment: str | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class AsyncFor(stmt): - __match_args__ = ("target", "iter", "body", "orelse", "type_comment") - target: expr - iter: expr - body: list[stmt] - orelse: list[stmt] - type_comment: str | None - if sys.version_info >= (3, 13): - def __init__( - self, - target: expr, - iter: expr, - body: list[stmt] = ..., - orelse: list[stmt] = ..., - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - target: expr, - iter: expr, - body: list[stmt], - orelse: list[stmt], - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - target: expr = ..., - iter: expr = ..., - body: list[stmt] = ..., - orelse: list[stmt] = ..., - type_comment: str | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class While(stmt): - __match_args__ = ("test", "body", "orelse") - test: expr - body: list[stmt] - orelse: list[stmt] - if sys.version_info >= (3, 13): - def __init__( - self, test: expr, body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__(self, test: expr, body: list[stmt], orelse: list[stmt], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, test: expr = ..., body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class If(stmt): - __match_args__ = ("test", "body", "orelse") - test: expr - body: list[stmt] - orelse: list[stmt] - if sys.version_info >= (3, 13): - def __init__( - self, test: expr, body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__(self, test: expr, body: list[stmt], orelse: list[stmt], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, test: expr = ..., body: list[stmt] = ..., orelse: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class With(stmt): - __match_args__ = ("items", "body", "type_comment") - items: list[withitem] - body: list[stmt] - type_comment: str | None - if sys.version_info >= (3, 13): - def __init__( - self, - items: list[withitem] = ..., - body: list[stmt] = ..., - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, items: list[withitem], body: list[stmt], type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - items: list[withitem] = ..., - body: list[stmt] = ..., - type_comment: str | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class AsyncWith(stmt): - __match_args__ = ("items", "body", "type_comment") - items: list[withitem] - body: list[stmt] - type_comment: str | None - if sys.version_info >= (3, 13): - def __init__( - self, - items: list[withitem] = ..., - body: list[stmt] = ..., - type_comment: str | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, items: list[withitem], body: list[stmt], type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - items: list[withitem] = ..., - body: list[stmt] = ..., - type_comment: str | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class Raise(stmt): - __match_args__ = ("exc", "cause") - exc: expr | None - cause: expr | None - def __init__(self, exc: expr | None = None, cause: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, exc: expr | None = ..., cause: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Try(stmt): - __match_args__ = ("body", "handlers", "orelse", "finalbody") - body: list[stmt] - handlers: list[ExceptHandler] - orelse: list[stmt] - finalbody: list[stmt] - if sys.version_info >= (3, 13): - def __init__( - self, - body: list[stmt] = ..., - handlers: list[ExceptHandler] = ..., - orelse: list[stmt] = ..., - finalbody: list[stmt] = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - body: list[stmt], - handlers: list[ExceptHandler], - orelse: list[stmt], - finalbody: list[stmt], - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - body: list[stmt] = ..., - handlers: list[ExceptHandler] = ..., - orelse: list[stmt] = ..., - finalbody: list[stmt] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -if sys.version_info >= (3, 11): - class TryStar(stmt): - __match_args__ = ("body", "handlers", "orelse", "finalbody") - body: list[stmt] - handlers: list[ExceptHandler] - orelse: list[stmt] - finalbody: list[stmt] - if sys.version_info >= (3, 13): - def __init__( - self, - body: list[stmt] = ..., - handlers: list[ExceptHandler] = ..., - orelse: list[stmt] = ..., - finalbody: list[stmt] = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - else: - def __init__( - self, - body: list[stmt], - handlers: list[ExceptHandler], - orelse: list[stmt], - finalbody: list[stmt], - **kwargs: Unpack[_Attributes], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - body: list[stmt] = ..., - handlers: list[ExceptHandler] = ..., - orelse: list[stmt] = ..., - finalbody: list[stmt] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -class Assert(stmt): - __match_args__ = ("test", "msg") - test: expr - msg: expr | None - def __init__(self, test: expr, msg: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, test: expr = ..., msg: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Import(stmt): - if sys.version_info >= (3, 15): - __match_args__ = ("names", "is_lazy") - else: - __match_args__ = ("names",) - names: list[alias] - if sys.version_info >= (3, 15): - is_lazy: bool | None - if sys.version_info >= (3, 15): - def __init__(self, names: list[alias] = ..., is_lazy: bool | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - elif sys.version_info >= (3, 13): - def __init__(self, names: list[alias] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, names: list[alias], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 15): - def __replace__(self, *, names: list[alias] = ..., is_lazy: bool | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - - elif sys.version_info >= (3, 14): - def __replace__(self, *, names: list[alias] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class ImportFrom(stmt): - if sys.version_info >= (3, 15): - __match_args__ = ("module", "names", "level", "is_lazy") - else: - __match_args__ = ("module", "names", "level") - module: str | None - names: list[alias] - level: int - if sys.version_info >= (3, 15): - is_lazy: bool | None - if sys.version_info >= (3, 15): - @overload - def __init__( - self, module: str | None, names: list[alias], level: int, is_lazy: bool | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - @overload - def __init__( - self, - module: str | None = None, - names: list[alias] = ..., - *, - level: int, - is_lazy: bool | None = None, - **kwargs: Unpack[_Attributes], - ) -> None: ... - elif sys.version_info >= (3, 13): - @overload - def __init__(self, module: str | None, names: list[alias], level: int, **kwargs: Unpack[_Attributes]) -> None: ... - @overload - def __init__( - self, module: str | None = None, names: list[alias] = ..., *, level: int, **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - @overload - def __init__(self, module: str | None, names: list[alias], level: int, **kwargs: Unpack[_Attributes]) -> None: ... - @overload - def __init__( - self, module: str | None = None, *, names: list[alias], level: int, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 15): - def __replace__( - self, - *, - module: str | None = ..., - names: list[alias] = ..., - level: int = ..., - is_lazy: bool | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - - elif sys.version_info >= (3, 14): - def __replace__( - self, *, module: str | None = ..., names: list[alias] = ..., level: int = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Global(stmt): - __match_args__ = ("names",) - names: list[str] - if sys.version_info >= (3, 13): - def __init__(self, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, names: list[str], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Nonlocal(stmt): - __match_args__ = ("names",) - names: list[str] - if sys.version_info >= (3, 13): - def __init__(self, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, names: list[str], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, names: list[str] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Expr(stmt): - __match_args__ = ("value",) - value: expr - def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Pass(stmt): ... -class Break(stmt): ... -class Continue(stmt): ... - -class expr(AST): - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - def __init__(self, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, **kwargs: Unpack[_Attributes]) -> Self: ... - -class BoolOp(expr): - __match_args__ = ("op", "values") - op: boolop - values: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, op: boolop, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, op: boolop, values: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, op: boolop = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class NamedExpr(expr): - __match_args__ = ("target", "value") - target: Name - value: expr - def __init__(self, target: Name, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, target: Name = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class BinOp(expr): - __match_args__ = ("left", "op", "right") - left: expr - op: operator - right: expr - def __init__(self, left: expr, op: operator, right: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, left: expr = ..., op: operator = ..., right: expr = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class UnaryOp(expr): - __match_args__ = ("op", "operand") - op: unaryop - operand: expr - def __init__(self, op: unaryop, operand: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, op: unaryop = ..., operand: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Lambda(expr): - __match_args__ = ("args", "body") - args: arguments - body: expr - def __init__(self, args: arguments, body: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, args: arguments = ..., body: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class IfExp(expr): - __match_args__ = ("test", "body", "orelse") - test: expr - body: expr - orelse: expr - def __init__(self, test: expr, body: expr, orelse: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, test: expr = ..., body: expr = ..., orelse: expr = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Dict(expr): - __match_args__ = ("keys", "values") - keys: list[expr | None] - values: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, keys: list[expr | None] = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, keys: list[expr | None], values: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, keys: list[expr | None] = ..., values: list[expr] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Set(expr): - __match_args__ = ("elts",) - elts: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, elts: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elts: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, elts: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class ListComp(expr): - __match_args__ = ("elt", "generators") - elt: expr - generators: list[comprehension] - if sys.version_info >= (3, 13): - def __init__(self, elt: expr, generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elt: expr, generators: list[comprehension], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class SetComp(expr): - __match_args__ = ("elt", "generators") - elt: expr - generators: list[comprehension] - if sys.version_info >= (3, 13): - def __init__(self, elt: expr, generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elt: expr, generators: list[comprehension], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class DictComp(expr): - __match_args__ = ("key", "value", "generators") - key: expr - if sys.version_info >= (3, 15): - value: expr | None - else: - value: expr - generators: list[comprehension] - if sys.version_info >= (3, 15): - def __init__( - self, key: expr, value: expr | None = None, generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - elif sys.version_info >= (3, 13): - def __init__( - self, key: expr, value: expr, generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__(self, key: expr, value: expr, generators: list[comprehension], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 15): - def __replace__( - self, - *, - key: expr = ..., - value: expr | None = ..., - generators: list[comprehension] = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - elif sys.version_info >= (3, 14): - def __replace__( - self, *, key: expr = ..., value: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class GeneratorExp(expr): - __match_args__ = ("elt", "generators") - elt: expr - generators: list[comprehension] - if sys.version_info >= (3, 13): - def __init__(self, elt: expr, generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elt: expr, generators: list[comprehension], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, elt: expr = ..., generators: list[comprehension] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Await(expr): - __match_args__ = ("value",) - value: expr - def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Yield(expr): - __match_args__ = ("value",) - value: expr | None - def __init__(self, value: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class YieldFrom(expr): - __match_args__ = ("value",) - value: expr - def __init__(self, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Compare(expr): - __match_args__ = ("left", "ops", "comparators") - left: expr - ops: list[cmpop] - comparators: list[expr] - if sys.version_info >= (3, 13): - def __init__( - self, left: expr, ops: list[cmpop] = ..., comparators: list[expr] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__(self, left: expr, ops: list[cmpop], comparators: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, left: expr = ..., ops: list[cmpop] = ..., comparators: list[expr] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Call(expr): - __match_args__ = ("func", "args", "keywords") - func: expr - args: list[expr] - keywords: list[keyword] - if sys.version_info >= (3, 13): - def __init__( - self, func: expr, args: list[expr] = ..., keywords: list[keyword] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - def __init__(self, func: expr, args: list[expr], keywords: list[keyword], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, func: expr = ..., args: list[expr] = ..., keywords: list[keyword] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class FormattedValue(expr): - __match_args__ = ("value", "conversion", "format_spec") - value: expr - conversion: int - format_spec: expr | None - def __init__(self, value: expr, conversion: int, format_spec: expr | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, value: expr = ..., conversion: int = ..., format_spec: expr | None = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class JoinedStr(expr): - __match_args__ = ("values",) - values: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, values: list[expr], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -if sys.version_info >= (3, 14): - class TemplateStr(expr): - __match_args__ = ("values",) - values: list[expr] - def __init__(self, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - def __replace__(self, *, values: list[expr] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - - class Interpolation(expr): - __match_args__ = ("value", "str", "conversion", "format_spec") - value: expr - str: builtins.str - conversion: int - format_spec: expr | None = None - def __init__( - self, - value: expr = ..., - str: builtins.str = ..., - conversion: int = ..., - format_spec: expr | None = ..., - **kwargs: Unpack[_Attributes], - ) -> None: ... - def __replace__( - self, - *, - value: expr = ..., - str: builtins.str = ..., - conversion: int = ..., - format_spec: expr | None = ..., - **kwargs: Unpack[_Attributes], - ) -> Self: ... - -_ConstantValue: typing_extensions.TypeAlias = str | bytes | bool | int | float | complex | None | EllipsisType - -class Constant(expr): - __match_args__ = ("value", "kind") - value: _ConstantValue - kind: str | None - if sys.version_info < (3, 14): - # Aliases for value, for backwards compatibility - @property - @deprecated("Removed in Python 3.14. Use `value` instead.") - def n(self) -> _ConstantValue: ... - @n.setter - @deprecated("Removed in Python 3.14. Use `value` instead.") - def n(self, value: _ConstantValue) -> None: ... - - @property - @deprecated("Removed in Python 3.14. Use `value` instead.") - def s(self) -> _ConstantValue: ... - @s.setter - @deprecated("Removed in Python 3.14. Use `value` instead.") - def s(self, value: _ConstantValue) -> None: ... - - def __init__(self, value: _ConstantValue, kind: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: _ConstantValue = ..., kind: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Attribute(expr): - __match_args__ = ("value", "attr", "ctx") - value: expr - attr: str - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - def __init__(self, value: expr, attr: str, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, value: expr = ..., attr: str = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Subscript(expr): - __match_args__ = ("value", "slice", "ctx") - value: expr - slice: expr - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - def __init__(self, value: expr, slice: expr, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, value: expr = ..., slice: expr = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class Starred(expr): - __match_args__ = ("value", "ctx") - value: expr - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - def __init__(self, value: expr, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Name(expr): - __match_args__ = ("id", "ctx") - id: str - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - def __init__(self, id: str, ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, id: str = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class List(expr): - __match_args__ = ("elts", "ctx") - elts: list[expr] - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - if sys.version_info >= (3, 13): - def __init__(self, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elts: list[expr], ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class Tuple(expr): - __match_args__ = ("elts", "ctx") - elts: list[expr] - ctx: expr_context # Not present in Python < 3.13 if not passed to `__init__` - dims: list[expr] - if sys.version_info >= (3, 13): - def __init__(self, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, elts: list[expr], ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, elts: list[expr] = ..., ctx: expr_context = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -@deprecated("Deprecated since Python 3.9.") -class slice(AST): ... - -class Slice(expr): - __match_args__ = ("lower", "upper", "step") - lower: expr | None - upper: expr | None - step: expr | None - def __init__( - self, lower: expr | None = None, upper: expr | None = None, step: expr | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, lower: expr | None = ..., upper: expr | None = ..., step: expr | None = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -@deprecated("Deprecated since Python 3.9. Use `ast.Tuple` instead.") -class ExtSlice(slice): - def __new__(cls, dims: Iterable[slice] = (), **kwargs: Unpack[_Attributes]) -> Tuple: ... # type: ignore[misc] - -@deprecated("Deprecated since Python 3.9. Use the index value directly instead.") -class Index(slice): - def __new__(cls, value: expr, **kwargs: Unpack[_Attributes]) -> expr: ... # type: ignore[misc] - -class expr_context(AST): ... - -@deprecated("Deprecated since Python 3.9. Unused in Python 3.") -class AugLoad(expr_context): ... - -@deprecated("Deprecated since Python 3.9. Unused in Python 3.") -class AugStore(expr_context): ... - -@deprecated("Deprecated since Python 3.9. Unused in Python 3.") -class Param(expr_context): ... - -@deprecated("Deprecated since Python 3.9. Unused in Python 3.") -class Suite(mod): ... - -class Load(expr_context): ... -class Store(expr_context): ... -class Del(expr_context): ... -class boolop(AST): ... -class And(boolop): ... -class Or(boolop): ... -class operator(AST): ... -class Add(operator): ... -class Sub(operator): ... -class Mult(operator): ... -class MatMult(operator): ... -class Div(operator): ... -class Mod(operator): ... -class Pow(operator): ... -class LShift(operator): ... -class RShift(operator): ... -class BitOr(operator): ... -class BitXor(operator): ... -class BitAnd(operator): ... -class FloorDiv(operator): ... -class unaryop(AST): ... -class Invert(unaryop): ... -class Not(unaryop): ... -class UAdd(unaryop): ... -class USub(unaryop): ... -class cmpop(AST): ... -class Eq(cmpop): ... -class NotEq(cmpop): ... -class Lt(cmpop): ... -class LtE(cmpop): ... -class Gt(cmpop): ... -class GtE(cmpop): ... -class Is(cmpop): ... -class IsNot(cmpop): ... -class In(cmpop): ... -class NotIn(cmpop): ... - -class comprehension(AST): - __match_args__ = ("target", "iter", "ifs", "is_async") - target: expr - iter: expr - ifs: list[expr] - is_async: int - if sys.version_info >= (3, 13): - @overload - def __init__(self, target: expr, iter: expr, ifs: list[expr], is_async: int) -> None: ... - @overload - def __init__(self, target: expr, iter: expr, ifs: list[expr] = ..., *, is_async: int) -> None: ... - else: - def __init__(self, target: expr, iter: expr, ifs: list[expr], is_async: int) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, target: expr = ..., iter: expr = ..., ifs: list[expr] = ..., is_async: int = ...) -> Self: ... - -class excepthandler(AST): - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - def __init__(self, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, lineno: int = ..., col_offset: int = ..., end_lineno: int | None = ..., end_col_offset: int | None = ... - ) -> Self: ... - -class ExceptHandler(excepthandler): - __match_args__ = ("type", "name", "body") - type: expr | None - name: str | None - body: list[stmt] - if sys.version_info >= (3, 13): - def __init__( - self, type: expr | None = None, name: str | None = None, body: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> None: ... - else: - @overload - def __init__(self, type: expr | None, name: str | None, body: list[stmt], **kwargs: Unpack[_Attributes]) -> None: ... - @overload - def __init__( - self, type: expr | None = None, name: str | None = None, *, body: list[stmt], **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, type: expr | None = ..., name: str | None = ..., body: list[stmt] = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class arguments(AST): - __match_args__ = ("posonlyargs", "args", "vararg", "kwonlyargs", "kw_defaults", "kwarg", "defaults") - posonlyargs: list[arg] - args: list[arg] - vararg: arg | None - kwonlyargs: list[arg] - kw_defaults: list[expr | None] - kwarg: arg | None - defaults: list[expr] - if sys.version_info >= (3, 13): - def __init__( - self, - posonlyargs: list[arg] = ..., - args: list[arg] = ..., - vararg: arg | None = None, - kwonlyargs: list[arg] = ..., - kw_defaults: list[expr | None] = ..., - kwarg: arg | None = None, - defaults: list[expr] = ..., - ) -> None: ... - else: - @overload - def __init__( - self, - posonlyargs: list[arg], - args: list[arg], - vararg: arg | None, - kwonlyargs: list[arg], - kw_defaults: list[expr | None], - kwarg: arg | None, - defaults: list[expr], - ) -> None: ... - @overload - def __init__( - self, - posonlyargs: list[arg], - args: list[arg], - vararg: arg | None, - kwonlyargs: list[arg], - kw_defaults: list[expr | None], - kwarg: arg | None = None, - *, - defaults: list[expr], - ) -> None: ... - @overload - def __init__( - self, - posonlyargs: list[arg], - args: list[arg], - vararg: arg | None = None, - *, - kwonlyargs: list[arg], - kw_defaults: list[expr | None], - kwarg: arg | None = None, - defaults: list[expr], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - posonlyargs: list[arg] = ..., - args: list[arg] = ..., - vararg: arg | None = ..., - kwonlyargs: list[arg] = ..., - kw_defaults: list[expr | None] = ..., - kwarg: arg | None = ..., - defaults: list[expr] = ..., - ) -> Self: ... - -class arg(AST): - __match_args__ = ("arg", "annotation", "type_comment") - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - arg: str - annotation: expr | None - type_comment: str | None - def __init__( - self, arg: str, annotation: expr | None = None, type_comment: str | None = None, **kwargs: Unpack[_Attributes] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, arg: str = ..., annotation: expr | None = ..., type_comment: str | None = ..., **kwargs: Unpack[_Attributes] - ) -> Self: ... - -class keyword(AST): - __match_args__ = ("arg", "value") - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - arg: str | None - value: expr - - @overload - def __init__(self, arg: str | None, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - @overload - def __init__(self, arg: str | None = None, *, value: expr, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, arg: str | None = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class alias(AST): - __match_args__ = ("name", "asname") - name: str - asname: str | None - lineno: int - col_offset: int - end_lineno: int | None - end_col_offset: int | None - def __init__(self, name: str, asname: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, name: str = ..., asname: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class withitem(AST): - __match_args__ = ("context_expr", "optional_vars") - context_expr: expr - optional_vars: expr | None - def __init__(self, context_expr: expr, optional_vars: expr | None = None) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, context_expr: expr = ..., optional_vars: expr | None = ...) -> Self: ... - -class pattern(AST): - lineno: int - col_offset: int - end_lineno: int - end_col_offset: int - def __init__(self, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ... - ) -> Self: ... - -class match_case(AST): - __match_args__ = ("pattern", "guard", "body") - pattern: ast.pattern - guard: expr | None - body: list[stmt] - if sys.version_info >= (3, 13): - def __init__(self, pattern: ast.pattern, guard: expr | None = None, body: list[stmt] = ...) -> None: ... - else: - @overload - def __init__(self, pattern: ast.pattern, guard: expr | None, body: list[stmt]) -> None: ... - @overload - def __init__(self, pattern: ast.pattern, guard: expr | None = None, *, body: list[stmt]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, pattern: ast.pattern = ..., guard: expr | None = ..., body: list[stmt] = ...) -> Self: ... - -class Match(stmt): - __match_args__ = ("subject", "cases") - subject: expr - cases: list[match_case] - if sys.version_info >= (3, 13): - def __init__(self, subject: expr, cases: list[match_case] = ..., **kwargs: Unpack[_Attributes]) -> None: ... - else: - def __init__(self, subject: expr, cases: list[match_case], **kwargs: Unpack[_Attributes]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, subject: expr = ..., cases: list[match_case] = ..., **kwargs: Unpack[_Attributes]) -> Self: ... - -class MatchValue(pattern): - __match_args__ = ("value",) - value: expr - def __init__(self, value: expr, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: expr = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... - -class MatchSingleton(pattern): - __match_args__ = ("value",) - value: bool | None - def __init__(self, value: bool | None, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, value: bool | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... - -class MatchSequence(pattern): - __match_args__ = ("patterns",) - patterns: list[pattern] - if sys.version_info >= (3, 13): - def __init__(self, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> None: ... - else: - def __init__(self, patterns: list[pattern], **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... - -class MatchMapping(pattern): - __match_args__ = ("keys", "patterns", "rest") - keys: list[expr] - patterns: list[pattern] - rest: str | None - if sys.version_info >= (3, 13): - def __init__( - self, - keys: list[expr] = ..., - patterns: list[pattern] = ..., - rest: str | None = None, - **kwargs: Unpack[_Attributes[int]], - ) -> None: ... - else: - def __init__( - self, keys: list[expr], patterns: list[pattern], rest: str | None = None, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - keys: list[expr] = ..., - patterns: list[pattern] = ..., - rest: str | None = ..., - **kwargs: Unpack[_Attributes[int]], - ) -> Self: ... - -class MatchClass(pattern): - __match_args__ = ("cls", "patterns", "kwd_attrs", "kwd_patterns") - cls: expr - patterns: list[pattern] - kwd_attrs: list[str] - kwd_patterns: list[pattern] - if sys.version_info >= (3, 13): - def __init__( - self, - cls: expr, - patterns: list[pattern] = ..., - kwd_attrs: list[str] = ..., - kwd_patterns: list[pattern] = ..., - **kwargs: Unpack[_Attributes[int]], - ) -> None: ... - else: - def __init__( - self, - cls: expr, - patterns: list[pattern], - kwd_attrs: list[str], - kwd_patterns: list[pattern], - **kwargs: Unpack[_Attributes[int]], - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - cls: expr = ..., - patterns: list[pattern] = ..., - kwd_attrs: list[str] = ..., - kwd_patterns: list[pattern] = ..., - **kwargs: Unpack[_Attributes[int]], - ) -> Self: ... - -class MatchStar(pattern): - __match_args__ = ("name",) - name: str | None - def __init__(self, name: str | None = None, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, name: str | None = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... - -class MatchAs(pattern): - __match_args__ = ("pattern", "name") - pattern: ast.pattern | None - name: str | None - def __init__( - self, pattern: ast.pattern | None = None, name: str | None = None, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, pattern: ast.pattern | None = ..., name: str | None = ..., **kwargs: Unpack[_Attributes[int]] - ) -> Self: ... - -class MatchOr(pattern): - __match_args__ = ("patterns",) - patterns: list[pattern] - if sys.version_info >= (3, 13): - def __init__(self, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> None: ... - else: - def __init__(self, patterns: list[pattern], **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, patterns: list[pattern] = ..., **kwargs: Unpack[_Attributes[int]]) -> Self: ... - -class type_ignore(AST): ... - -class TypeIgnore(type_ignore): - __match_args__ = ("lineno", "tag") - lineno: int - tag: str - def __init__(self, lineno: int, tag: str) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, *, lineno: int = ..., tag: str = ...) -> Self: ... - -if sys.version_info >= (3, 12): - class type_param(AST): - lineno: int - col_offset: int - end_lineno: int - end_col_offset: int - def __init__(self, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__(self, **kwargs: Unpack[_Attributes[int]]) -> Self: ... - - class TypeVar(type_param): - if sys.version_info >= (3, 13): - __match_args__ = ("name", "bound", "default_value") - else: - __match_args__ = ("name", "bound") - name: str - bound: expr | None - if sys.version_info >= (3, 13): - default_value: expr | None - def __init__( - self, name: str, bound: expr | None = None, default_value: expr | None = None, **kwargs: Unpack[_Attributes[int]] - ) -> None: ... - else: - def __init__(self, name: str, bound: expr | None = None, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, - *, - name: str = ..., - bound: expr | None = ..., - default_value: expr | None = ..., - **kwargs: Unpack[_Attributes[int]], - ) -> Self: ... - - class ParamSpec(type_param): - if sys.version_info >= (3, 13): - __match_args__ = ("name", "default_value") - else: - __match_args__ = ("name",) - name: str - if sys.version_info >= (3, 13): - default_value: expr | None - def __init__(self, name: str, default_value: expr | None = None, **kwargs: Unpack[_Attributes[int]]) -> None: ... - else: - def __init__(self, name: str, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, name: str = ..., default_value: expr | None = ..., **kwargs: Unpack[_Attributes[int]] - ) -> Self: ... - - class TypeVarTuple(type_param): - if sys.version_info >= (3, 13): - __match_args__ = ("name", "default_value") - else: - __match_args__ = ("name",) - name: str - if sys.version_info >= (3, 13): - default_value: expr | None - def __init__(self, name: str, default_value: expr | None = None, **kwargs: Unpack[_Attributes[int]]) -> None: ... - else: - def __init__(self, name: str, **kwargs: Unpack[_Attributes[int]]) -> None: ... - - if sys.version_info >= (3, 14): - def __replace__( - self, *, name: str = ..., default_value: expr | None = ..., **kwargs: Unpack[_Attributes[int]] - ) -> Self: ... - -if sys.version_info >= (3, 14): - @type_check_only - class _ABC(type): - def __init__(cls, *args: Unused) -> None: ... - -else: - class _ABC(type): - def __init__(cls, *args: Unused) -> None: ... - -if sys.version_info < (3, 14): - @deprecated("Removed in Python 3.14. Use `ast.Constant` instead.") - class Num(Constant, metaclass=_ABC): - def __new__(cls, n: complex, **kwargs: Unpack[_Attributes]) -> Constant: ... # type: ignore[misc] # viper: ignore[reportInconsistentConstructor] - - @deprecated("Removed in Python 3.14. Use `ast.Constant` instead.") - class Str(Constant, metaclass=_ABC): - def __new__(cls, s: str, **kwargs: Unpack[_Attributes]) -> Constant: ... # type: ignore[misc] # viper: ignore[reportInconsistentConstructor] - - @deprecated("Removed in Python 3.14. Use `ast.Constant` instead.") - class Bytes(Constant, metaclass=_ABC): - def __new__(cls, s: bytes, **kwargs: Unpack[_Attributes]) -> Constant: ... # type: ignore[misc] # viper: ignore[reportInconsistentConstructor] - - @deprecated("Removed in Python 3.14. Use `ast.Constant` instead.") - class NameConstant(Constant, metaclass=_ABC): - def __new__(cls, value: _ConstantValue, kind: str | None, **kwargs: Unpack[_Attributes]) -> Constant: ... # type: ignore[misc] # viper: ignore[reportInconsistentConstructor] - - @deprecated("Removed in Python 3.14. Use `ast.Constant` instead.") - class Ellipsis(Constant, metaclass=_ABC): - def __new__(cls, **kwargs: Unpack[_Attributes]) -> Constant: ... # type: ignore[misc] # viper: ignore[reportInconsistentConstructor] - -# everything below here is defined in ast.py - -_T = _TypeVar("_T", bound=AST) - -if sys.version_info >= (3, 15): - @overload - def parse( - source: _T, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec", "eval", "func_type", "single"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> _T: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> Module: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["eval"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["func_type"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["single"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["eval"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["func_type"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["single"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: str = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - module: str | None = None, - ) -> mod: ... -elif sys.version_info >= (3, 13): - @overload - def parse( - source: _T, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec", "eval", "func_type", "single"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> _T: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> Module: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["eval"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["func_type"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["single"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["eval"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["func_type"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["single"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: str = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - optimize: Literal[-1, 0, 1, 2] = -1, - ) -> mod: ... -else: - @overload - def parse( - source: _T, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec", "eval", "func_type", "single"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> _T: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: Literal["exec"] = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> Module: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["eval"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["func_type"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any], - mode: Literal["single"], - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["eval"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> Expression: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["func_type"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> FunctionType: ... - @overload - def parse( - source: str | ReadableBuffer, - *, - mode: Literal["single"], - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> Interactive: ... - @overload - def parse( - source: str | ReadableBuffer, - filename: str | bytes | os.PathLike[Any] = "", - mode: str = "exec", - *, - type_comments: bool = False, - feature_version: None | int | tuple[int, int] = None, - ) -> mod: ... - -def literal_eval(node_or_string: str | AST) -> Any: ... - -if sys.version_info >= (3, 15): - def dump( - node: AST, - annotate_fields: bool = True, - include_attributes: bool = False, - *, - indent: int | str | None = None, - show_empty: bool = False, - color: bool = False, - ) -> str: ... - -elif sys.version_info >= (3, 13): - def dump( - node: AST, - annotate_fields: bool = True, - include_attributes: bool = False, - *, - indent: int | str | None = None, - show_empty: bool = False, - ) -> str: ... - -else: - def dump( - node: AST, annotate_fields: bool = True, include_attributes: bool = False, *, indent: int | str | None = None - ) -> str: ... - -def copy_location(new_node: _T, old_node: AST) -> _T: ... -def fix_missing_locations(node: _T) -> _T: ... -def increment_lineno(node: _T, n: int = 1) -> _T: ... -def iter_fields(node: AST) -> Iterator[tuple[str, Any]]: ... -def iter_child_nodes(node: AST) -> Iterator[AST]: ... -def get_docstring(node: AsyncFunctionDef | FunctionDef | ClassDef | Module, clean: bool = True) -> str | None: ... -def get_source_segment(source: str, node: AST, *, padded: bool = False) -> str | None: ... -def walk(node: AST) -> Iterator[AST]: ... - -if sys.version_info >= (3, 14): - def compare(left: AST, right: AST, /, *, compare_attributes: bool = False) -> bool: ... - -class NodeVisitor: - # All visit methods below can be overwritten by subclasses and return an - # arbitrary value, which is passed to the caller. - def visit(self, node: AST) -> Any: ... - def generic_visit(self, node: AST) -> Any: ... - # The following visit methods are not defined on NodeVisitor, but can - # be implemented by subclasses and are called during a visit if defined. - def visit_Module(self, node: Module) -> Any: ... - def visit_Interactive(self, node: Interactive) -> Any: ... - def visit_Expression(self, node: Expression) -> Any: ... - def visit_FunctionDef(self, node: FunctionDef) -> Any: ... - def visit_AsyncFunctionDef(self, node: AsyncFunctionDef) -> Any: ... - def visit_ClassDef(self, node: ClassDef) -> Any: ... - def visit_Return(self, node: Return) -> Any: ... - def visit_Delete(self, node: Delete) -> Any: ... - def visit_Assign(self, node: Assign) -> Any: ... - def visit_AugAssign(self, node: AugAssign) -> Any: ... - def visit_AnnAssign(self, node: AnnAssign) -> Any: ... - def visit_For(self, node: For) -> Any: ... - def visit_AsyncFor(self, node: AsyncFor) -> Any: ... - def visit_While(self, node: While) -> Any: ... - def visit_If(self, node: If) -> Any: ... - def visit_With(self, node: With) -> Any: ... - def visit_AsyncWith(self, node: AsyncWith) -> Any: ... - def visit_Raise(self, node: Raise) -> Any: ... - def visit_Try(self, node: Try) -> Any: ... - def visit_Assert(self, node: Assert) -> Any: ... - def visit_Import(self, node: Import) -> Any: ... - def visit_ImportFrom(self, node: ImportFrom) -> Any: ... - def visit_Global(self, node: Global) -> Any: ... - def visit_Nonlocal(self, node: Nonlocal) -> Any: ... - def visit_Expr(self, node: Expr) -> Any: ... - def visit_Pass(self, node: Pass) -> Any: ... - def visit_Break(self, node: Break) -> Any: ... - def visit_Continue(self, node: Continue) -> Any: ... - def visit_Slice(self, node: Slice) -> Any: ... - def visit_BoolOp(self, node: BoolOp) -> Any: ... - def visit_BinOp(self, node: BinOp) -> Any: ... - def visit_UnaryOp(self, node: UnaryOp) -> Any: ... - def visit_Lambda(self, node: Lambda) -> Any: ... - def visit_IfExp(self, node: IfExp) -> Any: ... - def visit_Dict(self, node: Dict) -> Any: ... - def visit_Set(self, node: Set) -> Any: ... - def visit_ListComp(self, node: ListComp) -> Any: ... - def visit_SetComp(self, node: SetComp) -> Any: ... - def visit_DictComp(self, node: DictComp) -> Any: ... - def visit_GeneratorExp(self, node: GeneratorExp) -> Any: ... - def visit_Await(self, node: Await) -> Any: ... - def visit_Yield(self, node: Yield) -> Any: ... - def visit_YieldFrom(self, node: YieldFrom) -> Any: ... - def visit_Compare(self, node: Compare) -> Any: ... - def visit_Call(self, node: Call) -> Any: ... - def visit_FormattedValue(self, node: FormattedValue) -> Any: ... - def visit_JoinedStr(self, node: JoinedStr) -> Any: ... - def visit_Constant(self, node: Constant) -> Any: ... - def visit_NamedExpr(self, node: NamedExpr) -> Any: ... - def visit_TypeIgnore(self, node: TypeIgnore) -> Any: ... - def visit_Attribute(self, node: Attribute) -> Any: ... - def visit_Subscript(self, node: Subscript) -> Any: ... - def visit_Starred(self, node: Starred) -> Any: ... - def visit_Name(self, node: Name) -> Any: ... - def visit_List(self, node: List) -> Any: ... - def visit_Tuple(self, node: Tuple) -> Any: ... - def visit_Del(self, node: Del) -> Any: ... - def visit_Load(self, node: Load) -> Any: ... - def visit_Store(self, node: Store) -> Any: ... - def visit_And(self, node: And) -> Any: ... - def visit_Or(self, node: Or) -> Any: ... - def visit_Add(self, node: Add) -> Any: ... - def visit_BitAnd(self, node: BitAnd) -> Any: ... - def visit_BitOr(self, node: BitOr) -> Any: ... - def visit_BitXor(self, node: BitXor) -> Any: ... - def visit_Div(self, node: Div) -> Any: ... - def visit_FloorDiv(self, node: FloorDiv) -> Any: ... - def visit_LShift(self, node: LShift) -> Any: ... - def visit_Mod(self, node: Mod) -> Any: ... - def visit_Mult(self, node: Mult) -> Any: ... - def visit_MatMult(self, node: MatMult) -> Any: ... - def visit_Pow(self, node: Pow) -> Any: ... - def visit_RShift(self, node: RShift) -> Any: ... - def visit_Sub(self, node: Sub) -> Any: ... - def visit_Invert(self, node: Invert) -> Any: ... - def visit_Not(self, node: Not) -> Any: ... - def visit_UAdd(self, node: UAdd) -> Any: ... - def visit_USub(self, node: USub) -> Any: ... - def visit_Eq(self, node: Eq) -> Any: ... - def visit_Gt(self, node: Gt) -> Any: ... - def visit_GtE(self, node: GtE) -> Any: ... - def visit_In(self, node: In) -> Any: ... - def visit_Is(self, node: Is) -> Any: ... - def visit_IsNot(self, node: IsNot) -> Any: ... - def visit_Lt(self, node: Lt) -> Any: ... - def visit_LtE(self, node: LtE) -> Any: ... - def visit_NotEq(self, node: NotEq) -> Any: ... - def visit_NotIn(self, node: NotIn) -> Any: ... - def visit_comprehension(self, node: comprehension) -> Any: ... - def visit_ExceptHandler(self, node: ExceptHandler) -> Any: ... - def visit_arguments(self, node: arguments) -> Any: ... - def visit_arg(self, node: arg) -> Any: ... - def visit_keyword(self, node: keyword) -> Any: ... - def visit_alias(self, node: alias) -> Any: ... - def visit_withitem(self, node: withitem) -> Any: ... - def visit_Match(self, node: Match) -> Any: ... - def visit_match_case(self, node: match_case) -> Any: ... - def visit_MatchValue(self, node: MatchValue) -> Any: ... - def visit_MatchSequence(self, node: MatchSequence) -> Any: ... - def visit_MatchSingleton(self, node: MatchSingleton) -> Any: ... - def visit_MatchStar(self, node: MatchStar) -> Any: ... - def visit_MatchMapping(self, node: MatchMapping) -> Any: ... - def visit_MatchClass(self, node: MatchClass) -> Any: ... - def visit_MatchAs(self, node: MatchAs) -> Any: ... - def visit_MatchOr(self, node: MatchOr) -> Any: ... - - if sys.version_info >= (3, 11): - def visit_TryStar(self, node: TryStar) -> Any: ... - - if sys.version_info >= (3, 12): - def visit_TypeVar(self, node: TypeVar) -> Any: ... - def visit_ParamSpec(self, node: ParamSpec) -> Any: ... - def visit_TypeVarTuple(self, node: TypeVarTuple) -> Any: ... - def visit_TypeAlias(self, node: TypeAlias) -> Any: ... - - if sys.version_info >= (3, 14): - def visit_TemplateStr(self, node: TemplateStr) -> Any: ... - def visit_Interpolation(self, node: Interpolation) -> Any: ... - - # visit methods for deprecated nodes - def visit_ExtSlice(self, node: ExtSlice) -> Any: ... - def visit_Index(self, node: Index) -> Any: ... - def visit_Suite(self, node: Suite) -> Any: ... - def visit_AugLoad(self, node: AugLoad) -> Any: ... - def visit_AugStore(self, node: AugStore) -> Any: ... - def visit_Param(self, node: Param) -> Any: ... - - if sys.version_info < (3, 14): - @deprecated("Removed in Python 3.14. Use `visit_Constant` instead.") - def visit_Num(self, node: Num) -> Any: ... # type: ignore[deprecated] - @deprecated("Removed in Python 3.14. Use `visit_Constant` instead.") - def visit_Str(self, node: Str) -> Any: ... # type: ignore[deprecated] - @deprecated("Removed in Python 3.14. Use `visit_Constant` instead.") - def visit_Bytes(self, node: Bytes) -> Any: ... # type: ignore[deprecated] - @deprecated("Removed in Python 3.14. Use `visit_Constant` instead.") - def visit_NameConstant(self, node: NameConstant) -> Any: ... # type: ignore[deprecated] - @deprecated("Removed in Python 3.14. Use `visit_Constant` instead.") - def visit_Ellipsis(self, node: Ellipsis) -> Any: ... # type: ignore[deprecated] - -class NodeTransformer(NodeVisitor): - def generic_visit(self, node: AST) -> AST: ... - # TODO: Override the visit_* methods with better return types. - # The usual return type is AST | None, but Iterable[AST] - # is also allowed in some cases -- this needs to be mapped. - -def unparse(ast_obj: AST) -> str: ... - -if sys.version_info >= (3, 14): - def main(args: Sequence[str] | None = None) -> None: ... - -else: - def main() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asynchat.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asynchat.vpi deleted file mode 100644 index 79a70d1c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asynchat.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import asyncore -from abc import abstractmethod - -class simple_producer: - def __init__(self, data: bytes, buffer_size: int = 512) -> None: ... - def more(self) -> bytes: ... - -class async_chat(asyncore.dispatcher): - ac_in_buffer_size: int - ac_out_buffer_size: int - @abstractmethod - def collect_incoming_data(self, data: bytes) -> None: ... - @abstractmethod - def found_terminator(self) -> None: ... - def set_terminator(self, term: bytes | int | None) -> None: ... - def get_terminator(self) -> bytes | int | None: ... - def push(self, data: bytes) -> None: ... - def push_with_producer(self, producer: simple_producer) -> None: ... - def close_when_done(self) -> None: ... - def initiate_send(self) -> None: ... - def discard_buffers(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/__init__.vpi deleted file mode 100644 index 5748c85a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/__init__.vpi +++ /dev/null @@ -1,1022 +0,0 @@ -# This condition is so big, it's clearer to keep to platform condition in two blocks -# Can't NOQA on a specific line: https://github.com/plinss/flake8-noqa/issues/22 -import sys -from collections.abc import Awaitable, Coroutine, Generator -from typing import Any, TypeAlias, TypeVar - -# As at runtime, this depends on all submodules defining __all__ accurately. -from .base_events import * -from .coroutines import * -from .events import * -from .exceptions import * -from .futures import * -from .locks import * -from .protocols import * -from .queues import * -from .runners import * -from .streams import * -from .subprocess import * -from .tasks import * -from .threads import * -from .transports import * - -if sys.version_info >= (3, 14): - from .graph import * - -if sys.version_info >= (3, 11): - from .taskgroups import * - from .timeouts import * - -if sys.platform == "win32": - from .windows_events import * -else: - from .unix_events import * - -if sys.version_info >= (3, 14): - from .events import _AbstractEventLoopPolicy - - AbstractEventLoopPolicy = _AbstractEventLoopPolicy - -if sys.platform == "win32": - if sys.version_info >= (3, 14): - from .windows_events import _DefaultEventLoopPolicy, _WindowsProactorEventLoopPolicy, _WindowsSelectorEventLoopPolicy - - DefaultEventLoopPolicy = _DefaultEventLoopPolicy - WindowsProactorEventLoopPolicy = _WindowsProactorEventLoopPolicy - WindowsSelectorEventLoopPolicy = _WindowsSelectorEventLoopPolicy -else: - if sys.version_info >= (3, 14): - from .unix_events import _DefaultEventLoopPolicy - - DefaultEventLoopPolicy = _DefaultEventLoopPolicy - -if sys.platform == "win32": - if sys.version_info >= (3, 14): - - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "future_discard_from_awaited_by", # from futures - "future_add_to_awaited_by", # from futures - "capture_call_graph", # from graph - "format_call_graph", # from graph - "print_call_graph", # from graph - "FrameCallGraphEntry", # from graph - "FutureCallGraph", # from graph - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "QueueShutDown", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from windows_events - "ProactorEventLoop", # from windows_events - "IocpProactor", # from windows_events - "_DefaultEventLoopPolicy", # from windows_events - "_WindowsSelectorEventLoopPolicy", # from windows_events - "_WindowsProactorEventLoopPolicy", # from windows_events - "EventLoop", # from windows_events - ) - elif sys.version_info >= (3, 13): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "QueueShutDown", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from windows_events - "ProactorEventLoop", # from windows_events - "IocpProactor", # from windows_events - "DefaultEventLoopPolicy", # from windows_events - "WindowsSelectorEventLoopPolicy", # from windows_events - "WindowsProactorEventLoopPolicy", # from windows_events - "EventLoop", # from windows_events - ) - elif sys.version_info >= (3, 12): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from windows_events - "ProactorEventLoop", # from windows_events - "IocpProactor", # from windows_events - "DefaultEventLoopPolicy", # from windows_events - "WindowsSelectorEventLoopPolicy", # from windows_events - "WindowsProactorEventLoopPolicy", # from windows_events - ) - elif sys.version_info >= (3, 11): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from windows_events - "ProactorEventLoop", # from windows_events - "IocpProactor", # from windows_events - "DefaultEventLoopPolicy", # from windows_events - "WindowsSelectorEventLoopPolicy", # from windows_events - "WindowsProactorEventLoopPolicy", # from windows_events - ) - else: - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "coroutine", # from coroutines - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "to_thread", # from threads - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from windows_events - "ProactorEventLoop", # from windows_events - "IocpProactor", # from windows_events - "DefaultEventLoopPolicy", # from windows_events - "WindowsSelectorEventLoopPolicy", # from windows_events - "WindowsProactorEventLoopPolicy", # from windows_events - ) -else: - if sys.version_info >= (3, 14): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "future_discard_from_awaited_by", # from futures - "future_add_to_awaited_by", # from futures - "capture_call_graph", # from graph - "format_call_graph", # from graph - "print_call_graph", # from graph - "FrameCallGraphEntry", # from graph - "FutureCallGraph", # from graph - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "QueueShutDown", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "open_unix_connection", # from streams - "start_unix_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from unix_events - "EventLoop", # from unix_events - ) - elif sys.version_info >= (3, 13): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "QueueShutDown", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "open_unix_connection", # from streams - "start_unix_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from unix_events - "AbstractChildWatcher", # from unix_events - "SafeChildWatcher", # from unix_events - "FastChildWatcher", # from unix_events - "PidfdChildWatcher", # from unix_events - "MultiLoopChildWatcher", # from unix_events - "ThreadedChildWatcher", # from unix_events - "DefaultEventLoopPolicy", # from unix_events - "EventLoop", # from unix_events - ) - elif sys.version_info >= (3, 12): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "open_unix_connection", # from streams - "start_unix_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "create_eager_task_factory", # from tasks - "eager_task_factory", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "TaskGroup", # from taskgroups - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from unix_events - "AbstractChildWatcher", # from unix_events - "SafeChildWatcher", # from unix_events - "FastChildWatcher", # from unix_events - "PidfdChildWatcher", # from unix_events - "MultiLoopChildWatcher", # from unix_events - "ThreadedChildWatcher", # from unix_events - "DefaultEventLoopPolicy", # from unix_events - ) - elif sys.version_info >= (3, 11): - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "BrokenBarrierError", # from exceptions - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "Barrier", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "Runner", # from runners - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "open_unix_connection", # from streams - "start_unix_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "to_thread", # from threads - "Timeout", # from timeouts - "timeout", # from timeouts - "timeout_at", # from timeouts - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from unix_events - "AbstractChildWatcher", # from unix_events - "SafeChildWatcher", # from unix_events - "FastChildWatcher", # from unix_events - "PidfdChildWatcher", # from unix_events - "MultiLoopChildWatcher", # from unix_events - "ThreadedChildWatcher", # from unix_events - "DefaultEventLoopPolicy", # from unix_events - ) - else: - __all__ = ( - "BaseEventLoop", # from base_events - "Server", # from base_events - "coroutine", # from coroutines - "iscoroutinefunction", # from coroutines - "iscoroutine", # from coroutines - "AbstractEventLoopPolicy", # from events - "AbstractEventLoop", # from events - "AbstractServer", # from events - "Handle", # from events - "TimerHandle", # from events - "get_event_loop_policy", # from events - "set_event_loop_policy", # from events - "get_event_loop", # from events - "set_event_loop", # from events - "new_event_loop", # from events - "get_child_watcher", # from events - "set_child_watcher", # from events - "_set_running_loop", # from events - "get_running_loop", # from events - "_get_running_loop", # from events - "CancelledError", # from exceptions - "InvalidStateError", # from exceptions - "TimeoutError", # from exceptions - "IncompleteReadError", # from exceptions - "LimitOverrunError", # from exceptions - "SendfileNotAvailableError", # from exceptions - "Future", # from futures - "wrap_future", # from futures - "isfuture", # from futures - "Lock", # from locks - "Event", # from locks - "Condition", # from locks - "Semaphore", # from locks - "BoundedSemaphore", # from locks - "BaseProtocol", # from protocols - "Protocol", # from protocols - "DatagramProtocol", # from protocols - "SubprocessProtocol", # from protocols - "BufferedProtocol", # from protocols - "run", # from runners - "Queue", # from queues - "PriorityQueue", # from queues - "LifoQueue", # from queues - "QueueFull", # from queues - "QueueEmpty", # from queues - "StreamReader", # from streams - "StreamWriter", # from streams - "StreamReaderProtocol", # from streams - "open_connection", # from streams - "start_server", # from streams - "open_unix_connection", # from streams - "start_unix_server", # from streams - "create_subprocess_exec", # from subprocess - "create_subprocess_shell", # from subprocess - "Task", # from tasks - "create_task", # from tasks - "FIRST_COMPLETED", # from tasks - "FIRST_EXCEPTION", # from tasks - "ALL_COMPLETED", # from tasks - "wait", # from tasks - "wait_for", # from tasks - "as_completed", # from tasks - "sleep", # from tasks - "gather", # from tasks - "shield", # from tasks - "ensure_future", # from tasks - "run_coroutine_threadsafe", # from tasks - "current_task", # from tasks - "all_tasks", # from tasks - "_register_task", # from tasks - "_unregister_task", # from tasks - "_enter_task", # from tasks - "_leave_task", # from tasks - "to_thread", # from threads - "BaseTransport", # from transports - "ReadTransport", # from transports - "WriteTransport", # from transports - "Transport", # from transports - "DatagramTransport", # from transports - "SubprocessTransport", # from transports - "SelectorEventLoop", # from unix_events - "AbstractChildWatcher", # from unix_events - "SafeChildWatcher", # from unix_events - "FastChildWatcher", # from unix_events - "PidfdChildWatcher", # from unix_events - "MultiLoopChildWatcher", # from unix_events - "ThreadedChildWatcher", # from unix_events - "DefaultEventLoopPolicy", # from unix_events - ) - -_T_co = TypeVar("_T_co", covariant=True) - -# Aliases imported by multiple submodules in typeshed -if sys.version_info >= (3, 12): - _AwaitableLike: TypeAlias = Awaitable[_T_co] # noqa: Y047 - _CoroutineLike: TypeAlias = Coroutine[Any, Any, _T_co] # noqa: Y047 -else: - _AwaitableLike: TypeAlias = Generator[Any, None, _T_co] | Awaitable[_T_co] - _CoroutineLike: TypeAlias = Generator[Any, None, _T_co] | Coroutine[Any, Any, _T_co] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_events.vpi deleted file mode 100644 index 9a3367b6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_events.vpi +++ /dev/null @@ -1,498 +0,0 @@ -import ssl -import sys -from _typeshed import FileDescriptorLike, ReadableBuffer, WriteableBuffer -from asyncio import _AwaitableLike, _CoroutineLike -from asyncio.events import AbstractEventLoop, AbstractServer, Handle, TimerHandle, _TaskFactory -from asyncio.futures import Future -from asyncio.protocols import BaseProtocol -from asyncio.tasks import Task -from asyncio.transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport -from collections.abc import Callable, Iterable, Sequence -from concurrent.futures import Executor, ThreadPoolExecutor -from contextvars import Context -from socket import AddressFamily, AddressInfo, SocketKind, _Address, _RetAddress, socket -from typing import IO, Any, Literal, TypeAlias, TypeVar, overload -from typing_extensions import TypeVarTuple, Unpack - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("BaseEventLoop", "Server") - -_T = TypeVar("_T") -_Ts = TypeVarTuple("_Ts") -_ProtocolT = TypeVar("_ProtocolT", bound=BaseProtocol) -_Context: TypeAlias = dict[str, Any] -_ExceptionHandler: TypeAlias = Callable[[AbstractEventLoop, _Context], object] -_ProtocolFactory: TypeAlias = Callable[[], BaseProtocol] -_SSLContext: TypeAlias = bool | None | ssl.SSLContext - -class Server(AbstractServer): - if sys.version_info >= (3, 11): - def __init__( - self, - loop: AbstractEventLoop, - sockets: Iterable[socket], - protocol_factory: _ProtocolFactory, - ssl_context: _SSLContext, - backlog: int, - ssl_handshake_timeout: float | None, - ssl_shutdown_timeout: float | None = None, - ) -> None: ... - else: - def __init__( - self, - loop: AbstractEventLoop, - sockets: Iterable[socket], - protocol_factory: _ProtocolFactory, - ssl_context: _SSLContext, - backlog: int, - ssl_handshake_timeout: float | None, - ) -> None: ... - - if sys.version_info >= (3, 13): - def close_clients(self) -> None: ... - def abort_clients(self) -> None: ... - - def get_loop(self) -> AbstractEventLoop: ... - def is_serving(self) -> bool: ... - async def start_serving(self) -> None: ... - async def serve_forever(self) -> None: ... - @property - def sockets(self) -> tuple[socket, ...]: ... - def close(self) -> None: ... - async def wait_closed(self) -> None: ... - -class BaseEventLoop(AbstractEventLoop): - def run_forever(self) -> None: ... - def run_until_complete(self, future: _AwaitableLike[_T]) -> _T: ... - def stop(self) -> None: ... - def is_running(self) -> bool: ... - def is_closed(self) -> bool: ... - def close(self) -> None: ... - async def shutdown_asyncgens(self) -> None: ... - # Methods scheduling callbacks. All these return Handles. - def call_soon( - self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> Handle: ... - def call_later( - self, delay: float, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> TimerHandle: ... - def call_at( - self, when: float, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> TimerHandle: ... - def time(self) -> float: ... - # Future methods - def create_future(self) -> Future[Any]: ... - # Tasks methods - if sys.version_info >= (3, 14): - def create_task( - self, - coro: _CoroutineLike[_T], - *, - name: object = None, - context: Context | None = None, - eager_start: bool | None = None, - ) -> Task[_T]: ... - elif sys.version_info >= (3, 11): - def create_task(self, coro: _CoroutineLike[_T], *, name: object = None, context: Context | None = None) -> Task[_T]: ... - else: - def create_task(self, coro: _CoroutineLike[_T], *, name: object = None) -> Task[_T]: ... - - def set_task_factory(self, factory: _TaskFactory | None) -> None: ... - def get_task_factory(self) -> _TaskFactory | None: ... - # Methods for interacting with threads - def call_soon_threadsafe( - self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> Handle: ... - def run_in_executor(self, executor: Executor | None, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ... - def set_default_executor(self, executor: ThreadPoolExecutor) -> None: ... # type: ignore[override] - # Network I/O methods returning Futures. - async def getaddrinfo( - self, - host: bytes | str | None, - port: bytes | str | int | None, - *, - family: int = 0, - type: int = 0, - proto: int = 0, - flags: int = 0, - ) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]]: ... - async def getnameinfo(self, sockaddr: tuple[str, int] | tuple[str, int, int, int], flags: int = 0) -> tuple[str, str]: ... - - if sys.version_info >= (3, 12): - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: str = ..., - port: int = ..., - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: None = None, - local_addr: tuple[str, int] | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - all_errors: bool = False, - ) -> tuple[Transport, _ProtocolT]: ... - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: None = None, - port: None = None, - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: socket, - local_addr: None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - all_errors: bool = False, - ) -> tuple[Transport, _ProtocolT]: ... - elif sys.version_info >= (3, 11): - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: str = ..., - port: int = ..., - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: None = None, - local_addr: tuple[str, int] | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: None = None, - port: None = None, - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: socket, - local_addr: None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - else: - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: str = ..., - port: int = ..., - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: None = None, - local_addr: tuple[str, int] | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - @overload - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: None = None, - port: None = None, - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: socket, - local_addr: None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - - if sys.version_info >= (3, 13): - # 3.13 added `keep_alive`. - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = 0, - flags: int = 1, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - keep_alive: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = 0, - flags: int = 1, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - keep_alive: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - elif sys.version_info >= (3, 11): - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - else: - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - - if sys.version_info >= (3, 11): - async def start_tls( - self, - transport: BaseTransport, - protocol: BaseProtocol, - sslcontext: ssl.SSLContext, - *, - server_side: bool = False, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> Transport | None: ... - async def connect_accepted_socket( - self, - protocol_factory: Callable[[], _ProtocolT], - sock: socket, - *, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - else: - async def start_tls( - self, - transport: BaseTransport, - protocol: BaseProtocol, - sslcontext: ssl.SSLContext, - *, - server_side: bool = False, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ) -> Transport | None: ... - async def connect_accepted_socket( - self, - protocol_factory: Callable[[], _ProtocolT], - sock: socket, - *, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - - async def sock_sendfile( - self, sock: socket, file: IO[bytes], offset: int = 0, count: int | None = None, *, fallback: bool | None = True - ) -> int: ... - async def sendfile( - self, transport: WriteTransport, file: IO[bytes], offset: int = 0, count: int | None = None, *, fallback: bool = True - ) -> int: ... - if sys.version_info >= (3, 11): - async def create_datagram_endpoint( # type: ignore[override] - self, - protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | str | None = None, - remote_addr: tuple[str, int] | str | None = None, - *, - family: int = 0, - proto: int = 0, - flags: int = 0, - reuse_port: bool | None = None, - allow_broadcast: bool | None = None, - sock: socket | None = None, - ) -> tuple[DatagramTransport, _ProtocolT]: ... - else: - async def create_datagram_endpoint( - self, - protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | str | None = None, - remote_addr: tuple[str, int] | str | None = None, - *, - family: int = 0, - proto: int = 0, - flags: int = 0, - reuse_address: bool | None = ..., - reuse_port: bool | None = None, - allow_broadcast: bool | None = None, - sock: socket | None = None, - ) -> tuple[DatagramTransport, _ProtocolT]: ... - # Pipes and subprocesses. - async def connect_read_pipe( - self, protocol_factory: Callable[[], _ProtocolT], pipe: Any - ) -> tuple[ReadTransport, _ProtocolT]: ... - async def connect_write_pipe( - self, protocol_factory: Callable[[], _ProtocolT], pipe: Any - ) -> tuple[WriteTransport, _ProtocolT]: ... - async def subprocess_shell( - self, - protocol_factory: Callable[[], _ProtocolT], - cmd: bytes | str, - *, - stdin: int | IO[Any] | None = -1, - stdout: int | IO[Any] | None = -1, - stderr: int | IO[Any] | None = -1, - universal_newlines: Literal[False] = False, - shell: Literal[True] = True, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - **kwargs: Any, - ) -> tuple[SubprocessTransport, _ProtocolT]: ... - async def subprocess_exec( - self, - protocol_factory: Callable[[], _ProtocolT], - program: Any, - *args: Any, - stdin: int | IO[Any] | None = -1, - stdout: int | IO[Any] | None = -1, - stderr: int | IO[Any] | None = -1, - universal_newlines: Literal[False] = False, - shell: Literal[False] = False, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - **kwargs: Any, - ) -> tuple[SubprocessTransport, _ProtocolT]: ... - def add_reader(self, fd: FileDescriptorLike, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ... - def remove_reader(self, fd: FileDescriptorLike) -> bool: ... - def add_writer(self, fd: FileDescriptorLike, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ... - def remove_writer(self, fd: FileDescriptorLike) -> bool: ... - # The sock_* methods (and probably some others) are not actually implemented on - # BaseEventLoop, only on subclasses. We list them here for now for convenience. - async def sock_recv(self, sock: socket, nbytes: int) -> bytes: ... - async def sock_recv_into(self, sock: socket, buf: WriteableBuffer) -> int: ... - async def sock_sendall(self, sock: socket, data: ReadableBuffer) -> None: ... - async def sock_connect(self, sock: socket, address: _Address) -> None: ... - async def sock_accept(self, sock: socket) -> tuple[socket, _RetAddress]: ... - if sys.version_info >= (3, 11): - async def sock_recvfrom(self, sock: socket, bufsize: int) -> tuple[bytes, _RetAddress]: ... - async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> tuple[int, _RetAddress]: ... - async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> int: ... - # Signal handling. - def add_signal_handler(self, sig: int, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ... - def remove_signal_handler(self, sig: int) -> bool: ... - # Error handlers. - def set_exception_handler(self, handler: _ExceptionHandler | None) -> None: ... - def get_exception_handler(self) -> _ExceptionHandler | None: ... - def default_exception_handler(self, context: _Context) -> None: ... - def call_exception_handler(self, context: _Context) -> None: ... - # Debug flag management. - def get_debug(self) -> bool: ... - def set_debug(self, enabled: bool) -> None: ... - if sys.version_info >= (3, 12): - async def shutdown_default_executor(self, timeout: float | None = None) -> None: ... - else: - async def shutdown_default_executor(self) -> None: ... - - def __del__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_futures.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_futures.vpi deleted file mode 100644 index 2cd0f2e3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_futures.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from _asyncio import Future -from collections.abc import Callable, Sequence -from contextvars import Context -from typing import Any, Final -from typing_extensions import TypeIs - -from . import futures - -__all__ = () - -_PENDING: Final = "PENDING" # undocumented -_CANCELLED: Final = "CANCELLED" # undocumented -_FINISHED: Final = "FINISHED" # undocumented - -def isfuture(obj: object) -> TypeIs[Future[Any]]: ... -def _format_callbacks(cb: Sequence[tuple[Callable[[futures.Future[Any]], None], Context]]) -> str: ... # undocumented -def _future_repr_info(future: futures.Future[Any]) -> list[str]: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_subprocess.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_subprocess.vpi deleted file mode 100644 index 36f0f609..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_subprocess.vpi +++ /dev/null @@ -1,62 +0,0 @@ -import subprocess -from collections import deque -from collections.abc import Callable, Sequence -from typing import IO, Any, TypeAlias - -from . import events, futures, protocols, transports - -_File: TypeAlias = int | IO[Any] | None - -class BaseSubprocessTransport(transports.SubprocessTransport): - _closed: bool # undocumented - _protocol: protocols.SubprocessProtocol # undocumented - _loop: events.AbstractEventLoop # undocumented - _proc: subprocess.Popen[Any] | None # undocumented - _pid: int | None # undocumented - _returncode: int | None # undocumented - _exit_waiters: list[futures.Future[Any]] # undocumented - _pending_calls: deque[tuple[Callable[..., Any], tuple[Any, ...]]] # undocumented - _pipes: dict[int, _File] # undocumented - _finished: bool # undocumented - def __init__( - self, - loop: events.AbstractEventLoop, - protocol: protocols.SubprocessProtocol, - args: str | bytes | Sequence[str | bytes], - shell: bool, - stdin: _File, - stdout: _File, - stderr: _File, - bufsize: int, - waiter: futures.Future[Any] | None = None, - extra: Any | None = None, - **kwargs: Any, - ) -> None: ... - def _start( - self, - args: str | bytes | Sequence[str | bytes], - shell: bool, - stdin: _File, - stdout: _File, - stderr: _File, - bufsize: int, - **kwargs: Any, - ) -> None: ... # undocumented - def get_pid(self) -> int | None: ... # type: ignore[override] - def get_pipe_transport(self, fd: int) -> _File: ... # type: ignore[override] - def _check_proc(self) -> None: ... # undocumented - def send_signal(self, signal: int) -> None: ... - async def _connect_pipes(self, waiter: futures.Future[Any] | None) -> None: ... # undocumented - def _call(self, cb: Callable[..., object], *data: Any) -> None: ... # undocumented - def _pipe_connection_lost(self, fd: int, exc: BaseException | None) -> None: ... # undocumented - def _pipe_data_received(self, fd: int, data: bytes) -> None: ... # undocumented - def _process_exited(self, returncode: int) -> None: ... # undocumented - async def _wait(self) -> int: ... # undocumented - def _try_finish(self) -> None: ... # undocumented - def _call_connection_lost(self, exc: BaseException | None) -> None: ... # undocumented - def __del__(self) -> None: ... - -class WriteSubprocessPipeProto(protocols.BaseProtocol): # undocumented - def __init__(self, proc: BaseSubprocessTransport, fd: int) -> None: ... - -class ReadSubprocessPipeProto(WriteSubprocessPipeProto, protocols.Protocol): ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_tasks.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_tasks.vpi deleted file mode 100644 index 5b010a9e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/base_tasks.vpi +++ /dev/null @@ -1,17 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from types import FrameType -from typing import Any - -from .tasks import Task - -def _task_repr_info(task: Task[Any]) -> list[str]: ... # undocumented - -if sys.version_info >= (3, 13): - def _task_repr(task: Task[Any]) -> str: ... # undocumented - -elif sys.version_info >= (3, 11): - def _task_repr(self: Task[Any]) -> str: ... # undocumented - -def _task_get_stack(task: Task[Any], limit: int | None) -> list[FrameType]: ... # undocumented -def _task_print_stack(task: Task[Any], limit: int | None, file: StrOrBytesPath) -> None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/constants.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/constants.vpi deleted file mode 100644 index 5c6456b0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/constants.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import enum -import sys -from typing import Final - -LOG_THRESHOLD_FOR_CONNLOST_WRITES: Final = 5 -ACCEPT_RETRY_DELAY: Final = 1 -DEBUG_STACK_DEPTH: Final = 10 -SSL_HANDSHAKE_TIMEOUT: float -SENDFILE_FALLBACK_READBUFFER_SIZE: Final = 262144 -if sys.version_info >= (3, 11): - SSL_SHUTDOWN_TIMEOUT: float - FLOW_CONTROL_HIGH_WATER_SSL_READ: Final = 256 - FLOW_CONTROL_HIGH_WATER_SSL_WRITE: Final = 512 -if sys.version_info >= (3, 12): - THREAD_JOIN_TIMEOUT: Final = 300 - -class _SendfileMode(enum.Enum): - UNSUPPORTED = 1 - TRY_NATIVE = 2 - FALLBACK = 3 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/coroutines.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/coroutines.vpi deleted file mode 100644 index 7599c692..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/coroutines.vpi +++ /dev/null @@ -1,45 +0,0 @@ -import sys -from collections.abc import Awaitable, Callable, Coroutine -from typing import Any, ParamSpec, TypeGuard, TypeVar, overload -from typing_extensions import TypeIs, deprecated - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 11): - __all__ = ("iscoroutinefunction", "iscoroutine") -else: - __all__ = ("coroutine", "iscoroutinefunction", "iscoroutine") - -_T = TypeVar("_T") -_FunctionT = TypeVar("_FunctionT", bound=Callable[..., Any]) -_P = ParamSpec("_P") - -if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `async def` instead.") - def coroutine(func: _FunctionT) -> _FunctionT: ... - -def iscoroutine(obj: object) -> TypeIs[Coroutine[Any, Any, Any]]: ... - -if sys.version_info >= (3, 11): - @overload - @deprecated("Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.") - def iscoroutinefunction(func: Callable[..., Coroutine[Any, Any, Any]]) -> bool: ... - @overload - @deprecated("Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.") - def iscoroutinefunction(func: Callable[_P, Awaitable[_T]]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, _T]]]: ... - @overload - @deprecated("Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.") - def iscoroutinefunction(func: Callable[_P, object]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, Any]]]: ... - @overload - @deprecated("Deprecated since Python 3.14. Use `inspect.iscoroutinefunction()` instead.") - def iscoroutinefunction(func: object) -> TypeGuard[Callable[..., Coroutine[Any, Any, Any]]]: ... -else: - # Sometimes needed in Python < 3.11 due to the fact that it supports @coroutine - # which was removed in 3.11 which the inspect version doesn't support. - @overload - def iscoroutinefunction(func: Callable[..., Coroutine[Any, Any, Any]]) -> bool: ... - @overload - def iscoroutinefunction(func: Callable[_P, Awaitable[_T]]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, _T]]]: ... - @overload - def iscoroutinefunction(func: Callable[_P, object]) -> TypeGuard[Callable[_P, Coroutine[Any, Any, Any]]]: ... - @overload - def iscoroutinefunction(func: object) -> TypeGuard[Callable[..., Coroutine[Any, Any, Any]]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/events.vpi deleted file mode 100644 index 5e561b09..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/events.vpi +++ /dev/null @@ -1,671 +0,0 @@ -import ssl -import sys -from _asyncio import ( - _get_running_loop as _get_running_loop, - _set_running_loop as _set_running_loop, - get_event_loop as get_event_loop, - get_running_loop as get_running_loop, -) -from _typeshed import FileDescriptorLike, ReadableBuffer, StrPath, Unused, WriteableBuffer -from abc import ABCMeta, abstractmethod -from collections.abc import Callable, Sequence -from concurrent.futures import Executor -from contextvars import Context -from socket import AddressFamily, AddressInfo, SocketKind, _Address, _RetAddress, socket -from typing import IO, Any, Literal, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, TypeVarTuple, Unpack, deprecated - -from . import _AwaitableLike, _CoroutineLike -from .base_events import Server -from .futures import Future -from .protocols import BaseProtocol -from .tasks import Task -from .transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport - -if sys.version_info < (3, 14): - from .unix_events import AbstractChildWatcher - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 14): - __all__ = ( - "AbstractEventLoop", - "AbstractServer", - "Handle", - "TimerHandle", - "get_event_loop_policy", - "set_event_loop_policy", - "get_event_loop", - "set_event_loop", - "new_event_loop", - "_set_running_loop", - "get_running_loop", - "_get_running_loop", - ) -else: - __all__ = ( - "AbstractEventLoopPolicy", - "AbstractEventLoop", - "AbstractServer", - "Handle", - "TimerHandle", - "get_event_loop_policy", - "set_event_loop_policy", - "get_event_loop", - "set_event_loop", - "new_event_loop", - "get_child_watcher", - "set_child_watcher", - "_set_running_loop", - "get_running_loop", - "_get_running_loop", - ) - -_T = TypeVar("_T") -_Ts = TypeVarTuple("_Ts") -_ProtocolT = TypeVar("_ProtocolT", bound=BaseProtocol) -_Context: TypeAlias = dict[str, Any] -_ExceptionHandler: TypeAlias = Callable[[AbstractEventLoop, _Context], object] -_ProtocolFactory: TypeAlias = Callable[[], BaseProtocol] -_SSLContext: TypeAlias = bool | None | ssl.SSLContext - -@type_check_only -class _TaskFactory(Protocol): - def __call__(self, loop: AbstractEventLoop, factory: _CoroutineLike[_T], /) -> Future[_T]: ... - -class Handle: - __slots__ = ("_callback", "_args", "_cancelled", "_loop", "_source_traceback", "_repr", "__weakref__", "_context") - _cancelled: bool - _args: Sequence[Any] - def __init__( - self, callback: Callable[..., object], args: Sequence[Any], loop: AbstractEventLoop, context: Context | None = None - ) -> None: ... - def cancel(self) -> None: ... - def _run(self) -> None: ... - def cancelled(self) -> bool: ... - if sys.version_info >= (3, 12): - def get_context(self) -> Context: ... - -class TimerHandle(Handle): - __slots__ = ["_scheduled", "_when"] - def __init__( - self, - when: float, - callback: Callable[..., object], - args: Sequence[Any], - loop: AbstractEventLoop, - context: Context | None = None, - ) -> None: ... - def __hash__(self) -> int: ... - def when(self) -> float: ... - def __lt__(self, other: TimerHandle) -> bool: ... - def __le__(self, other: TimerHandle) -> bool: ... - def __gt__(self, other: TimerHandle) -> bool: ... - def __ge__(self, other: TimerHandle) -> bool: ... - def __eq__(self, other: object) -> bool: ... - -class AbstractServer: - @abstractmethod - def close(self) -> None: ... - if sys.version_info >= (3, 13): - @abstractmethod - def close_clients(self) -> None: ... - @abstractmethod - def abort_clients(self) -> None: ... - - async def __aenter__(self) -> Self: ... - async def __aexit__(self, *exc: Unused) -> None: ... - @abstractmethod - def get_loop(self) -> AbstractEventLoop: ... - @abstractmethod - def is_serving(self) -> bool: ... - @abstractmethod - async def start_serving(self) -> None: ... - @abstractmethod - async def serve_forever(self) -> None: ... - @abstractmethod - async def wait_closed(self) -> None: ... - -class AbstractEventLoop: - slow_callback_duration: float - @abstractmethod - def run_forever(self) -> None: ... - @abstractmethod - def run_until_complete(self, future: _AwaitableLike[_T]) -> _T: ... - @abstractmethod - def stop(self) -> None: ... - @abstractmethod - def is_running(self) -> bool: ... - @abstractmethod - def is_closed(self) -> bool: ... - @abstractmethod - def close(self) -> None: ... - @abstractmethod - async def shutdown_asyncgens(self) -> None: ... - # Methods scheduling callbacks. All these return Handles. - # "context" added in 3.9.10/3.10.2 for call_* - @abstractmethod - def call_soon( - self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> Handle: ... - @abstractmethod - def call_later( - self, delay: float, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> TimerHandle: ... - @abstractmethod - def call_at( - self, when: float, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> TimerHandle: ... - @abstractmethod - def time(self) -> float: ... - # Future methods - @abstractmethod - def create_future(self) -> Future[Any]: ... - # Tasks methods - if sys.version_info >= (3, 14): - @abstractmethod - def create_task( - self, - coro: _CoroutineLike[_T], - *, - name: str | None = None, - context: Context | None = None, - eager_start: bool | None = None, - ) -> Task[_T]: ... - elif sys.version_info >= (3, 11): - @abstractmethod - def create_task( - self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None - ) -> Task[_T]: ... - else: - @abstractmethod - def create_task(self, coro: _CoroutineLike[_T], *, name: str | None = None) -> Task[_T]: ... - - @abstractmethod - def set_task_factory(self, factory: _TaskFactory | None) -> None: ... - @abstractmethod - def get_task_factory(self) -> _TaskFactory | None: ... - # Methods for interacting with threads - # "context" added in 3.9.10/3.10.2 - @abstractmethod - def call_soon_threadsafe( - self, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts], context: Context | None = None - ) -> Handle: ... - @abstractmethod - def run_in_executor(self, executor: Executor | None, func: Callable[[Unpack[_Ts]], _T], *args: Unpack[_Ts]) -> Future[_T]: ... - @abstractmethod - def set_default_executor(self, executor: Executor) -> None: ... - # Network I/O methods returning Futures. - @abstractmethod - async def getaddrinfo( - self, - host: bytes | str | None, - port: bytes | str | int | None, - *, - family: int = 0, - type: int = 0, - proto: int = 0, - flags: int = 0, - ) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]]: ... - @abstractmethod - async def getnameinfo(self, sockaddr: tuple[str, int] | tuple[str, int, int, int], flags: int = 0) -> tuple[str, str]: ... - - if sys.version_info >= (3, 11): - @overload - @abstractmethod - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: str = ..., - port: int = ..., - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: None = None, - local_addr: tuple[str, int] | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - @overload - @abstractmethod - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: None = None, - port: None = None, - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: socket, - local_addr: None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - else: - @overload - @abstractmethod - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: str = ..., - port: int = ..., - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: None = None, - local_addr: tuple[str, int] | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - @overload - @abstractmethod - async def create_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - host: None = None, - port: None = None, - *, - ssl: _SSLContext = None, - family: int = 0, - proto: int = 0, - flags: int = 0, - sock: socket, - local_addr: None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - happy_eyeballs_delay: float | None = None, - interleave: int | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - - if sys.version_info >= (3, 13): - # 3.13 added `keep_alive`. - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - keep_alive: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - keep_alive: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - elif sys.version_info >= (3, 11): - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - else: - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: str | Sequence[str] | None = None, - port: int = ..., - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: None = None, - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - @overload - @abstractmethod - async def create_server( - self, - protocol_factory: _ProtocolFactory, - host: None = None, - port: None = None, - *, - family: int = AddressFamily.AF_UNSPEC, - flags: int = AddressInfo.AI_PASSIVE, - sock: socket = ..., - backlog: int = 100, - ssl: _SSLContext = None, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - ssl_handshake_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - - if sys.version_info >= (3, 11): - @abstractmethod - async def start_tls( - self, - transport: WriteTransport, - protocol: BaseProtocol, - sslcontext: ssl.SSLContext, - *, - server_side: bool = False, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> Transport | None: ... - async def create_unix_server( - self, - protocol_factory: _ProtocolFactory, - path: StrPath | None = None, - *, - sock: socket | None = None, - backlog: int = 100, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - else: - @abstractmethod - async def start_tls( - self, - transport: BaseTransport, - protocol: BaseProtocol, - sslcontext: ssl.SSLContext, - *, - server_side: bool = False, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ) -> Transport | None: ... - async def create_unix_server( - self, - protocol_factory: _ProtocolFactory, - path: StrPath | None = None, - *, - sock: socket | None = None, - backlog: int = 100, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - start_serving: bool = True, - ) -> Server: ... - - if sys.version_info >= (3, 11): - async def connect_accepted_socket( - self, - protocol_factory: Callable[[], _ProtocolT], - sock: socket, - *, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - else: - async def connect_accepted_socket( - self, - protocol_factory: Callable[[], _ProtocolT], - sock: socket, - *, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - if sys.version_info >= (3, 11): - async def create_unix_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - path: str | None = None, - *, - ssl: _SSLContext = None, - sock: socket | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - else: - async def create_unix_connection( - self, - protocol_factory: Callable[[], _ProtocolT], - path: str | None = None, - *, - ssl: _SSLContext = None, - sock: socket | None = None, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ) -> tuple[Transport, _ProtocolT]: ... - - @abstractmethod - async def sock_sendfile( - self, sock: socket, file: IO[bytes], offset: int = 0, count: int | None = None, *, fallback: bool | None = None - ) -> int: ... - @abstractmethod - async def sendfile( - self, transport: WriteTransport, file: IO[bytes], offset: int = 0, count: int | None = None, *, fallback: bool = True - ) -> int: ... - @abstractmethod - async def create_datagram_endpoint( - self, - protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | str | None = None, - remote_addr: tuple[str, int] | str | None = None, - *, - family: int = 0, - proto: int = 0, - flags: int = 0, - reuse_address: bool | None = None, - reuse_port: bool | None = None, - allow_broadcast: bool | None = None, - sock: socket | None = None, - ) -> tuple[DatagramTransport, _ProtocolT]: ... - # Pipes and subprocesses. - @abstractmethod - async def connect_read_pipe( - self, protocol_factory: Callable[[], _ProtocolT], pipe: Any - ) -> tuple[ReadTransport, _ProtocolT]: ... - @abstractmethod - async def connect_write_pipe( - self, protocol_factory: Callable[[], _ProtocolT], pipe: Any - ) -> tuple[WriteTransport, _ProtocolT]: ... - @abstractmethod - async def subprocess_shell( - self, - protocol_factory: Callable[[], _ProtocolT], - cmd: bytes | str, - *, - stdin: int | IO[Any] | None = -1, - stdout: int | IO[Any] | None = -1, - stderr: int | IO[Any] | None = -1, - universal_newlines: Literal[False] = False, - shell: Literal[True] = True, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - **kwargs: Any, - ) -> tuple[SubprocessTransport, _ProtocolT]: ... - @abstractmethod - async def subprocess_exec( - self, - protocol_factory: Callable[[], _ProtocolT], - program: Any, - *args: Any, - stdin: int | IO[Any] | None = -1, - stdout: int | IO[Any] | None = -1, - stderr: int | IO[Any] | None = -1, - universal_newlines: Literal[False] = False, - shell: Literal[False] = False, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - **kwargs: Any, - ) -> tuple[SubprocessTransport, _ProtocolT]: ... - @abstractmethod - def add_reader(self, fd: FileDescriptorLike, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ... - @abstractmethod - def remove_reader(self, fd: FileDescriptorLike) -> bool: ... - @abstractmethod - def add_writer(self, fd: FileDescriptorLike, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ... - @abstractmethod - def remove_writer(self, fd: FileDescriptorLike) -> bool: ... - @abstractmethod - async def sock_recv(self, sock: socket, nbytes: int) -> bytes: ... - @abstractmethod - async def sock_recv_into(self, sock: socket, buf: WriteableBuffer) -> int: ... - @abstractmethod - async def sock_sendall(self, sock: socket, data: ReadableBuffer) -> None: ... - @abstractmethod - async def sock_connect(self, sock: socket, address: _Address) -> None: ... - @abstractmethod - async def sock_accept(self, sock: socket) -> tuple[socket, _RetAddress]: ... - if sys.version_info >= (3, 11): - @abstractmethod - async def sock_recvfrom(self, sock: socket, bufsize: int) -> tuple[bytes, _RetAddress]: ... - @abstractmethod - async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> tuple[int, _RetAddress]: ... - @abstractmethod - async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> int: ... - # Signal handling. - @abstractmethod - def add_signal_handler(self, sig: int, callback: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> None: ... - @abstractmethod - def remove_signal_handler(self, sig: int) -> bool: ... - # Error handlers. - @abstractmethod - def set_exception_handler(self, handler: _ExceptionHandler | None) -> None: ... - @abstractmethod - def get_exception_handler(self) -> _ExceptionHandler | None: ... - @abstractmethod - def default_exception_handler(self, context: _Context) -> None: ... - @abstractmethod - def call_exception_handler(self, context: _Context) -> None: ... - # Debug flag management. - @abstractmethod - def get_debug(self) -> bool: ... - @abstractmethod - def set_debug(self, enabled: bool) -> None: ... - @abstractmethod - async def shutdown_default_executor(self) -> None: ... - -if sys.version_info >= (3, 14): - class _AbstractEventLoopPolicy: - @abstractmethod - def get_event_loop(self) -> AbstractEventLoop: ... - @abstractmethod - def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ... - @abstractmethod - def new_event_loop(self) -> AbstractEventLoop: ... - -else: - @type_check_only - class _AbstractEventLoopPolicy: - @abstractmethod - def get_event_loop(self) -> AbstractEventLoop: ... - @abstractmethod - def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ... - @abstractmethod - def new_event_loop(self) -> AbstractEventLoop: ... - # Child processes handling (Unix only). - @abstractmethod - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def get_child_watcher(self) -> AbstractChildWatcher: ... - @abstractmethod - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def set_child_watcher(self, watcher: AbstractChildWatcher) -> None: ... - - AbstractEventLoopPolicy = _AbstractEventLoopPolicy - -if sys.version_info >= (3, 14): - class _BaseDefaultEventLoopPolicy(_AbstractEventLoopPolicy, metaclass=ABCMeta): - def get_event_loop(self) -> AbstractEventLoop: ... - def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ... - def new_event_loop(self) -> AbstractEventLoop: ... - -else: - class BaseDefaultEventLoopPolicy(_AbstractEventLoopPolicy, metaclass=ABCMeta): - def get_event_loop(self) -> AbstractEventLoop: ... - def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ... - def new_event_loop(self) -> AbstractEventLoop: ... - -if sys.version_info >= (3, 14): - def _get_event_loop_policy() -> _AbstractEventLoopPolicy: ... - def _set_event_loop_policy(policy: _AbstractEventLoopPolicy | None) -> None: ... - -@deprecated("Deprecated since Python 3.14; will be removed in Python 3.16.") -def get_event_loop_policy() -> _AbstractEventLoopPolicy: ... -@deprecated("Deprecated since Python 3.14; will be removed in Python 3.16.") -def set_event_loop_policy(policy: _AbstractEventLoopPolicy | None) -> None: ... -def set_event_loop(loop: AbstractEventLoop | None) -> None: ... -def new_event_loop() -> AbstractEventLoop: ... - -if sys.version_info < (3, 14): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def get_child_watcher() -> AbstractChildWatcher: ... - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def set_child_watcher(watcher: AbstractChildWatcher) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/exceptions.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/exceptions.vpi deleted file mode 100644 index 759838f4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/exceptions.vpi +++ /dev/null @@ -1,44 +0,0 @@ -import sys - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 11): - __all__ = ( - "BrokenBarrierError", - "CancelledError", - "InvalidStateError", - "TimeoutError", - "IncompleteReadError", - "LimitOverrunError", - "SendfileNotAvailableError", - ) -else: - __all__ = ( - "CancelledError", - "InvalidStateError", - "TimeoutError", - "IncompleteReadError", - "LimitOverrunError", - "SendfileNotAvailableError", - ) - -class CancelledError(BaseException): ... - -if sys.version_info >= (3, 11): - from builtins import TimeoutError as TimeoutError -else: - class TimeoutError(Exception): ... - -class InvalidStateError(Exception): ... -class SendfileNotAvailableError(RuntimeError): ... - -class IncompleteReadError(EOFError): - expected: int | None - partial: bytes - def __init__(self, partial: bytes, expected: int | None) -> None: ... - -class LimitOverrunError(Exception): - consumed: int - def __init__(self, message: str, consumed: int) -> None: ... - -if sys.version_info >= (3, 11): - class BrokenBarrierError(RuntimeError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/format_helpers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/format_helpers.vpi deleted file mode 100644 index ff830a3b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/format_helpers.vpi +++ /dev/null @@ -1,31 +0,0 @@ -import functools -import sys -import traceback -from collections.abc import Iterable -from types import FrameType, FunctionType -from typing import Any, TypeAlias, overload, type_check_only - -@type_check_only -class _HasWrapper: - __wrapper__: _HasWrapper | FunctionType - -_FuncType: TypeAlias = FunctionType | _HasWrapper | functools.partial[Any] | functools.partialmethod[Any] - -@overload -def _get_function_source(func: _FuncType) -> tuple[str, int]: ... -@overload -def _get_function_source(func: object) -> tuple[str, int] | None: ... - -if sys.version_info >= (3, 13): - def _format_callback_source(func: object, args: Iterable[Any], *, debug: bool = False) -> str: ... - def _format_args_and_kwargs(args: Iterable[Any], kwargs: dict[str, Any], *, debug: bool = False) -> str: ... - def _format_callback( - func: object, args: Iterable[Any], kwargs: dict[str, Any], *, debug: bool = False, suffix: str = "" - ) -> str: ... - -else: - def _format_callback_source(func: object, args: Iterable[Any]) -> str: ... - def _format_args_and_kwargs(args: Iterable[Any], kwargs: dict[str, Any]) -> str: ... - def _format_callback(func: object, args: Iterable[Any], kwargs: dict[str, Any], suffix: str = "") -> str: ... - -def extract_stack(f: FrameType | None = None, limit: int | None = None) -> traceback.StackSummary: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/futures.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/futures.vpi deleted file mode 100644 index c907c703..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/futures.vpi +++ /dev/null @@ -1,19 +0,0 @@ -import sys -from _asyncio import Future as Future -from concurrent.futures._base import Future as _ConcurrentFuture -from typing import TypeVar - -from .base_futures import isfuture as isfuture -from .events import AbstractEventLoop - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 14): - from _asyncio import future_add_to_awaited_by, future_discard_from_awaited_by - - __all__ = ("Future", "wrap_future", "isfuture", "future_discard_from_awaited_by", "future_add_to_awaited_by") -else: - __all__ = ("Future", "wrap_future", "isfuture") - -_T = TypeVar("_T") - -def wrap_future(future: _ConcurrentFuture[_T] | Future[_T], *, loop: AbstractEventLoop | None = None) -> Future[_T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/graph.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/graph.vpi deleted file mode 100644 index 2f89de71..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/graph.vpi +++ /dev/null @@ -1,29 +0,0 @@ -import sys -from _typeshed import SupportsWrite -from asyncio import Future -from dataclasses import dataclass -from types import FrameType -from typing import Any, overload - -if sys.version_info >= (3, 14): - __all__ = ("capture_call_graph", "format_call_graph", "print_call_graph", "FrameCallGraphEntry", "FutureCallGraph") - - @dataclass(frozen=True, slots=True) - class FrameCallGraphEntry: - frame: FrameType - - @dataclass(frozen=True, slots=True) - class FutureCallGraph: - future: Future[Any] - call_stack: tuple[FrameCallGraphEntry, ...] - awaited_by: tuple[FutureCallGraph, ...] - - @overload - def capture_call_graph(future: None = None, /, *, depth: int = 1, limit: int | None = None) -> FutureCallGraph | None: ... - @overload - def capture_call_graph(future: Future[Any], /, *, depth: int = 1, limit: int | None = None) -> FutureCallGraph | None: ... - - def format_call_graph(future: Future[Any] | None = None, /, *, depth: int = 1, limit: int | None = None) -> str: ... - def print_call_graph( - future: Future[Any] | None = None, /, *, file: SupportsWrite[str] | None = None, depth: int = 1, limit: int | None = None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/locks.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/locks.vpi deleted file mode 100644 index 4420d02f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/locks.vpi +++ /dev/null @@ -1,83 +0,0 @@ -import enum -import sys -from _typeshed import Unused -from collections import deque -from collections.abc import Callable -from types import TracebackType -from typing import Any, Literal, TypeVar -from typing_extensions import Self - -from .futures import Future -from .mixins import _LoopBoundMixin - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 11): - __all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore", "Barrier") -else: - __all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore") - -_T = TypeVar("_T") - -class _ContextManagerMixin: - async def __aenter__(self) -> None: ... - async def __aexit__( - self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None - ) -> None: ... - -class Lock(_ContextManagerMixin, _LoopBoundMixin): - _waiters: deque[Future[Any]] | None - def __init__(self) -> None: ... - def locked(self) -> bool: ... - async def acquire(self) -> Literal[True]: ... - def release(self) -> None: ... - -class Event(_LoopBoundMixin): - _waiters: deque[Future[Any]] - def __init__(self) -> None: ... - def is_set(self) -> bool: ... - def set(self) -> None: ... - def clear(self) -> None: ... - async def wait(self) -> Literal[True]: ... - -class Condition(_ContextManagerMixin, _LoopBoundMixin): - _waiters: deque[Future[Any]] - def __init__(self, lock: Lock | None = None) -> None: ... - def locked(self) -> bool: ... - async def acquire(self) -> Literal[True]: ... - def release(self) -> None: ... - async def wait(self) -> Literal[True]: ... - async def wait_for(self, predicate: Callable[[], _T]) -> _T: ... - def notify(self, n: int = 1) -> None: ... - def notify_all(self) -> None: ... - -class Semaphore(_ContextManagerMixin, _LoopBoundMixin): - _value: int - _waiters: deque[Future[Any]] | None - def __init__(self, value: int = 1) -> None: ... - def locked(self) -> bool: ... - async def acquire(self) -> Literal[True]: ... - def release(self) -> None: ... - def _wake_up_next(self) -> None: ... - -class BoundedSemaphore(Semaphore): ... - -if sys.version_info >= (3, 11): - class _BarrierState(enum.Enum): # undocumented - FILLING = "filling" - DRAINING = "draining" - RESETTING = "resetting" - BROKEN = "broken" - - class Barrier(_LoopBoundMixin): - def __init__(self, parties: int) -> None: ... - async def __aenter__(self) -> Self: ... - async def __aexit__(self, *args: Unused) -> None: ... - async def wait(self) -> int: ... - async def abort(self) -> None: ... - async def reset(self) -> None: ... - @property - def parties(self) -> int: ... - @property - def n_waiting(self) -> int: ... - @property - def broken(self) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/log.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/log.vpi deleted file mode 100644 index e1de0b3b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/log.vpi +++ /dev/null @@ -1,3 +0,0 @@ -import logging - -logger: logging.Logger diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/mixins.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/mixins.vpi deleted file mode 100644 index 6ebcf543..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/mixins.vpi +++ /dev/null @@ -1,9 +0,0 @@ -import sys -import threading -from typing_extensions import Never - -_global_lock: threading.Lock - -class _LoopBoundMixin: - if sys.version_info < (3, 11): - def __init__(self, *, loop: Never = ...) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/proactor_events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/proactor_events.vpi deleted file mode 100644 index 09c096d4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/proactor_events.vpi +++ /dev/null @@ -1,53 +0,0 @@ -from collections.abc import Mapping -from socket import socket -from typing import Any, ClassVar, Literal - -from . import base_events, constants, events, futures, streams, transports - -__all__ = ("BaseProactorEventLoop",) - -class _ProactorBasePipeTransport(transports._FlowControlMixin, transports.BaseTransport): - def __init__( - self, - loop: events.AbstractEventLoop, - sock: socket, - protocol: streams.StreamReaderProtocol, - waiter: futures.Future[Any] | None = None, - extra: Mapping[Any, Any] | None = None, - server: events.AbstractServer | None = None, - ) -> None: ... - def __del__(self) -> None: ... - -class _ProactorReadPipeTransport(_ProactorBasePipeTransport, transports.ReadTransport): - def __init__( - self, - loop: events.AbstractEventLoop, - sock: socket, - protocol: streams.StreamReaderProtocol, - waiter: futures.Future[Any] | None = None, - extra: Mapping[Any, Any] | None = None, - server: events.AbstractServer | None = None, - buffer_size: int = 65536, - ) -> None: ... - -class _ProactorBaseWritePipeTransport(_ProactorBasePipeTransport, transports.WriteTransport): ... -class _ProactorWritePipeTransport(_ProactorBaseWritePipeTransport): ... -class _ProactorDuplexPipeTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport): ... - -class _ProactorSocketTransport(_ProactorReadPipeTransport, _ProactorBaseWritePipeTransport, transports.Transport): - _sendfile_compatible: ClassVar[constants._SendfileMode] - def __init__( - self, - loop: events.AbstractEventLoop, - sock: socket, - protocol: streams.StreamReaderProtocol, - waiter: futures.Future[Any] | None = None, - extra: Mapping[Any, Any] | None = None, - server: events.AbstractServer | None = None, - ) -> None: ... - def _set_extra(self, sock: socket) -> None: ... - def can_write_eof(self) -> Literal[True]: ... - -class BaseProactorEventLoop(base_events.BaseEventLoop): - def __init__(self, proactor: Any) -> None: ... - async def sock_recv(self, sock: socket, n: int) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/protocols.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/protocols.vpi deleted file mode 100644 index 3a8965f0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/protocols.vpi +++ /dev/null @@ -1,41 +0,0 @@ -from _typeshed import ReadableBuffer -from asyncio import transports -from typing import Any - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("BaseProtocol", "Protocol", "DatagramProtocol", "SubprocessProtocol", "BufferedProtocol") - -class BaseProtocol: - __slots__ = () - def connection_made(self, transport: transports.BaseTransport) -> None: ... - def connection_lost(self, exc: Exception | None) -> None: ... - def pause_writing(self) -> None: ... - def resume_writing(self) -> None: ... - -class Protocol(BaseProtocol): - # Need annotation or mypy will complain about 'Cannot determine type of "__slots__" in base class' - __slots__: tuple[str, ...] = () - def data_received(self, data: bytes) -> None: ... - def eof_received(self) -> bool | None: ... - -class BufferedProtocol(BaseProtocol): - __slots__ = () - def get_buffer(self, sizehint: int) -> ReadableBuffer: ... - def buffer_updated(self, nbytes: int) -> None: ... - def eof_received(self) -> bool | None: ... - -class DatagramProtocol(BaseProtocol): - __slots__ = () - def connection_made(self, transport: transports.DatagramTransport) -> None: ... # type: ignore[override] - # addr can be a tuple[int, int] for some unusual protocols like socket.AF_NETLINK. - # Use tuple[str | Any, int] to not cause typechecking issues on most usual cases. - # This could be improved by using tuple[AnyOf[str, int], int] if the AnyOf feature is accepted. - # See https://github.com/python/typing/issues/566 - def datagram_received(self, data: bytes, addr: tuple[str | Any, int]) -> None: ... - def error_received(self, exc: Exception) -> None: ... - -class SubprocessProtocol(BaseProtocol): - __slots__: tuple[str, ...] = () - def pipe_data_received(self, fd: int, data: bytes) -> None: ... - def pipe_connection_lost(self, fd: int, exc: Exception | None) -> None: ... - def process_exited(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/queues.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/queues.vpi deleted file mode 100644 index de7c4879..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/queues.vpi +++ /dev/null @@ -1,45 +0,0 @@ -import sys -from _typeshed import SupportsRichComparisonT -from types import GenericAlias -from typing import Any, Generic, TypeVar - -from .mixins import _LoopBoundMixin - -class QueueEmpty(Exception): ... -class QueueFull(Exception): ... - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 13): - __all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty", "QueueShutDown") - -else: - __all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty") - -_T = TypeVar("_T") - -if sys.version_info >= (3, 13): - class QueueShutDown(Exception): ... - -class Queue(_LoopBoundMixin, Generic[_T]): - def __init__(self, maxsize: int = 0) -> None: ... - def _init(self, maxsize: int) -> None: ... - def _get(self) -> _T: ... - def _put(self, item: _T) -> None: ... - def _format(self) -> str: ... - def qsize(self) -> int: ... - @property - def maxsize(self) -> int: ... - def empty(self) -> bool: ... - def full(self) -> bool: ... - async def put(self, item: _T) -> None: ... - def put_nowait(self, item: _T) -> None: ... - async def get(self) -> _T: ... - def get_nowait(self) -> _T: ... - async def join(self) -> None: ... - def task_done(self) -> None: ... - def __class_getitem__(cls, type: Any, /) -> GenericAlias: ... - if sys.version_info >= (3, 13): - def shutdown(self, immediate: bool = False) -> None: ... - -class PriorityQueue(Queue[SupportsRichComparisonT]): ... -class LifoQueue(Queue[_T]): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/runners.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/runners.vpi deleted file mode 100644 index 3a1e33aa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/runners.vpi +++ /dev/null @@ -1,41 +0,0 @@ -import sys -from _typeshed import Unused -from collections.abc import Awaitable, Callable, Coroutine -from contextvars import Context -from typing import Any, TypeVar, final -from typing_extensions import Self - -from .events import AbstractEventLoop - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 11): - __all__ = ("Runner", "run") -else: - __all__ = ("run",) -_T = TypeVar("_T") - -if sys.version_info >= (3, 11): - @final - class Runner: - def __init__(self, *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc_type: Unused, exc_val: Unused, exc_tb: Unused) -> None: ... - def close(self) -> None: ... - def get_loop(self) -> AbstractEventLoop: ... - if sys.version_info >= (3, 14): - def run(self, coro: Awaitable[_T], *, context: Context | None = None) -> _T: ... - else: - def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = None) -> _T: ... - -if sys.version_info >= (3, 14): - def run( - main: Awaitable[_T], *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None - ) -> _T: ... - -elif sys.version_info >= (3, 12): - def run( - main: Coroutine[Any, Any, _T], *, debug: bool | None = None, loop_factory: Callable[[], AbstractEventLoop] | None = None - ) -> _T: ... - -else: - def run(main: Coroutine[Any, Any, _T], *, debug: bool | None = None) -> _T: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/selector_events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/selector_events.vpi deleted file mode 100644 index 18c5df03..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/selector_events.vpi +++ /dev/null @@ -1,10 +0,0 @@ -import selectors -from socket import socket - -from . import base_events - -__all__ = ("BaseSelectorEventLoop",) - -class BaseSelectorEventLoop(base_events.BaseEventLoop): - def __init__(self, selector: selectors.BaseSelector | None = None) -> None: ... - async def sock_recv(self, sock: socket, n: int) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/sslproto.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/sslproto.vpi deleted file mode 100644 index 72b4ea44..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/sslproto.vpi +++ /dev/null @@ -1,164 +0,0 @@ -import ssl -import sys -from collections import deque -from collections.abc import Callable -from enum import Enum -from typing import Any, ClassVar, Final, Literal, TypeAlias - -from . import constants, events, futures, protocols, transports - -def _create_transport_context(server_side: bool, server_hostname: str | None) -> ssl.SSLContext: ... - -if sys.version_info >= (3, 11): - SSLAgainErrors: tuple[type[ssl.SSLWantReadError], type[ssl.SSLSyscallError]] - - class SSLProtocolState(Enum): - UNWRAPPED = "UNWRAPPED" - DO_HANDSHAKE = "DO_HANDSHAKE" - WRAPPED = "WRAPPED" - FLUSHING = "FLUSHING" - SHUTDOWN = "SHUTDOWN" - - class AppProtocolState(Enum): - STATE_INIT = "STATE_INIT" - STATE_CON_MADE = "STATE_CON_MADE" - STATE_EOF = "STATE_EOF" - STATE_CON_LOST = "STATE_CON_LOST" - - def add_flowcontrol_defaults(high: int | None, low: int | None, kb: int) -> tuple[int, int]: ... - -else: - _UNWRAPPED: Final = "UNWRAPPED" - _DO_HANDSHAKE: Final = "DO_HANDSHAKE" - _WRAPPED: Final = "WRAPPED" - _SHUTDOWN: Final = "SHUTDOWN" - -if sys.version_info < (3, 11): - class _SSLPipe: - max_size: ClassVar[int] - - _context: ssl.SSLContext - _server_side: bool - _server_hostname: str | None - _state: str - _incoming: ssl.MemoryBIO - _outgoing: ssl.MemoryBIO - _sslobj: ssl.SSLObject | None - _need_ssldata: bool - _handshake_cb: Callable[[BaseException | None], None] | None - _shutdown_cb: Callable[[], None] | None - def __init__(self, context: ssl.SSLContext, server_side: bool, server_hostname: str | None = None) -> None: ... - @property - def context(self) -> ssl.SSLContext: ... - @property - def ssl_object(self) -> ssl.SSLObject | None: ... - @property - def need_ssldata(self) -> bool: ... - @property - def wrapped(self) -> bool: ... - def do_handshake(self, callback: Callable[[BaseException | None], object] | None = None) -> list[bytes]: ... - def shutdown(self, callback: Callable[[], object] | None = None) -> list[bytes]: ... - def feed_eof(self) -> None: ... - def feed_ssldata(self, data: bytes, only_handshake: bool = False) -> tuple[list[bytes], list[bytes]]: ... - def feed_appdata(self, data: bytes, offset: int = 0) -> tuple[list[bytes], int]: ... - -class _SSLProtocolTransport(transports._FlowControlMixin, transports.Transport): - _sendfile_compatible: ClassVar[constants._SendfileMode] - - _loop: events.AbstractEventLoop - if sys.version_info >= (3, 11): - _ssl_protocol: SSLProtocol | None - else: - _ssl_protocol: SSLProtocol - _closed: bool - def __init__(self, loop: events.AbstractEventLoop, ssl_protocol: SSLProtocol) -> None: ... - def get_extra_info(self, name: str, default: Any | None = None) -> dict[str, Any]: ... - @property - def _protocol_paused(self) -> bool: ... - def write(self, data: bytes | bytearray | memoryview[Any]) -> None: ... # any memoryview format or shape - def can_write_eof(self) -> Literal[False]: ... - if sys.version_info >= (3, 11): - def get_write_buffer_limits(self) -> tuple[int, int]: ... - def get_read_buffer_limits(self) -> tuple[int, int]: ... - def set_read_buffer_limits(self, high: int | None = None, low: int | None = None) -> None: ... - def get_read_buffer_size(self) -> int: ... - - def __del__(self) -> None: ... - -if sys.version_info >= (3, 11): - _SSLProtocolBase: TypeAlias = protocols.BufferedProtocol -else: - _SSLProtocolBase: TypeAlias = protocols.Protocol - -class SSLProtocol(_SSLProtocolBase): - _server_side: bool - _server_hostname: str | None - _sslcontext: ssl.SSLContext - _extra: dict[str, Any] - _write_backlog: deque[tuple[bytes, int]] - _write_buffer_size: int - _waiter: futures.Future[Any] - _loop: events.AbstractEventLoop - _app_transport: _SSLProtocolTransport - _transport: transports.BaseTransport | None - _ssl_handshake_timeout: int | None - _app_protocol: protocols.BaseProtocol - _app_protocol_is_buffer: bool - - if sys.version_info >= (3, 11): - max_size: ClassVar[int] - else: - _sslpipe: _SSLPipe | None - _session_established: bool - _call_connection_made: bool - _in_handshake: bool - _in_shutdown: bool - - if sys.version_info >= (3, 11): - def __init__( - self, - loop: events.AbstractEventLoop, - app_protocol: protocols.BaseProtocol, - sslcontext: ssl.SSLContext, - waiter: futures.Future[Any], - server_side: bool = False, - server_hostname: str | None = None, - call_connection_made: bool = True, - ssl_handshake_timeout: int | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> None: ... - else: - def __init__( - self, - loop: events.AbstractEventLoop, - app_protocol: protocols.BaseProtocol, - sslcontext: ssl.SSLContext, - waiter: futures.Future[Any], - server_side: bool = False, - server_hostname: str | None = None, - call_connection_made: bool = True, - ssl_handshake_timeout: int | None = None, - ) -> None: ... - - def _set_app_protocol(self, app_protocol: protocols.BaseProtocol) -> None: ... - def _wakeup_waiter(self, exc: BaseException | None = None) -> None: ... - def connection_lost(self, exc: BaseException | None) -> None: ... - def eof_received(self) -> None: ... - def _get_extra_info(self, name: str, default: Any | None = None) -> Any: ... - def _start_shutdown(self) -> None: ... - if sys.version_info >= (3, 11): - def _write_appdata(self, list_of_data: list[bytes]) -> None: ... - else: - def _write_appdata(self, data: bytes) -> None: ... - - def _start_handshake(self) -> None: ... - def _check_handshake_timeout(self) -> None: ... - def _on_handshake_complete(self, handshake_exc: BaseException | None) -> None: ... - def _fatal_error(self, exc: BaseException, message: str = "Fatal error on transport") -> None: ... - if sys.version_info >= (3, 11): - def _abort(self, exc: BaseException | None) -> None: ... - def get_buffer(self, n: int) -> memoryview: ... - else: - def _abort(self) -> None: ... - def _finalize(self) -> None: ... - def _process_write_backlog(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/staggered.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/staggered.vpi deleted file mode 100644 index 3324777f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/staggered.vpi +++ /dev/null @@ -1,10 +0,0 @@ -from collections.abc import Awaitable, Callable, Iterable -from typing import Any - -from . import events - -__all__ = ("staggered_race",) - -async def staggered_race( - coro_fns: Iterable[Callable[[], Awaitable[Any]]], delay: float | None, *, loop: events.AbstractEventLoop | None = None -) -> tuple[Any, int | None, list[Exception | None]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/streams.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/streams.vpi deleted file mode 100644 index 9e76c69d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/streams.vpi +++ /dev/null @@ -1,124 +0,0 @@ -import ssl -import sys -from _typeshed import ReadableBuffer, StrPath -from collections.abc import Awaitable, Callable, Iterable, Sequence, Sized -from types import ModuleType -from typing import Any, Protocol, SupportsIndex, TypeAlias, type_check_only -from typing_extensions import Self - -from . import events, protocols, transports -from .base_events import Server - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.platform == "win32": - __all__ = ("StreamReader", "StreamWriter", "StreamReaderProtocol", "open_connection", "start_server") -else: - __all__ = ( - "StreamReader", - "StreamWriter", - "StreamReaderProtocol", - "open_connection", - "start_server", - "open_unix_connection", - "start_unix_server", - ) - -_ClientConnectedCallback: TypeAlias = Callable[[StreamReader, StreamWriter], Awaitable[None] | None] - -@type_check_only -class _ReaduntilBuffer(ReadableBuffer, Sized, Protocol): ... - -async def open_connection( - host: str | None = None, - port: int | str | None = None, - *, - limit: int = 65536, - ssl_handshake_timeout: float | None = None, - **kwds: Any, -) -> tuple[StreamReader, StreamWriter]: ... -async def start_server( - client_connected_cb: _ClientConnectedCallback, - host: str | Sequence[str] | None = None, - port: int | str | None = None, - *, - limit: int = 65536, - ssl_handshake_timeout: float | None = None, - **kwds: Any, -) -> Server: ... - -if sys.platform != "win32": - async def open_unix_connection( - path: StrPath | None = None, *, limit: int = 65536, **kwds: Any - ) -> tuple[StreamReader, StreamWriter]: ... - async def start_unix_server( - client_connected_cb: _ClientConnectedCallback, path: StrPath | None = None, *, limit: int = 65536, **kwds: Any - ) -> Server: ... - -class FlowControlMixin(protocols.Protocol): - def __init__(self, loop: events.AbstractEventLoop | None = None) -> None: ... - -class StreamReaderProtocol(FlowControlMixin, protocols.Protocol): - def __init__( - self, - stream_reader: StreamReader, - client_connected_cb: _ClientConnectedCallback | None = None, - loop: events.AbstractEventLoop | None = None, - ) -> None: ... - def __del__(self) -> None: ... - -class StreamWriter: - def __init__( - self, - transport: transports.WriteTransport, - protocol: protocols.BaseProtocol, - reader: StreamReader | None, - loop: events.AbstractEventLoop, - ) -> None: ... - @property - def transport(self) -> transports.WriteTransport: ... - def write(self, data: bytes | bytearray | memoryview) -> None: ... - def writelines(self, data: Iterable[bytes | bytearray | memoryview]) -> None: ... - def write_eof(self) -> None: ... - def can_write_eof(self) -> bool: ... - def close(self) -> None: ... - def is_closing(self) -> bool: ... - async def wait_closed(self) -> None: ... - def get_extra_info(self, name: str, default: Any = None) -> Any: ... - async def drain(self) -> None: ... - if sys.version_info >= (3, 12): - async def start_tls( - self, - sslcontext: ssl.SSLContext, - *, - server_hostname: str | None = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - ) -> None: ... - elif sys.version_info >= (3, 11): - async def start_tls( - self, sslcontext: ssl.SSLContext, *, server_hostname: str | None = None, ssl_handshake_timeout: float | None = None - ) -> None: ... - - if sys.version_info >= (3, 13): - def __del__(self, warnings: ModuleType = ...) -> None: ... - elif sys.version_info >= (3, 11): - def __del__(self) -> None: ... - -class StreamReader: - def __init__(self, limit: int = 65536, loop: events.AbstractEventLoop | None = None) -> None: ... - def exception(self) -> Exception | None: ... - def set_exception(self, exc: Exception) -> None: ... - def set_transport(self, transport: transports.BaseTransport) -> None: ... - def feed_eof(self) -> None: ... - def at_eof(self) -> bool: ... - def feed_data(self, data: Iterable[SupportsIndex]) -> None: ... - async def readline(self) -> bytes: ... - if sys.version_info >= (3, 13): - async def readuntil(self, separator: _ReaduntilBuffer | tuple[_ReaduntilBuffer, ...] = b"\n") -> bytes: ... - else: - async def readuntil(self, separator: _ReaduntilBuffer = b"\n") -> bytes: ... - - async def read(self, n: int = -1) -> bytes: ... - async def readexactly(self, n: int) -> bytes: ... - def __aiter__(self) -> Self: ... - async def __anext__(self) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/subprocess.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/subprocess.vpi deleted file mode 100644 index 6405e5ae..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/subprocess.vpi +++ /dev/null @@ -1,166 +0,0 @@ -import subprocess -import sys -from _typeshed import StrOrBytesPath -from asyncio import events, protocols, streams, transports -from collections.abc import Callable, Collection -from typing import IO, Any, Literal - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("create_subprocess_exec", "create_subprocess_shell") - -PIPE: int -STDOUT: int -DEVNULL: int - -class SubprocessStreamProtocol(streams.FlowControlMixin, protocols.SubprocessProtocol): - stdin: streams.StreamWriter | None - stdout: streams.StreamReader | None - stderr: streams.StreamReader | None - def __init__(self, limit: int, loop: events.AbstractEventLoop) -> None: ... - def pipe_data_received(self, fd: int, data: bytes | str) -> None: ... - -class Process: - stdin: streams.StreamWriter | None - stdout: streams.StreamReader | None - stderr: streams.StreamReader | None - pid: int - def __init__( - self, transport: transports.BaseTransport, protocol: protocols.BaseProtocol, loop: events.AbstractEventLoop - ) -> None: ... - @property - def returncode(self) -> int | None: ... - async def wait(self) -> int: ... - def send_signal(self, signal: int) -> None: ... - def terminate(self) -> None: ... - def kill(self) -> None: ... - async def communicate(self, input: bytes | bytearray | memoryview | None = None) -> tuple[bytes, bytes]: ... - -if sys.version_info >= (3, 11): - async def create_subprocess_shell( - cmd: str | bytes, - stdin: int | IO[Any] | None = None, - stdout: int | IO[Any] | None = None, - stderr: int | IO[Any] | None = None, - limit: int = 65536, - *, - # These parameters are forced to these values by BaseEventLoop.subprocess_shell - universal_newlines: Literal[False] = False, - shell: Literal[True] = True, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - # These parameters are taken by subprocess.Popen, which this ultimately delegates to - executable: StrOrBytesPath | None = None, - preexec_fn: Callable[[], Any] | None = None, - close_fds: bool = True, - cwd: StrOrBytesPath | None = None, - env: subprocess._ENV | None = None, - startupinfo: Any | None = None, - creationflags: int = 0, - restore_signals: bool = True, - start_new_session: bool = False, - pass_fds: Collection[int] = (), - group: None | str | int = None, - extra_groups: None | Collection[str | int] = None, - user: None | str | int = None, - umask: int = -1, - process_group: int | None = None, - pipesize: int = -1, - ) -> Process: ... - async def create_subprocess_exec( - program: StrOrBytesPath, - *args: StrOrBytesPath, - stdin: int | IO[Any] | None = None, - stdout: int | IO[Any] | None = None, - stderr: int | IO[Any] | None = None, - limit: int = 65536, - # These parameters are forced to these values by BaseEventLoop.subprocess_exec - universal_newlines: Literal[False] = False, - shell: Literal[False] = False, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - # These parameters are taken by subprocess.Popen, which this ultimately delegates to - executable: StrOrBytesPath | None = None, - preexec_fn: Callable[[], Any] | None = None, - close_fds: bool = True, - cwd: StrOrBytesPath | None = None, - env: subprocess._ENV | None = None, - startupinfo: Any | None = None, - creationflags: int = 0, - restore_signals: bool = True, - start_new_session: bool = False, - pass_fds: Collection[int] = (), - group: None | str | int = None, - extra_groups: None | Collection[str | int] = None, - user: None | str | int = None, - umask: int = -1, - process_group: int | None = None, - pipesize: int = -1, - ) -> Process: ... - -else: - async def create_subprocess_shell( - cmd: str | bytes, - stdin: int | IO[Any] | None = None, - stdout: int | IO[Any] | None = None, - stderr: int | IO[Any] | None = None, - limit: int = 65536, - *, - # These parameters are forced to these values by BaseEventLoop.subprocess_shell - universal_newlines: Literal[False] = False, - shell: Literal[True] = True, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - # These parameters are taken by subprocess.Popen, which this ultimately delegates to - executable: StrOrBytesPath | None = None, - preexec_fn: Callable[[], Any] | None = None, - close_fds: bool = True, - cwd: StrOrBytesPath | None = None, - env: subprocess._ENV | None = None, - startupinfo: Any | None = None, - creationflags: int = 0, - restore_signals: bool = True, - start_new_session: bool = False, - pass_fds: Collection[int] = (), - group: None | str | int = None, - extra_groups: None | Collection[str | int] = None, - user: None | str | int = None, - umask: int = -1, - pipesize: int = -1, - ) -> Process: ... - async def create_subprocess_exec( - program: StrOrBytesPath, - *args: StrOrBytesPath, - stdin: int | IO[Any] | None = None, - stdout: int | IO[Any] | None = None, - stderr: int | IO[Any] | None = None, - limit: int = 65536, - # These parameters are forced to these values by BaseEventLoop.subprocess_exec - universal_newlines: Literal[False] = False, - shell: Literal[False] = False, - bufsize: Literal[0] = 0, - encoding: None = None, - errors: None = None, - text: Literal[False] | None = None, - # These parameters are taken by subprocess.Popen, which this ultimately delegates to - executable: StrOrBytesPath | None = None, - preexec_fn: Callable[[], Any] | None = None, - close_fds: bool = True, - cwd: StrOrBytesPath | None = None, - env: subprocess._ENV | None = None, - startupinfo: Any | None = None, - creationflags: int = 0, - restore_signals: bool = True, - start_new_session: bool = False, - pass_fds: Collection[int] = (), - group: None | str | int = None, - extra_groups: None | Collection[str | int] = None, - user: None | str | int = None, - umask: int = -1, - pipesize: int = -1, - ) -> Process: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/taskgroups.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/taskgroups.vpi deleted file mode 100644 index 886a79c4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/taskgroups.vpi +++ /dev/null @@ -1,41 +0,0 @@ -import sys -from contextvars import Context -from types import TracebackType -from typing import Any, TypeVar -from typing_extensions import Self - -from . import _CoroutineLike -from .events import AbstractEventLoop -from .tasks import Task - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 12): - __all__ = ("TaskGroup",) -else: - __all__ = ["TaskGroup"] - -_T = TypeVar("_T") - -class TaskGroup: - _loop: AbstractEventLoop | None - _tasks: set[Task[Any]] - - async def __aenter__(self) -> Self: ... - async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ... - if sys.version_info >= (3, 14): - def create_task( - self, - coro: _CoroutineLike[_T], - *, - name: str | None = None, - context: Context | None = None, - eager_start: bool | None = None, - ) -> Task[_T]: ... - else: - def create_task( - self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None - ) -> Task[_T]: ... - - def _on_task_done(self, task: Task[object]) -> None: ... - if sys.version_info >= (3, 15): - def cancel(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tasks.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tasks.vpi deleted file mode 100644 index 66c31f15..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tasks.vpi +++ /dev/null @@ -1,315 +0,0 @@ -import concurrent.futures -import sys -from _asyncio import ( - Task as Task, - _enter_task as _enter_task, - _leave_task as _leave_task, - _register_task as _register_task, - _unregister_task as _unregister_task, -) -from collections.abc import AsyncIterator, Awaitable, Coroutine, Generator, Iterable, Iterator -from typing import Any, Final, Literal, Protocol, TypeAlias, TypeVar, overload, type_check_only - -from . import _CoroutineLike -from .events import AbstractEventLoop -from .futures import Future - -if sys.version_info >= (3, 11): - from contextvars import Context - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.version_info >= (3, 12): - __all__ = ( - "Task", - "create_task", - "FIRST_COMPLETED", - "FIRST_EXCEPTION", - "ALL_COMPLETED", - "wait", - "wait_for", - "as_completed", - "sleep", - "gather", - "shield", - "ensure_future", - "run_coroutine_threadsafe", - "current_task", - "all_tasks", - "create_eager_task_factory", - "eager_task_factory", - "_register_task", - "_unregister_task", - "_enter_task", - "_leave_task", - ) -else: - __all__ = ( - "Task", - "create_task", - "FIRST_COMPLETED", - "FIRST_EXCEPTION", - "ALL_COMPLETED", - "wait", - "wait_for", - "as_completed", - "sleep", - "gather", - "shield", - "ensure_future", - "run_coroutine_threadsafe", - "current_task", - "all_tasks", - "_register_task", - "_unregister_task", - "_enter_task", - "_leave_task", - ) - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_T1 = TypeVar("_T1") -_T2 = TypeVar("_T2") -_T3 = TypeVar("_T3") -_T4 = TypeVar("_T4") -_T5 = TypeVar("_T5") -_T6 = TypeVar("_T6") -_FT = TypeVar("_FT", bound=Future[Any]) -if sys.version_info >= (3, 12): - _FutureLike: TypeAlias = Future[_T] | Awaitable[_T] -else: - _FutureLike: TypeAlias = Future[_T] | Generator[Any, None, _T] | Awaitable[_T] - -_TaskYieldType: TypeAlias = Future[object] | None - -FIRST_COMPLETED: Final = concurrent.futures.FIRST_COMPLETED -FIRST_EXCEPTION: Final = concurrent.futures.FIRST_EXCEPTION -ALL_COMPLETED: Final = concurrent.futures.ALL_COMPLETED - -if sys.version_info >= (3, 13): - @type_check_only - class _SyncAndAsyncIterator(Iterator[Coroutine[Any, Any, _T]], AsyncIterator[Future[_T]], Protocol[_T]): ... - - def as_completed(fs: Iterable[_FutureLike[_T]], *, timeout: float | None = None) -> _SyncAndAsyncIterator[_T]: ... - -else: - def as_completed(fs: Iterable[_FutureLike[_T]], *, timeout: float | None = None) -> Iterator[Future[_T]]: ... - -@overload -def ensure_future(coro_or_future: _FT, *, loop: AbstractEventLoop | None = None) -> _FT: ... # type: ignore[overload-overlap] -@overload -def ensure_future(coro_or_future: Awaitable[_T], *, loop: AbstractEventLoop | None = None) -> Task[_T]: ... - -# `gather()` actually returns a list with length equal to the number -# of tasks passed; however, Tuple is used similar to the annotation for -# zip() because typing does not support variadic type variables. See -# typing PR #1550 for discussion. -# -# N.B. Having overlapping overloads is the only way to get acceptable type inference in all edge cases. -@overload -def gather(coro_or_future1: _FutureLike[_T1], /, *, return_exceptions: Literal[False] = False) -> Future[tuple[_T1]]: ... # type: ignore[overload-overlap] -@overload -def gather( # type: ignore[overload-overlap] - coro_or_future1: _FutureLike[_T1], coro_or_future2: _FutureLike[_T2], /, *, return_exceptions: Literal[False] = False -) -> Future[tuple[_T1, _T2]]: ... -@overload -def gather( # type: ignore[overload-overlap] - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - /, - *, - return_exceptions: Literal[False] = False, -) -> Future[tuple[_T1, _T2, _T3]]: ... -@overload -def gather( # type: ignore[overload-overlap] - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - /, - *, - return_exceptions: Literal[False] = False, -) -> Future[tuple[_T1, _T2, _T3, _T4]]: ... -@overload -def gather( # type: ignore[overload-overlap] - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - coro_or_future5: _FutureLike[_T5], - /, - *, - return_exceptions: Literal[False] = False, -) -> Future[tuple[_T1, _T2, _T3, _T4, _T5]]: ... -@overload -def gather( # type: ignore[overload-overlap] - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - coro_or_future5: _FutureLike[_T5], - coro_or_future6: _FutureLike[_T6], - /, - *, - return_exceptions: Literal[False] = False, -) -> Future[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ... -@overload -def gather(*coros_or_futures: _FutureLike[_T], return_exceptions: Literal[False] = False) -> Future[list[_T]]: ... # type: ignore[overload-overlap] -@overload -def gather(coro_or_future1: _FutureLike[_T1], /, *, return_exceptions: bool) -> Future[tuple[_T1 | BaseException]]: ... -@overload -def gather( - coro_or_future1: _FutureLike[_T1], coro_or_future2: _FutureLike[_T2], /, *, return_exceptions: bool -) -> Future[tuple[_T1 | BaseException, _T2 | BaseException]]: ... -@overload -def gather( - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - /, - *, - return_exceptions: bool, -) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException]]: ... -@overload -def gather( - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - /, - *, - return_exceptions: bool, -) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException]]: ... -@overload -def gather( - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - coro_or_future5: _FutureLike[_T5], - /, - *, - return_exceptions: bool, -) -> Future[tuple[_T1 | BaseException, _T2 | BaseException, _T3 | BaseException, _T4 | BaseException, _T5 | BaseException]]: ... -@overload -def gather( - coro_or_future1: _FutureLike[_T1], - coro_or_future2: _FutureLike[_T2], - coro_or_future3: _FutureLike[_T3], - coro_or_future4: _FutureLike[_T4], - coro_or_future5: _FutureLike[_T5], - coro_or_future6: _FutureLike[_T6], - /, - *, - return_exceptions: bool, -) -> Future[ - tuple[ - _T1 | BaseException, - _T2 | BaseException, - _T3 | BaseException, - _T4 | BaseException, - _T5 | BaseException, - _T6 | BaseException, - ] -]: ... -@overload -def gather(*coros_or_futures: _FutureLike[_T], return_exceptions: bool) -> Future[list[_T | BaseException]]: ... - -# unlike some asyncio apis, This does strict runtime checking of actually being a coroutine, not of any future-like. -def run_coroutine_threadsafe(coro: Coroutine[Any, Any, _T], loop: AbstractEventLoop) -> concurrent.futures.Future[_T]: ... -def shield(arg: _FutureLike[_T]) -> Future[_T]: ... - -@overload -async def sleep(delay: float) -> None: ... -@overload -async def sleep(delay: float, result: _T) -> _T: ... - -async def wait_for(fut: _FutureLike[_T], timeout: float | None) -> _T: ... - -if sys.version_info >= (3, 11): - async def wait( - fs: Iterable[_FT], *, timeout: float | None = None, return_when: str = "ALL_COMPLETED" - ) -> tuple[set[_FT], set[_FT]]: ... - -else: - @overload - async def wait( # type: ignore[overload-overlap] - fs: Iterable[_FT], *, timeout: float | None = None, return_when: str = "ALL_COMPLETED" - ) -> tuple[set[_FT], set[_FT]]: ... - @overload - async def wait( - fs: Iterable[Awaitable[_T]], *, timeout: float | None = None, return_when: str = "ALL_COMPLETED" - ) -> tuple[set[Task[_T]], set[Task[_T]]]: ... - -if sys.version_info >= (3, 12): - _TaskCompatibleCoro: TypeAlias = Coroutine[Any, Any, _T_co] -else: - _TaskCompatibleCoro: TypeAlias = Generator[_TaskYieldType, None, _T_co] | Coroutine[Any, Any, _T_co] - -def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... - -if sys.version_info >= (3, 14): - def create_task( - coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None - ) -> Task[_T]: ... - -elif sys.version_info >= (3, 11): - def create_task(coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None) -> Task[_T]: ... - -else: - def create_task(coro: _CoroutineLike[_T], *, name: str | None = None) -> Task[_T]: ... - -if sys.version_info >= (3, 12): - from _asyncio import current_task as current_task -else: - def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ... - -if sys.version_info >= (3, 14): - def eager_task_factory( - loop: AbstractEventLoop | None, - coro: _TaskCompatibleCoro[_T_co], - *, - name: str | None = None, - context: Context | None = None, - eager_start: bool = True, - ) -> Task[_T_co]: ... - -elif sys.version_info >= (3, 12): - def eager_task_factory( - loop: AbstractEventLoop | None, - coro: _TaskCompatibleCoro[_T_co], - *, - name: str | None = None, - context: Context | None = None, - ) -> Task[_T_co]: ... - -if sys.version_info >= (3, 12): - _TaskT_co = TypeVar("_TaskT_co", bound=Task[Any], covariant=True) - - @type_check_only - class _CustomTaskConstructor(Protocol[_TaskT_co]): - def __call__( - self, - coro: _TaskCompatibleCoro[Any], - /, - *, - loop: AbstractEventLoop, - name: str | None, - context: Context | None, - eager_start: bool, - ) -> _TaskT_co: ... - - @type_check_only - class _EagerTaskFactoryType(Protocol[_TaskT_co]): - def __call__( - self, - loop: AbstractEventLoop, - coro: _TaskCompatibleCoro[Any], - *, - name: str | None = None, - context: Context | None = None, - ) -> _TaskT_co: ... - - def create_eager_task_factory( - custom_task_constructor: _CustomTaskConstructor[_TaskT_co], - ) -> _EagerTaskFactoryType[_TaskT_co]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/threads.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/threads.vpi deleted file mode 100644 index f1d88291..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/threads.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from collections.abc import Callable -from typing import ParamSpec, TypeVar - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("to_thread",) -_P = ParamSpec("_P") -_R = TypeVar("_R") - -async def to_thread(func: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/timeouts.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/timeouts.vpi deleted file mode 100644 index 668cccbf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/timeouts.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from types import TracebackType -from typing import final -from typing_extensions import Self - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("Timeout", "timeout", "timeout_at") - -@final -class Timeout: - def __init__(self, when: float | None) -> None: ... - def when(self) -> float | None: ... - def reschedule(self, when: float | None) -> None: ... - def expired(self) -> bool: ... - async def __aenter__(self) -> Self: ... - async def __aexit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - -def timeout(delay: float | None) -> Timeout: ... -def timeout_at(when: float | None) -> Timeout: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tools.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tools.vpi deleted file mode 100644 index 36c65541..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/tools.vpi +++ /dev/null @@ -1,51 +0,0 @@ -import sys -from collections.abc import Iterable -from enum import Enum -from typing import NamedTuple, SupportsIndex, type_check_only - -@type_check_only -class _AwaitedInfo(NamedTuple): # AwaitedInfo_Type from _remote_debugging - thread_id: int - awaited_by: list[_TaskInfo] - -@type_check_only -class _TaskInfo(NamedTuple): # TaskInfo_Type from _remote_debugging - task_id: int - task_name: str - coroutine_stack: list[_CoroInfo] - awaited_by: list[_CoroInfo] - -@type_check_only -class _CoroInfo(NamedTuple): # CoroInfo_Type from _remote_debugging - call_stack: list[_FrameInfo] - task_name: int | str - -@type_check_only -class _FrameInfo(NamedTuple): # FrameInfo_Type from _remote_debugging - filename: str - lineno: int - funcname: str - -class NodeType(Enum): - COROUTINE = 1 - TASK = 2 - -class CycleFoundException(Exception): - cycles: list[list[int]] - id2name: dict[int, str] - def __init__(self, cycles: list[list[int]], id2name: dict[int, str]) -> None: ... - -def get_all_awaited_by(pid: SupportsIndex) -> list[_AwaitedInfo]: ... -def build_async_tree(result: Iterable[_AwaitedInfo], task_emoji: str = "(T)", cor_emoji: str = "") -> list[list[str]]: ... -def build_task_table(result: Iterable[_AwaitedInfo]) -> list[list[int | str]]: ... - -if sys.version_info >= (3, 14): - def exit_with_permission_help_text() -> None: ... - -if sys.version_info >= (3, 15): - def display_awaited_by_tasks_table(pid: SupportsIndex, retries: SupportsIndex = 3) -> None: ... - def display_awaited_by_tasks_tree(pid: SupportsIndex, retries: SupportsIndex = 3) -> None: ... - -else: - def display_awaited_by_tasks_table(pid: SupportsIndex) -> None: ... - def display_awaited_by_tasks_tree(pid: SupportsIndex) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/transports.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/transports.vpi deleted file mode 100644 index cc870d5e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/transports.vpi +++ /dev/null @@ -1,57 +0,0 @@ -from asyncio.events import AbstractEventLoop -from asyncio.protocols import BaseProtocol -from collections.abc import Iterable, Mapping -from socket import _Address -from typing import Any - -# Keep asyncio.__all__ updated with any changes to __all__ here -__all__ = ("BaseTransport", "ReadTransport", "WriteTransport", "Transport", "DatagramTransport", "SubprocessTransport") - -class BaseTransport: - __slots__ = ("_extra",) - def __init__(self, extra: Mapping[str, Any] | None = None) -> None: ... - def get_extra_info(self, name: str, default: Any = None) -> Any: ... - def is_closing(self) -> bool: ... - def close(self) -> None: ... - def set_protocol(self, protocol: BaseProtocol) -> None: ... - def get_protocol(self) -> BaseProtocol: ... - -class ReadTransport(BaseTransport): - __slots__ = () - def is_reading(self) -> bool: ... - def pause_reading(self) -> None: ... - def resume_reading(self) -> None: ... - -class WriteTransport(BaseTransport): - __slots__ = () - def set_write_buffer_limits(self, high: int | None = None, low: int | None = None) -> None: ... - def get_write_buffer_size(self) -> int: ... - def get_write_buffer_limits(self) -> tuple[int, int]: ... - def write(self, data: bytes | bytearray | memoryview[Any]) -> None: ... # any memoryview format or shape - def writelines( - self, list_of_data: Iterable[bytes | bytearray | memoryview[Any]] - ) -> None: ... # any memoryview format or shape - def write_eof(self) -> None: ... - def can_write_eof(self) -> bool: ... - def abort(self) -> None: ... - -class Transport(ReadTransport, WriteTransport): - __slots__ = () - -class DatagramTransport(BaseTransport): - __slots__ = () - def sendto(self, data: bytes | bytearray | memoryview, addr: _Address | None = None) -> None: ... - def abort(self) -> None: ... - -class SubprocessTransport(BaseTransport): - __slots__ = () - def get_pid(self) -> int: ... - def get_returncode(self) -> int | None: ... - def get_pipe_transport(self, fd: int) -> BaseTransport | None: ... - def send_signal(self, signal: int) -> None: ... - def terminate(self) -> None: ... - def kill(self) -> None: ... - -class _FlowControlMixin(Transport): - __slots__ = ("_loop", "_protocol_paused", "_high_water", "_low_water") - def __init__(self, extra: Mapping[str, Any] | None = None, loop: AbstractEventLoop | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/trsock.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/trsock.vpi deleted file mode 100644 index f621240d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/trsock.vpi +++ /dev/null @@ -1,137 +0,0 @@ -import socket -import sys -from _typeshed import ReadableBuffer -from builtins import type as Type # alias to avoid name clashes with property named "type" -from collections.abc import Iterable -from types import TracebackType -from typing import Any, BinaryIO, NoReturn, TypeAlias, overload -from typing_extensions import deprecated - -# These are based in socket, maybe move them out into _typeshed.pyi or such -_Address: TypeAlias = socket._Address -_RetAddress: TypeAlias = Any -_WriteBuffer: TypeAlias = bytearray | memoryview -_CMSG: TypeAlias = tuple[int, int, bytes] - -class TransportSocket: - __slots__ = ("_sock",) - def __init__(self, sock: socket.socket) -> None: ... - @property - def family(self) -> int: ... - @property - def type(self) -> int: ... - @property - def proto(self) -> int: ... - def __getstate__(self) -> NoReturn: ... - def fileno(self) -> int: ... - def dup(self) -> socket.socket: ... - def get_inheritable(self) -> bool: ... - def shutdown(self, how: int) -> None: ... - - @overload - def getsockopt(self, level: int, optname: int) -> int: ... - @overload - def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ... - - @overload - def setsockopt(self, level: int, optname: int, value: int | ReadableBuffer) -> None: ... - @overload - def setsockopt(self, level: int, optname: int, value: None, optlen: int) -> None: ... - - def getpeername(self) -> _RetAddress: ... - def getsockname(self) -> _RetAddress: ... - def getsockbyname(self) -> NoReturn: ... # This method doesn't exist on socket, yet is passed through? - def settimeout(self, value: float | None) -> None: ... - def gettimeout(self) -> float | None: ... - def setblocking(self, flag: bool) -> None: ... - if sys.version_info < (3, 11): - def _na(self, what: str) -> None: ... - @deprecated("Removed in Python 3.11") - def accept(self) -> tuple[socket.socket, _RetAddress]: ... - @deprecated("Removed in Python 3.11") - def connect(self, address: _Address) -> None: ... - @deprecated("Removed in Python 3.11") - def connect_ex(self, address: _Address) -> int: ... - @deprecated("Removed in Python 3.11") - def bind(self, address: _Address) -> None: ... - - if sys.platform == "win32": - @deprecated("Removed in Python 3.11") - def ioctl(self, control: int, option: int | tuple[int, int, int] | bool) -> None: ... - else: - @deprecated("Removed in Python 3.11") - def ioctl(self, control: int, option: int | tuple[int, int, int] | bool) -> NoReturn: ... - - @deprecated("Removed in Python 3.11") - def listen(self, backlog: int = ..., /) -> None: ... - @deprecated("Removed in Python 3.11") - def makefile(self) -> BinaryIO: ... - @deprecated("Removed in Python 3.11") - def sendfile(self, file: BinaryIO, offset: int = 0, count: int | None = None) -> int: ... - @deprecated("Removed in Python 3.11") - def close(self) -> None: ... - @deprecated("Removed in Python 3.11") - def detach(self) -> int: ... - - if sys.platform == "linux": - @deprecated("Removed in Python 3.11") - def sendmsg_afalg( - self, msg: Iterable[ReadableBuffer] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = 0 - ) -> int: ... - else: - @deprecated("Removed in Python 3.11.") - def sendmsg_afalg( - self, msg: Iterable[ReadableBuffer] = ..., *, op: int, iv: Any = ..., assoclen: int = ..., flags: int = 0 - ) -> NoReturn: ... - - @deprecated("Removed in Python 3.11.") - def sendmsg( - self, - buffers: Iterable[ReadableBuffer], - ancdata: Iterable[_CMSG] = ..., - flags: int = 0, - address: _Address | None = None, - /, - ) -> int: ... - - @overload - @deprecated("Removed in Python 3.11.") - def sendto(self, data: ReadableBuffer, address: _Address) -> int: ... - @overload - @deprecated("Removed in Python 3.11.") - def sendto(self, data: ReadableBuffer, flags: int, address: _Address) -> int: ... - - @deprecated("Removed in Python 3.11.") - def send(self, data: ReadableBuffer, flags: int = 0) -> int: ... - @deprecated("Removed in Python 3.11.") - def sendall(self, data: ReadableBuffer, flags: int = 0) -> None: ... - @deprecated("Removed in Python 3.11.") - def set_inheritable(self, inheritable: bool) -> None: ... - - if sys.platform == "win32": - @deprecated("Removed in Python 3.11.") - def share(self, process_id: int) -> bytes: ... - else: - @deprecated("Removed in Python 3.11.") - def share(self, process_id: int) -> NoReturn: ... - - @deprecated("Removed in Python 3.11.") - def recv_into(self, buffer: _WriteBuffer, nbytes: int = 0, flags: int = 0) -> int: ... - @deprecated("Removed in Python 3.11.") - def recvfrom_into(self, buffer: _WriteBuffer, nbytes: int = 0, flags: int = 0) -> tuple[int, _RetAddress]: ... - @deprecated("Removed in Python 3.11.") - def recvmsg_into( - self, buffers: Iterable[_WriteBuffer], ancbufsize: int = 0, flags: int = 0, / - ) -> tuple[int, list[_CMSG], int, Any]: ... - @deprecated("Removed in Python 3.11.") - def recvmsg(self, bufsize: int, ancbufsize: int = 0, flags: int = 0, /) -> tuple[bytes, list[_CMSG], int, Any]: ... - @deprecated("Removed in Python 3.11.") - def recvfrom(self, bufsize: int, flags: int = 0) -> tuple[bytes, _RetAddress]: ... - @deprecated("Removed in Python 3.11.") - def recv(self, bufsize: int, flags: int = 0) -> bytes: ... - @deprecated("Removed in Python 3.11.") - def __enter__(self) -> socket.socket: ... - @deprecated("Removed in Python 3.11.") - def __exit__( - self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/unix_events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/unix_events.vpi deleted file mode 100644 index 368cac38..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/unix_events.vpi +++ /dev/null @@ -1,277 +0,0 @@ -import sys -import types -from _typeshed import StrPath -from abc import ABCMeta, abstractmethod -from collections.abc import Callable -from socket import socket -from typing import Literal -from typing_extensions import Self, TypeVarTuple, Unpack, deprecated - -from . import events -from .base_events import Server, _ProtocolFactory, _SSLContext -from .selector_events import BaseSelectorEventLoop - -_Ts = TypeVarTuple("_Ts") - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.platform != "win32": - if sys.version_info >= (3, 14): - __all__ = ("SelectorEventLoop", "EventLoop") - elif sys.version_info >= (3, 13): - # Adds EventLoop - __all__ = ( - "SelectorEventLoop", - "AbstractChildWatcher", - "SafeChildWatcher", - "FastChildWatcher", - "PidfdChildWatcher", - "MultiLoopChildWatcher", - "ThreadedChildWatcher", - "DefaultEventLoopPolicy", - "EventLoop", - ) - else: - # adds PidfdChildWatcher - __all__ = ( - "SelectorEventLoop", - "AbstractChildWatcher", - "SafeChildWatcher", - "FastChildWatcher", - "PidfdChildWatcher", - "MultiLoopChildWatcher", - "ThreadedChildWatcher", - "DefaultEventLoopPolicy", - ) - -# This is also technically not available on Win, -# but other parts of typeshed need this definition. -# So, it is special cased. -if sys.version_info < (3, 14): - if sys.version_info >= (3, 12): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class AbstractChildWatcher: - @abstractmethod - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - @abstractmethod - def remove_child_handler(self, pid: int) -> bool: ... - @abstractmethod - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - @abstractmethod - def close(self) -> None: ... - @abstractmethod - def __enter__(self) -> Self: ... - @abstractmethod - def __exit__( - self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None - ) -> None: ... - @abstractmethod - def is_active(self) -> bool: ... - - else: - class AbstractChildWatcher: - @abstractmethod - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - @abstractmethod - def remove_child_handler(self, pid: int) -> bool: ... - @abstractmethod - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - @abstractmethod - def close(self) -> None: ... - @abstractmethod - def __enter__(self) -> Self: ... - @abstractmethod - def __exit__( - self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None - ) -> None: ... - @abstractmethod - def is_active(self) -> bool: ... - -if sys.platform != "win32": - if sys.version_info < (3, 14): - if sys.version_info >= (3, 12): - # Doesn't actually have ABCMeta metaclass at runtime, but mypy complains if we don't have it in the stub. - # See discussion in #7412 - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class BaseChildWatcher(AbstractChildWatcher, metaclass=ABCMeta): - def close(self) -> None: ... - def is_active(self) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class SafeChildWatcher(BaseChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class FastChildWatcher(BaseChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - - else: - # Doesn't actually have ABCMeta metaclass at runtime, but mypy complains if we don't have it in the stub. - # See discussion in #7412 - class BaseChildWatcher(AbstractChildWatcher, metaclass=ABCMeta): - def close(self) -> None: ... - def is_active(self) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - class SafeChildWatcher(BaseChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - - class FastChildWatcher(BaseChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, a: type[BaseException] | None, b: BaseException | None, c: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - - class _UnixSelectorEventLoop(BaseSelectorEventLoop): - if sys.version_info >= (3, 13): - async def create_unix_server( - self, - protocol_factory: _ProtocolFactory, - path: StrPath | None = None, - *, - sock: socket | None = None, - backlog: int = 100, - ssl: _SSLContext = None, - ssl_handshake_timeout: float | None = None, - ssl_shutdown_timeout: float | None = None, - start_serving: bool = True, - cleanup_socket: bool = True, - ) -> Server: ... - - if sys.version_info >= (3, 14): - class _UnixDefaultEventLoopPolicy(events._BaseDefaultEventLoopPolicy): ... - else: - class _UnixDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy): - if sys.version_info >= (3, 12): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def get_child_watcher(self) -> AbstractChildWatcher: ... - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - def set_child_watcher(self, watcher: AbstractChildWatcher | None) -> None: ... - else: - def get_child_watcher(self) -> AbstractChildWatcher: ... - def set_child_watcher(self, watcher: AbstractChildWatcher | None) -> None: ... - - SelectorEventLoop = _UnixSelectorEventLoop - - if sys.version_info >= (3, 14): - _DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy - else: - DefaultEventLoopPolicy = _UnixDefaultEventLoopPolicy - - if sys.version_info >= (3, 13): - EventLoop = SelectorEventLoop - - if sys.version_info < (3, 14): - if sys.version_info >= (3, 12): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class MultiLoopChildWatcher(AbstractChildWatcher): - def is_active(self) -> bool: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class ThreadedChildWatcher(AbstractChildWatcher): - def is_active(self) -> Literal[True]: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") - class PidfdChildWatcher(AbstractChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def is_active(self) -> bool: ... - def close(self) -> None: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - - else: - class MultiLoopChildWatcher(AbstractChildWatcher): - def is_active(self) -> bool: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - class ThreadedChildWatcher(AbstractChildWatcher): - def is_active(self) -> Literal[True]: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - - class PidfdChildWatcher(AbstractChildWatcher): - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def is_active(self) -> bool: ... - def close(self) -> None: ... - def attach_loop(self, loop: events.AbstractEventLoop | None) -> None: ... - def add_child_handler( - self, pid: int, callback: Callable[[int, int, Unpack[_Ts]], object], *args: Unpack[_Ts] - ) -> None: ... - def remove_child_handler(self, pid: int) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_events.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_events.vpi deleted file mode 100644 index a32381bf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_events.vpi +++ /dev/null @@ -1,121 +0,0 @@ -import socket -import sys -from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer -from collections.abc import Callable -from typing import IO, Any, ClassVar, Final, NoReturn - -from . import events, futures, proactor_events, selector_events, streams, windows_utils - -# Keep asyncio.__all__ updated with any changes to __all__ here -if sys.platform == "win32": - if sys.version_info >= (3, 14): - __all__ = ( - "SelectorEventLoop", - "ProactorEventLoop", - "IocpProactor", - "_DefaultEventLoopPolicy", - "_WindowsSelectorEventLoopPolicy", - "_WindowsProactorEventLoopPolicy", - "EventLoop", - ) - elif sys.version_info >= (3, 13): - # 3.13 added `EventLoop`. - __all__ = ( - "SelectorEventLoop", - "ProactorEventLoop", - "IocpProactor", - "DefaultEventLoopPolicy", - "WindowsSelectorEventLoopPolicy", - "WindowsProactorEventLoopPolicy", - "EventLoop", - ) - else: - __all__ = ( - "SelectorEventLoop", - "ProactorEventLoop", - "IocpProactor", - "DefaultEventLoopPolicy", - "WindowsSelectorEventLoopPolicy", - "WindowsProactorEventLoopPolicy", - ) - - NULL: Final = 0 - INFINITE: Final = 0xFFFFFFFF - ERROR_CONNECTION_REFUSED: Final = 1225 - ERROR_CONNECTION_ABORTED: Final = 1236 - CONNECT_PIPE_INIT_DELAY: float - CONNECT_PIPE_MAX_DELAY: float - - class PipeServer: - def __init__(self, address: str) -> None: ... - def __del__(self) -> None: ... - def closed(self) -> bool: ... - def close(self) -> None: ... - - class _WindowsSelectorEventLoop(selector_events.BaseSelectorEventLoop): ... - - class ProactorEventLoop(proactor_events.BaseProactorEventLoop): - def __init__(self, proactor: IocpProactor | None = None) -> None: ... - async def create_pipe_connection( - self, protocol_factory: Callable[[], streams.StreamReaderProtocol], address: str - ) -> tuple[proactor_events._ProactorDuplexPipeTransport, streams.StreamReaderProtocol]: ... - async def start_serving_pipe( - self, protocol_factory: Callable[[], streams.StreamReaderProtocol], address: str - ) -> list[PipeServer]: ... - - class IocpProactor: - def __init__(self, concurrency: int = 0xFFFFFFFF) -> None: ... - def __del__(self) -> None: ... - def set_loop(self, loop: events.AbstractEventLoop) -> None: ... - def select(self, timeout: int | None = None) -> list[futures.Future[Any]]: ... - def recv(self, conn: socket.socket, nbytes: int, flags: int = 0) -> futures.Future[bytes]: ... - def recv_into(self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0) -> futures.Future[Any]: ... - def recvfrom( - self, conn: socket.socket, nbytes: int, flags: int = 0 - ) -> futures.Future[tuple[bytes, socket._RetAddress]]: ... - def sendto( - self, conn: socket.socket, buf: ReadableBuffer, flags: int = 0, addr: socket._Address | None = None - ) -> futures.Future[int]: ... - def send(self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0) -> futures.Future[Any]: ... - def accept(self, listener: socket.socket) -> futures.Future[Any]: ... - def connect( - self, - conn: socket.socket, - address: tuple[Incomplete, Incomplete] | tuple[Incomplete, Incomplete, Incomplete, Incomplete], - ) -> futures.Future[Any]: ... - def sendfile(self, sock: socket.socket, file: IO[bytes], offset: int, count: int) -> futures.Future[Any]: ... - def accept_pipe(self, pipe: socket.socket) -> futures.Future[Any]: ... - async def connect_pipe(self, address: str) -> windows_utils.PipeHandle: ... - def wait_for_handle(self, handle: windows_utils.PipeHandle, timeout: int | None = None) -> bool: ... - def close(self) -> None: ... - if sys.version_info >= (3, 11): - def recvfrom_into( - self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0 - ) -> futures.Future[tuple[int, socket._RetAddress]]: ... - - SelectorEventLoop = _WindowsSelectorEventLoop - - if sys.version_info >= (3, 14): - class _WindowsSelectorEventLoopPolicy(events._BaseDefaultEventLoopPolicy): - _loop_factory: ClassVar[type[SelectorEventLoop]] - - class _WindowsProactorEventLoopPolicy(events._BaseDefaultEventLoopPolicy): - _loop_factory: ClassVar[type[ProactorEventLoop]] - - else: - class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy): - _loop_factory: ClassVar[type[SelectorEventLoop]] - def get_child_watcher(self) -> NoReturn: ... - def set_child_watcher(self, watcher: Any) -> NoReturn: ... - - class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy): - _loop_factory: ClassVar[type[ProactorEventLoop]] - def get_child_watcher(self) -> NoReturn: ... - def set_child_watcher(self, watcher: Any) -> NoReturn: ... - - if sys.version_info >= (3, 14): - _DefaultEventLoopPolicy = _WindowsProactorEventLoopPolicy - else: - DefaultEventLoopPolicy = WindowsProactorEventLoopPolicy - if sys.version_info >= (3, 13): - EventLoop = ProactorEventLoop diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_utils.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_utils.vpi deleted file mode 100644 index 5cedd61b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncio/windows_utils.vpi +++ /dev/null @@ -1,49 +0,0 @@ -import subprocess -import sys -from collections.abc import Callable -from types import TracebackType -from typing import Any, AnyStr, Final -from typing_extensions import Self - -if sys.platform == "win32": - __all__ = ("pipe", "Popen", "PIPE", "PipeHandle") - - BUFSIZE: Final = 8192 - PIPE: Final = subprocess.PIPE - STDOUT: Final = subprocess.STDOUT - def pipe(*, duplex: bool = False, overlapped: tuple[bool, bool] = (True, True), bufsize: int = 8192) -> tuple[int, int]: ... - - class PipeHandle: - def __init__(self, handle: int) -> None: ... - def __del__(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - @property - def handle(self) -> int: ... - def fileno(self) -> int: ... - def close(self, *, CloseHandle: Callable[[int], object] = ...) -> None: ... - - class Popen(subprocess.Popen[AnyStr]): - stdin: PipeHandle | None # type: ignore[assignment] - stdout: PipeHandle | None # type: ignore[assignment] - stderr: PipeHandle | None # type: ignore[assignment] - # For simplicity we omit the full overloaded __new__ signature of - # subprocess.Popen. The arguments are mostly the same, but - # subprocess.Popen takes other positional-or-keyword arguments before - # stdin. - def __new__( - cls, - args: subprocess._CMD, - stdin: subprocess._FILE | None = None, - stdout: subprocess._FILE | None = None, - stderr: subprocess._FILE | None = None, - **kwds: Any, - ) -> Self: ... - def __init__( - self, - args: subprocess._CMD, - stdin: subprocess._FILE | None = None, - stdout: subprocess._FILE | None = None, - stderr: subprocess._FILE | None = None, - **kwds: Any, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncore.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/asyncore.vpi deleted file mode 100644 index 96f9f637..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/asyncore.vpi +++ /dev/null @@ -1,91 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike, ReadableBuffer -from socket import socket -from typing import Any, TypeAlias, overload - -# cyclic dependence with asynchat -_MapType: TypeAlias = dict[int, Any] -_Socket: TypeAlias = socket - -socket_map: _MapType # undocumented - -class ExitNow(Exception): ... - -def read(obj: Any) -> None: ... -def write(obj: Any) -> None: ... -def readwrite(obj: Any, flags: int) -> None: ... -def poll(timeout: float = 0.0, map: _MapType | None = None) -> None: ... -def poll2(timeout: float = 0.0, map: _MapType | None = None) -> None: ... - -poll3 = poll2 - -def loop(timeout: float = 30.0, use_poll: bool = False, map: _MapType | None = None, count: int | None = None) -> None: ... - -# Not really subclass of socket.socket; it's only delegation. -# It is not covariant to it. -class dispatcher: - debug: bool - connected: bool - accepting: bool - connecting: bool - closing: bool - ignore_log_types: frozenset[str] - socket: _Socket | None - def __init__(self, sock: _Socket | None = None, map: _MapType | None = None) -> None: ... - def add_channel(self, map: _MapType | None = None) -> None: ... - def del_channel(self, map: _MapType | None = None) -> None: ... - def create_socket(self, family: int = ..., type: int = ...) -> None: ... - def set_socket(self, sock: _Socket, map: _MapType | None = None) -> None: ... - def set_reuse_addr(self) -> None: ... - def readable(self) -> bool: ... - def writable(self) -> bool: ... - def listen(self, num: int) -> None: ... - def bind(self, addr: tuple[Any, ...] | str) -> None: ... - def connect(self, address: tuple[Any, ...] | str) -> None: ... - def accept(self) -> tuple[_Socket, Any] | None: ... - def send(self, data: ReadableBuffer) -> int: ... - def recv(self, buffer_size: int) -> bytes: ... - def close(self) -> None: ... - def log(self, message: Any) -> None: ... - def log_info(self, message: Any, type: str = "info") -> None: ... - def handle_read_event(self) -> None: ... - def handle_connect_event(self) -> None: ... - def handle_write_event(self) -> None: ... - def handle_expt_event(self) -> None: ... - def handle_error(self) -> None: ... - def handle_expt(self) -> None: ... - def handle_read(self) -> None: ... - def handle_write(self) -> None: ... - def handle_connect(self) -> None: ... - def handle_accept(self) -> None: ... - def handle_close(self) -> None: ... - -class dispatcher_with_send(dispatcher): - def initiate_send(self) -> None: ... - # incompatible signature: - # def send(self, data: bytes) -> int | None: ... - -def compact_traceback() -> tuple[tuple[str, str, str], type, type, str]: ... -def close_all(map: _MapType | None = None, ignore_all: bool = False) -> None: ... - -if sys.platform != "win32": - class file_wrapper: - fd: int - def __init__(self, fd: int) -> None: ... - def recv(self, bufsize: int, flags: int = ...) -> bytes: ... - def send(self, data: bytes, flags: int = ...) -> int: ... - - @overload - def getsockopt(self, level: int, optname: int, buflen: None = None) -> int: ... - @overload - def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ... - - def read(self, bufsize: int, flags: int = ...) -> bytes: ... - def write(self, data: bytes, flags: int = ...) -> int: ... - def close(self) -> None: ... - def fileno(self) -> int: ... - def __del__(self) -> None: ... - - class file_dispatcher(dispatcher): - def __init__(self, fd: FileDescriptorLike, map: _MapType | None = None) -> None: ... - def set_file(self, fd: int) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/atexit.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/atexit.vpi deleted file mode 100644 index 9177d801..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/atexit.vpi +++ /dev/null @@ -1,11 +0,0 @@ -from collections.abc import Callable -from typing import ParamSpec, TypeVar - -_T = TypeVar("_T") -_P = ParamSpec("_P") - -def _clear() -> None: ... -def _ncallbacks() -> int: ... -def _run_exitfuncs() -> None: ... -def register(func: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Callable[_P, _T]: ... -def unregister(func: Callable[..., object], /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/audioop.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/audioop.vpi deleted file mode 100644 index a7d5e8ad..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/audioop.vpi +++ /dev/null @@ -1,44 +0,0 @@ -from typing import TypeAlias -from typing_extensions import Buffer - -_AdpcmState: TypeAlias = tuple[int, int] -_RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]] - -class error(Exception): ... - -def add(fragment1: Buffer, fragment2: Buffer, width: int, /) -> bytes: ... -def adpcm2lin(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]: ... -def alaw2lin(fragment: Buffer, width: int, /) -> bytes: ... -def avg(fragment: Buffer, width: int, /) -> int: ... -def avgpp(fragment: Buffer, width: int, /) -> int: ... -def bias(fragment: Buffer, width: int, bias: int, /) -> bytes: ... -def byteswap(fragment: Buffer, width: int, /) -> bytes: ... -def cross(fragment: Buffer, width: int, /) -> int: ... -def findfactor(fragment: Buffer, reference: Buffer, /) -> float: ... -def findfit(fragment: Buffer, reference: Buffer, /) -> tuple[int, float]: ... -def findmax(fragment: Buffer, length: int, /) -> int: ... -def getsample(fragment: Buffer, width: int, index: int, /) -> int: ... -def lin2adpcm(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]: ... -def lin2alaw(fragment: Buffer, width: int, /) -> bytes: ... -def lin2lin(fragment: Buffer, width: int, newwidth: int, /) -> bytes: ... -def lin2ulaw(fragment: Buffer, width: int, /) -> bytes: ... -def max(fragment: Buffer, width: int, /) -> int: ... -def maxpp(fragment: Buffer, width: int, /) -> int: ... -def minmax(fragment: Buffer, width: int, /) -> tuple[int, int]: ... -def mul(fragment: Buffer, width: int, factor: float, /) -> bytes: ... -def ratecv( - fragment: Buffer, - width: int, - nchannels: int, - inrate: int, - outrate: int, - state: _RatecvState | None, - weightA: int = 1, - weightB: int = 0, - /, -) -> tuple[bytes, _RatecvState]: ... -def reverse(fragment: Buffer, width: int, /) -> bytes: ... -def rms(fragment: Buffer, width: int, /) -> int: ... -def tomono(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes: ... -def tostereo(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes: ... -def ulaw2lin(fragment: Buffer, width: int, /) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/bdb.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/bdb.vpi deleted file mode 100644 index c2c45e26..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/bdb.vpi +++ /dev/null @@ -1,139 +0,0 @@ -import sys -from _typeshed import ExcInfo, ReadableBuffer, TraceFunction, Unused -from collections.abc import Callable, Iterable, Iterator, Mapping -from contextlib import contextmanager -from types import CodeType, FrameType, TracebackType -from typing import IO, Any, Final, Literal, ParamSpec, SupportsInt, TypeAlias, TypeVar - -__all__ = ["BdbQuit", "Bdb", "Breakpoint"] - -_T = TypeVar("_T") -_P = ParamSpec("_P") -_Backend: TypeAlias = Literal["settrace", "monitoring"] - -# A union of code-object flags at runtime. -# The exact values of code-object flags are implementation details, -# so we don't include the value of this constant in the stubs. -GENERATOR_AND_COROUTINE_FLAGS: Final[int] - -class BdbQuit(Exception): ... - -class Bdb: - skip: set[str] | None - breaks: dict[str, list[int]] - fncache: dict[str, str] - frame_returning: FrameType | None - botframe: FrameType | None - quitting: bool - stopframe: FrameType | None - returnframe: FrameType | None - stoplineno: int - if sys.version_info >= (3, 14): - backend: _Backend - def __init__(self, skip: Iterable[str] | None = None, backend: _Backend = "settrace") -> None: ... - else: - def __init__(self, skip: Iterable[str] | None = None) -> None: ... - - def canonic(self, filename: str) -> str: ... - def reset(self) -> None: ... - if sys.version_info >= (3, 12): - @contextmanager - def set_enterframe(self, frame: FrameType) -> Iterator[None]: ... - - def trace_dispatch(self, frame: FrameType, event: str, arg: Any) -> TraceFunction: ... - def dispatch_line(self, frame: FrameType) -> TraceFunction: ... - def dispatch_call(self, frame: FrameType, arg: None) -> TraceFunction: ... - def dispatch_return(self, frame: FrameType, arg: Any) -> TraceFunction: ... - def dispatch_exception(self, frame: FrameType, arg: ExcInfo) -> TraceFunction: ... - if sys.version_info >= (3, 13): - def dispatch_opcode(self, frame: FrameType, arg: Unused) -> Callable[[FrameType, str, Any], TraceFunction]: ... - - def is_skipped_module(self, module_name: str) -> bool: ... - def stop_here(self, frame: FrameType) -> bool: ... - def break_here(self, frame: FrameType) -> bool: ... - def do_clear(self, arg: Any) -> bool | None: ... - def break_anywhere(self, frame: FrameType) -> bool: ... - def user_call(self, frame: FrameType, argument_list: None) -> None: ... - def user_line(self, frame: FrameType) -> None: ... - def user_return(self, frame: FrameType, return_value: Any) -> None: ... - def user_exception(self, frame: FrameType, exc_info: ExcInfo) -> None: ... - def set_until(self, frame: FrameType, lineno: int | None = None) -> None: ... - if sys.version_info >= (3, 13): - def user_opcode(self, frame: FrameType) -> None: ... # undocumented - - def set_step(self) -> None: ... - if sys.version_info >= (3, 13): - def set_stepinstr(self) -> None: ... # undocumented - - def set_next(self, frame: FrameType) -> None: ... - def set_return(self, frame: FrameType) -> None: ... - def set_trace(self, frame: FrameType | None = None) -> None: ... - def set_continue(self) -> None: ... - def set_quit(self) -> None: ... - def set_break( - self, filename: str, lineno: int, temporary: bool = False, cond: str | None = None, funcname: str | None = None - ) -> str | None: ... - def clear_break(self, filename: str, lineno: int) -> str | None: ... - def clear_bpbynumber(self, arg: SupportsInt) -> str | None: ... - def clear_all_file_breaks(self, filename: str) -> str | None: ... - def clear_all_breaks(self) -> str | None: ... - def get_bpbynumber(self, arg: SupportsInt) -> Breakpoint: ... - def get_break(self, filename: str, lineno: int) -> bool: ... - def get_breaks(self, filename: str, lineno: int) -> list[Breakpoint]: ... - def get_file_breaks(self, filename: str) -> list[int]: ... - def get_all_breaks(self) -> dict[str, list[int]]: ... - def get_stack(self, f: FrameType | None, t: TracebackType | None) -> tuple[list[tuple[FrameType, int]], int]: ... - def format_stack_entry(self, frame_lineno: tuple[FrameType, int], lprefix: str = ": ") -> str: ... - def run( # matches `builtins.exec` - self, - cmd: str | ReadableBuffer | CodeType, - globals: dict[str, Any] | None = None, - locals: Mapping[str, object] | None = None, - ) -> None: ... - def runctx( # matches `builtins.exec` - self, cmd: str | ReadableBuffer | CodeType, globals: dict[str, Any] | None, locals: Mapping[str, object] | None - ) -> None: ... - def runeval( # matches `builtins.eval` - self, - expr: str | ReadableBuffer | CodeType, - globals: dict[str, Any] | None = None, - locals: Mapping[str, object] | None = None, - ) -> Any: ... - def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kwds: _P.kwargs) -> _T | None: ... - if sys.version_info >= (3, 14): - def start_trace(self) -> None: ... - def stop_trace(self) -> None: ... - def disable_current_event(self) -> None: ... - def restart_events(self) -> None: ... - -class Breakpoint: - next: int - bplist: dict[tuple[str, int], list[Breakpoint]] - bpbynumber: list[Breakpoint | None] - - funcname: str | None - func_first_executable_line: int | None - file: str - line: int - temporary: bool - cond: str | None - enabled: bool - ignore: int - hits: int - number: int - def __init__( - self, file: str, line: int, temporary: bool = False, cond: str | None = None, funcname: str | None = None - ) -> None: ... - if sys.version_info >= (3, 11): - @staticmethod - def clearBreakpoints() -> None: ... - - def deleteMe(self) -> None: ... - def enable(self) -> None: ... - def disable(self) -> None: ... - def bpprint(self, out: IO[str] | None = None) -> None: ... - def bpformat(self) -> str: ... - -def checkfuncname(b: Breakpoint, frame: FrameType) -> bool: ... -def effective(file: str, line: int, frame: FrameType) -> tuple[Breakpoint, bool] | tuple[None, None]: ... -def set_trace() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/binhex.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/binhex.vpi deleted file mode 100644 index f309f4e0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/binhex.vpi +++ /dev/null @@ -1,44 +0,0 @@ -from _typeshed import SizedBuffer -from typing import IO, Any, Final, TypeAlias - -__all__ = ["binhex", "hexbin", "Error"] - -class Error(Exception): ... - -REASONABLY_LARGE: Final = 32768 -LINELEN: Final = 64 -RUNCHAR: Final = b"\x90" - -class FInfo: - Type: str - Creator: str - Flags: int - -_FileInfoTuple: TypeAlias = tuple[str, FInfo, int, int] -_FileHandleUnion: TypeAlias = str | IO[bytes] - -def getfileinfo(name: str) -> _FileInfoTuple: ... - -class openrsrc: - def __init__(self, *args: Any) -> None: ... - def read(self, *args: Any) -> bytes: ... - def write(self, *args: Any) -> None: ... - def close(self) -> None: ... - -class BinHex: - def __init__(self, name_finfo_dlen_rlen: _FileInfoTuple, ofp: _FileHandleUnion) -> None: ... - def write(self, data: SizedBuffer) -> None: ... - def close_data(self) -> None: ... - def write_rsrc(self, data: SizedBuffer) -> None: ... - def close(self) -> None: ... - -def binhex(inp: str, out: str) -> None: ... - -class HexBin: - def __init__(self, ifp: _FileHandleUnion) -> None: ... - def read(self, *n: int) -> bytes: ... - def close_data(self) -> None: ... - def read_rsrc(self, *n: int) -> bytes: ... - def close(self) -> None: ... - -def hexbin(inp: str, out: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/bisect.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/bisect.vpi deleted file mode 100644 index 60dfc48d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/bisect.vpi +++ /dev/null @@ -1,4 +0,0 @@ -from _bisect import * - -bisect = bisect_right -insort = insort_right diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/bz2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/bz2.vpi deleted file mode 100644 index fec6b30a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/bz2.vpi +++ /dev/null @@ -1,121 +0,0 @@ -import sys -from _bz2 import BZ2Compressor as BZ2Compressor, BZ2Decompressor as BZ2Decompressor -from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer -from collections.abc import Iterable -from io import TextIOWrapper -from typing import IO, Literal, Protocol, SupportsIndex, TypeAlias, overload, type_check_only -from typing_extensions import Self - -if sys.version_info >= (3, 14): - from compression._common._streams import BaseStream, _Reader -else: - from _compression import BaseStream, _Reader - -__all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"] - -# The following attributes and methods are optional: -# def fileno(self) -> int: ... -# def close(self) -> object: ... -@type_check_only -class _ReadableFileobj(_Reader, Protocol): ... - -@type_check_only -class _WritableFileobj(Protocol): - def write(self, b: bytes, /) -> object: ... - # The following attributes and methods are optional: - # def fileno(self) -> int: ... - # def close(self) -> object: ... - -def compress(data: ReadableBuffer, compresslevel: int = 9) -> bytes: ... -def decompress(data: ReadableBuffer) -> bytes: ... - -_ReadBinaryMode: TypeAlias = Literal["", "r", "rb"] -_WriteBinaryMode: TypeAlias = Literal["w", "wb", "x", "xb", "a", "ab"] -_ReadTextMode: TypeAlias = Literal["rt"] -_WriteTextMode: TypeAlias = Literal["wt", "xt", "at"] - -@overload -def open( - filename: _ReadableFileobj, - mode: _ReadBinaryMode = "rb", - compresslevel: int = 9, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> BZ2File: ... -@overload -def open( - filename: _ReadableFileobj, - mode: _ReadTextMode, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: _WritableFileobj, - mode: _WriteBinaryMode, - compresslevel: int = 9, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> BZ2File: ... -@overload -def open( - filename: _WritableFileobj, - mode: _WriteTextMode, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: StrOrBytesPath, - mode: _ReadBinaryMode | _WriteBinaryMode = "rb", - compresslevel: int = 9, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> BZ2File: ... -@overload -def open( - filename: StrOrBytesPath, - mode: _ReadTextMode | _WriteTextMode, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: StrOrBytesPath | _ReadableFileobj | _WritableFileobj, - mode: str, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> BZ2File | TextIOWrapper: ... - -class BZ2File(BaseStream, IO[bytes]): - def __enter__(self) -> Self: ... - - @overload - def __init__(self, filename: _WritableFileobj, mode: _WriteBinaryMode, *, compresslevel: int = 9) -> None: ... - @overload - def __init__(self, filename: _ReadableFileobj, mode: _ReadBinaryMode = "r", *, compresslevel: int = 9) -> None: ... - @overload - def __init__( - self, filename: StrOrBytesPath, mode: _ReadBinaryMode | _WriteBinaryMode = "r", *, compresslevel: int = 9 - ) -> None: ... - - def read(self, size: int | None = -1) -> bytes: ... - def read1(self, size: int = -1) -> bytes: ... - def readline(self, size: SupportsIndex = -1) -> bytes: ... # type: ignore[override] - def readinto(self, b: WriteableBuffer) -> int: ... - def readlines(self, size: SupportsIndex = -1) -> list[bytes]: ... - def peek(self, n: int = 0) -> bytes: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def write(self, data: ReadableBuffer) -> int: ... - def writelines(self, seq: Iterable[ReadableBuffer]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/cProfile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/cProfile.vpi deleted file mode 100644 index 0e414206..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/cProfile.vpi +++ /dev/null @@ -1,33 +0,0 @@ -import _lsprof -import sys -from _typeshed import StrOrBytesPath, Unused -from collections.abc import Callable, Mapping -from types import CodeType -from typing import Any, ParamSpec, TypeAlias, TypeVar -from typing_extensions import Self - -__all__ = ["run", "runctx", "Profile"] - -def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ... -def runctx( - statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1 -) -> None: ... - -_T = TypeVar("_T") -_P = ParamSpec("_P") -_Label: TypeAlias = tuple[str, int, str] - -class Profile(_lsprof.Profiler): - stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented - def print_stats(self, sort: str | int = -1) -> None: ... - def dump_stats(self, file: StrOrBytesPath) -> None: ... - def create_stats(self) -> None: ... - def snapshot_stats(self) -> None: ... - def run(self, cmd: str) -> Self: ... - def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ... - def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ... - def __enter__(self) -> Self: ... - def __exit__(self, *exc_info: Unused) -> None: ... - -if sys.version_info < (3, 15): - def label(code: str | CodeType) -> _Label: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/calendar.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/calendar.vpi deleted file mode 100644 index fb75d955..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/calendar.vpi +++ /dev/null @@ -1,249 +0,0 @@ -import datetime -import enum -import sys -from _typeshed import Unused -from collections.abc import Iterable, Iterator -from time import struct_time -from typing import ClassVar, Final, TypeAlias, overload - -__all__ = [ - "FRIDAY", - "MONDAY", - "SATURDAY", - "SUNDAY", - "THURSDAY", - "TUESDAY", - "WEDNESDAY", - "IllegalMonthError", - "IllegalWeekdayError", - "setfirstweekday", - "firstweekday", - "isleap", - "leapdays", - "weekday", - "monthrange", - "monthcalendar", - "prmonth", - "month", - "prcal", - "calendar", - "timegm", - "month_name", - "month_abbr", - "day_name", - "day_abbr", - "Calendar", - "TextCalendar", - "HTMLCalendar", - "LocaleTextCalendar", - "LocaleHTMLCalendar", - "weekheader", -] - -if sys.version_info >= (3, 12): - __all__ += [ - "Day", - "Month", - "JANUARY", - "FEBRUARY", - "MARCH", - "APRIL", - "MAY", - "JUNE", - "JULY", - "AUGUST", - "SEPTEMBER", - "OCTOBER", - "NOVEMBER", - "DECEMBER", - ] -if sys.version_info >= (3, 15): - __all__ += ["standalone_month_name", "standalone_month_abbr"] - -_LocaleType: TypeAlias = tuple[str | None, str | None] - -class IllegalMonthError(ValueError, IndexError): - month: int - def __init__(self, month: int) -> None: ... - -class IllegalWeekdayError(ValueError): - weekday: int - def __init__(self, weekday: int) -> None: ... - -def isleap(year: int) -> bool: ... -def leapdays(y1: int, y2: int) -> int: ... -def weekday(year: int, month: int, day: int) -> int: ... -def monthrange(year: int, month: int) -> tuple[int, int]: ... - -class Calendar: - firstweekday: int - def __init__(self, firstweekday: int = 0) -> None: ... - def getfirstweekday(self) -> int: ... - def setfirstweekday(self, firstweekday: int) -> None: ... - def iterweekdays(self) -> Iterator[int]: ... - def itermonthdates(self, year: int, month: int) -> Iterator[datetime.date]: ... - def itermonthdays2(self, year: int, month: int) -> Iterator[tuple[int, int]]: ... - def itermonthdays(self, year: int, month: int) -> Iterator[int]: ... - def monthdatescalendar(self, year: int, month: int) -> list[list[datetime.date]]: ... - def monthdays2calendar(self, year: int, month: int) -> list[list[tuple[int, int]]]: ... - def monthdayscalendar(self, year: int, month: int) -> list[list[int]]: ... - def yeardatescalendar(self, year: int, width: int = 3) -> list[list[list[list[datetime.date]]]]: ... - def yeardays2calendar(self, year: int, width: int = 3) -> list[list[list[list[tuple[int, int]]]]]: ... - def yeardayscalendar(self, year: int, width: int = 3) -> list[list[list[list[int]]]]: ... - def itermonthdays3(self, year: int, month: int) -> Iterator[tuple[int, int, int]]: ... - def itermonthdays4(self, year: int, month: int) -> Iterator[tuple[int, int, int, int]]: ... - -class TextCalendar(Calendar): - def prweek(self, theweek: Iterable[tuple[int, int]], width: int) -> None: ... - def formatday(self, day: int, weekday: int, width: int) -> str: ... - def formatweek(self, theweek: Iterable[tuple[int, int]], width: int) -> str: ... - def formatweekday(self, day: int, width: int) -> str: ... - def formatweekheader(self, width: int) -> str: ... - def formatmonthname(self, theyear: int, themonth: int, width: int, withyear: bool = True) -> str: ... - def prmonth(self, theyear: int, themonth: int, w: int = 0, l: int = 0) -> None: ... - def formatmonth(self, theyear: int, themonth: int, w: int = 0, l: int = 0) -> str: ... - def formatyear(self, theyear: int, w: int = 2, l: int = 1, c: int = 6, m: int = 3) -> str: ... - def pryear(self, theyear: int, w: int = 0, l: int = 0, c: int = 6, m: int = 3) -> None: ... - -def firstweekday() -> int: ... -def monthcalendar(year: int, month: int) -> list[list[int]]: ... -def prweek(theweek: int, width: int) -> None: ... -def week(theweek: int, width: int) -> str: ... -def weekheader(width: int) -> str: ... -def prmonth(theyear: int, themonth: int, w: int = 0, l: int = 0) -> None: ... -def month(theyear: int, themonth: int, w: int = 0, l: int = 0) -> str: ... -def calendar(theyear: int, w: int = 2, l: int = 1, c: int = 6, m: int = 3) -> str: ... -def prcal(theyear: int, w: int = 0, l: int = 0, c: int = 6, m: int = 3) -> None: ... - -class HTMLCalendar(Calendar): - cssclasses: ClassVar[list[str]] - cssclass_noday: ClassVar[str] - cssclasses_weekday_head: ClassVar[list[str]] - cssclass_month_head: ClassVar[str] - cssclass_month: ClassVar[str] - cssclass_year: ClassVar[str] - cssclass_year_head: ClassVar[str] - def formatday(self, day: int, weekday: int) -> str: ... - def formatweek(self, theweek: int) -> str: ... - def formatweekday(self, day: int) -> str: ... - def formatweekheader(self) -> str: ... - def formatmonthname(self, theyear: int, themonth: int, withyear: bool = True) -> str: ... - def formatmonth(self, theyear: int, themonth: int, withyear: bool = True) -> str: ... - if sys.version_info >= (3, 15): - def formatmonthpage( - self, theyear: int, themonth: int, width: int = 3, css: str | None = "calendar.css", encoding: str | None = None - ) -> bytes: ... - - def formatyear(self, theyear: int, width: int = 3) -> str: ... - def formatyearpage( - self, theyear: int, width: int = 3, css: str | None = "calendar.css", encoding: str | None = None - ) -> bytes: ... - -class different_locale: - def __init__(self, locale: _LocaleType) -> None: ... - def __enter__(self) -> None: ... - def __exit__(self, *args: Unused) -> None: ... - -class LocaleTextCalendar(TextCalendar): - def __init__(self, firstweekday: int = 0, locale: _LocaleType | None = None) -> None: ... - -class LocaleHTMLCalendar(HTMLCalendar): - def __init__(self, firstweekday: int = 0, locale: _LocaleType | None = None) -> None: ... - def formatweekday(self, day: int) -> str: ... - def formatmonthname(self, theyear: int, themonth: int, withyear: bool = True) -> str: ... - -c: TextCalendar - -def setfirstweekday(firstweekday: int) -> None: ... -def format(cols: int, colwidth: int = 20, spacing: int = 6) -> str: ... -def formatstring(cols: Iterable[str], colwidth: int = 20, spacing: int = 6) -> str: ... -def timegm(tuple: tuple[int, ...] | struct_time) -> int: ... - -# Data attributes -class _localized_month: - format: str - def __init__(self, format: str) -> None: ... - - @overload - def __getitem__(self, i: int) -> str: ... - @overload - def __getitem__(self, i: slice) -> list[str]: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[str]: ... - -class _localized_day: - format: str - def __init__(self, format: str) -> None: ... - - @overload - def __getitem__(self, i: int) -> str: ... - @overload - def __getitem__(self, i: slice) -> list[str]: ... - - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[str]: ... - -day_name: _localized_day -day_abbr: _localized_day -month_name: _localized_month -month_abbr: _localized_month - -if sys.version_info >= (3, 12): - class Month(enum.IntEnum): - JANUARY = 1 - FEBRUARY = 2 - MARCH = 3 - APRIL = 4 - MAY = 5 - JUNE = 6 - JULY = 7 - AUGUST = 8 - SEPTEMBER = 9 - OCTOBER = 10 - NOVEMBER = 11 - DECEMBER = 12 - - JANUARY: Final = Month.JANUARY - FEBRUARY: Final = Month.FEBRUARY - MARCH: Final = Month.MARCH - APRIL: Final = Month.APRIL - MAY: Final = Month.MAY - JUNE: Final = Month.JUNE - JULY: Final = Month.JULY - AUGUST: Final = Month.AUGUST - SEPTEMBER: Final = Month.SEPTEMBER - OCTOBER: Final = Month.OCTOBER - NOVEMBER: Final = Month.NOVEMBER - DECEMBER: Final = Month.DECEMBER - - class Day(enum.IntEnum): - MONDAY = 0 - TUESDAY = 1 - WEDNESDAY = 2 - THURSDAY = 3 - FRIDAY = 4 - SATURDAY = 5 - SUNDAY = 6 - - MONDAY: Final = Day.MONDAY - TUESDAY: Final = Day.TUESDAY - WEDNESDAY: Final = Day.WEDNESDAY - THURSDAY: Final = Day.THURSDAY - FRIDAY: Final = Day.FRIDAY - SATURDAY: Final = Day.SATURDAY - SUNDAY: Final = Day.SUNDAY -else: - MONDAY: Final = 0 - TUESDAY: Final = 1 - WEDNESDAY: Final = 2 - THURSDAY: Final = 3 - FRIDAY: Final = 4 - SATURDAY: Final = 5 - SUNDAY: Final = 6 - -EPOCH: Final = 1970 - -if sys.version_info >= (3, 15): - standalone_month_name: _localized_month - standalone_month_abbr: _localized_month diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/cgi.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/cgi.vpi deleted file mode 100644 index b7f88ded..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/cgi.vpi +++ /dev/null @@ -1,120 +0,0 @@ -import os -from _typeshed import SupportsContainsAndGetItem, SupportsGetItem, SupportsItemAccess, Unused -from builtins import list as _list, type as _type -from collections.abc import Iterable, Iterator, Mapping -from email.message import Message -from types import TracebackType -from typing import IO, Any, Protocol, type_check_only -from typing_extensions import Self - -__all__ = [ - "MiniFieldStorage", - "FieldStorage", - "parse", - "parse_multipart", - "parse_header", - "test", - "print_exception", - "print_environ", - "print_form", - "print_directory", - "print_arguments", - "print_environ_usage", -] - -def parse( - fp: IO[Any] | None = None, - environ: SupportsItemAccess[str, str] = os.environ, - keep_blank_values: bool = ..., - strict_parsing: bool = ..., - separator: str = "&", -) -> dict[str, list[str]]: ... -def parse_multipart( - fp: IO[Any], pdict: SupportsGetItem[str, bytes], encoding: str = "utf-8", errors: str = "replace", separator: str = "&" -) -> dict[str, list[Any]]: ... - -@type_check_only -class _Environ(Protocol): - def __getitem__(self, k: str, /) -> str: ... - def keys(self) -> Iterable[str]: ... - -def parse_header(line: str) -> tuple[str, dict[str, str]]: ... -def test(environ: _Environ = os.environ) -> None: ... -def print_environ(environ: _Environ = os.environ) -> None: ... -def print_form(form: dict[str, Any]) -> None: ... -def print_directory() -> None: ... -def print_environ_usage() -> None: ... - -class MiniFieldStorage: - # The first five "Any" attributes here are always None, but mypy doesn't support that - filename: Any - list: Any - type: Any - file: IO[bytes] | None - type_options: dict[Any, Any] - disposition: Any - disposition_options: dict[Any, Any] - headers: dict[Any, Any] - name: Any - value: Any - def __init__(self, name: Any, value: Any) -> None: ... - -class FieldStorage: - FieldStorageClass: _type | None - keep_blank_values: int - strict_parsing: int - qs_on_post: str | None - headers: Mapping[str, str] | Message - fp: IO[bytes] - encoding: str - errors: str - outerboundary: bytes - bytes_read: int - limit: int | None - disposition: str - disposition_options: dict[str, str] - filename: str | None - file: IO[bytes] | None - type: str - type_options: dict[str, str] - innerboundary: bytes - length: int - done: int - list: _list[Any] | None - value: None | bytes | _list[Any] - def __init__( - self, - fp: IO[Any] | None = None, - headers: Mapping[str, str] | Message | None = None, - outerboundary: bytes = b"", - environ: SupportsContainsAndGetItem[str, str] = os.environ, - keep_blank_values: int = 0, - strict_parsing: int = 0, - limit: int | None = None, - encoding: str = "utf-8", - errors: str = "replace", - max_num_fields: int | None = None, - separator: str = "&", - ) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def __iter__(self) -> Iterator[str]: ... - def __getitem__(self, key: str) -> Any: ... - def getvalue(self, key: str, default: Any = None) -> Any: ... - def getfirst(self, key: str, default: Any = None) -> Any: ... - def getlist(self, key: str) -> _list[Any]: ... - def keys(self) -> _list[str]: ... - def __contains__(self, key: str) -> bool: ... - def __len__(self) -> int: ... - def __bool__(self) -> bool: ... - def __del__(self) -> None: ... - # Returns bytes or str IO depending on an internal flag - def make_file(self) -> IO[Any]: ... - -def print_exception( - type: type[BaseException] | None = None, - value: BaseException | None = None, - tb: TracebackType | None = None, - limit: int | None = None, -) -> None: ... -def print_arguments() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/cgitb.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/cgitb.vpi deleted file mode 100644 index 56572580..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/cgitb.vpi +++ /dev/null @@ -1,32 +0,0 @@ -from _typeshed import OptExcInfo, StrOrBytesPath -from collections.abc import Callable -from types import FrameType, TracebackType -from typing import IO, Any, Final - -__UNDEF__: Final[object] # undocumented sentinel - -def reset() -> str: ... # undocumented -def small(text: str) -> str: ... # undocumented -def strong(text: str) -> str: ... # undocumented -def grey(text: str) -> str: ... # undocumented -def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... # undocumented -def scanvars( - reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any] -) -> list[tuple[str, str | None, Any]]: ... # undocumented -def html(einfo: OptExcInfo, context: int = 5) -> str: ... -def text(einfo: OptExcInfo, context: int = 5) -> str: ... - -class Hook: # undocumented - def __init__( - self, - display: int = 1, - logdir: StrOrBytesPath | None = None, - context: int = 5, - file: IO[str] | None = None, - format: str = "html", - ) -> None: ... - def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ... - def handle(self, info: OptExcInfo | None = None) -> None: ... - -def handler(info: OptExcInfo | None = None) -> None: ... -def enable(display: int = 1, logdir: StrOrBytesPath | None = None, context: int = 5, format: str = "html") -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/chunk.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/chunk.vpi deleted file mode 100644 index 9788d35f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/chunk.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import IO - -class Chunk: - closed: bool - align: bool - file: IO[bytes] - chunkname: bytes - chunksize: int - size_read: int - offset: int - seekable: bool - def __init__(self, file: IO[bytes], align: bool = True, bigendian: bool = True, inclheader: bool = False) -> None: ... - def getname(self) -> bytes: ... - def getsize(self) -> int: ... - def close(self) -> None: ... - def isatty(self) -> bool: ... - def seek(self, pos: int, whence: int = 0) -> None: ... - def tell(self) -> int: ... - def read(self, size: int = -1) -> bytes: ... - def skip(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/cmath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/cmath.vpi deleted file mode 100644 index 554eb54e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/cmath.vpi +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Final, SupportsComplex, SupportsFloat, SupportsIndex, TypeAlias - -e: Final[float] -pi: Final[float] -inf: Final[float] -infj: Final[complex] -nan: Final[float] -nanj: Final[complex] -tau: Final[float] - -_F: TypeAlias = SupportsFloat | SupportsIndex -_C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex - -def acos(z: _C, /) -> complex: ... -def acosh(z: _C, /) -> complex: ... -def asin(z: _C, /) -> complex: ... -def asinh(z: _C, /) -> complex: ... -def atan(z: _C, /) -> complex: ... -def atanh(z: _C, /) -> complex: ... -def cos(z: _C, /) -> complex: ... -def cosh(z: _C, /) -> complex: ... -def exp(z: _C, /) -> complex: ... -def isclose(a: _C, b: _C, *, rel_tol: SupportsFloat = 1e-09, abs_tol: SupportsFloat = 0.0) -> bool: ... -def isinf(z: _C, /) -> bool: ... -def isnan(z: _C, /) -> bool: ... -def log(z: _C, base: _C = ..., /) -> complex: ... -def log10(z: _C, /) -> complex: ... -def phase(z: _C, /) -> float: ... -def polar(z: _C, /) -> tuple[float, float]: ... -def rect(r: _F, phi: _F, /) -> complex: ... -def sin(z: _C, /) -> complex: ... -def sinh(z: _C, /) -> complex: ... -def sqrt(z: _C, /) -> complex: ... -def tan(z: _C, /) -> complex: ... -def tanh(z: _C, /) -> complex: ... -def isfinite(z: _C, /) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/cmd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/cmd.vpi deleted file mode 100644 index 6e841335..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/cmd.vpi +++ /dev/null @@ -1,46 +0,0 @@ -from collections.abc import Callable -from typing import IO, Any, Final -from typing_extensions import LiteralString - -__all__ = ["Cmd"] - -PROMPT: Final = "(Cmd) " -IDENTCHARS: Final[LiteralString] # Too big to be `Literal` - -class Cmd: - prompt: str - identchars: str - ruler: str - lastcmd: str - intro: Any | None - doc_leader: str - doc_header: str - misc_header: str - undoc_header: str - nohelp: str - use_rawinput: bool - stdin: IO[str] - stdout: IO[str] - cmdqueue: list[str] - completekey: str - def __init__(self, completekey: str = "tab", stdin: IO[str] | None = None, stdout: IO[str] | None = None) -> None: ... - old_completer: Callable[[str, int], str | None] | None - def cmdloop(self, intro: Any | None = None) -> None: ... - def precmd(self, line: str) -> str: ... - def postcmd(self, stop: bool, line: str) -> bool: ... - def preloop(self) -> None: ... - def postloop(self) -> None: ... - def parseline(self, line: str) -> tuple[str | None, str | None, str]: ... - def onecmd(self, line: str) -> bool: ... - def emptyline(self) -> bool: ... - def default(self, line: str) -> None: ... - def completedefault(self, *ignored: Any) -> list[str]: ... - def completenames(self, text: str, *ignored: Any) -> list[str]: ... - completion_matches: list[str] | None - def complete(self, text: str, state: int) -> list[str] | None: ... - def get_names(self) -> list[str]: ... - # Only the first element of args matters. - def complete_help(self, *args: Any) -> list[str]: ... - def do_help(self, arg: str) -> bool | None: ... - def print_topics(self, header: str, cmds: list[str] | None, cmdlen: Any, maxcol: int) -> None: ... - def columnize(self, list: list[str] | None, displaywidth: int = 80) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/code.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/code.vpi deleted file mode 100644 index 478d5aaa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/code.vpi +++ /dev/null @@ -1,55 +0,0 @@ -import sys -from codeop import CommandCompiler, compile_command as compile_command -from collections.abc import Callable -from types import CodeType -from typing import Any - -__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] - -class InteractiveInterpreter: - locals: dict[str, Any] # undocumented - compile: CommandCompiler # undocumented - def __init__(self, locals: dict[str, Any] | None = None) -> None: ... - def runsource(self, source: str, filename: str = "", symbol: str = "single") -> bool: ... - def runcode(self, code: CodeType) -> None: ... - if sys.version_info >= (3, 13): - def showsyntaxerror(self, filename: str | None = None, *, source: str = "") -> None: ... - else: - def showsyntaxerror(self, filename: str | None = None) -> None: ... - - def showtraceback(self) -> None: ... - def write(self, data: str) -> None: ... - -class InteractiveConsole(InteractiveInterpreter): - buffer: list[str] # undocumented - filename: str # undocumented - if sys.version_info >= (3, 13): - local_exit: bool # undocumented - def __init__( - self, locals: dict[str, Any] | None = None, filename: str = "", *, local_exit: bool = False - ) -> None: ... - def push(self, line: str, filename: str | None = None) -> bool: ... - else: - def __init__(self, locals: dict[str, Any] | None = None, filename: str = "") -> None: ... - def push(self, line: str) -> bool: ... - - def interact(self, banner: str | None = None, exitmsg: str | None = None) -> None: ... - def resetbuffer(self) -> None: ... - def raw_input(self, prompt: str = "") -> str: ... - -if sys.version_info >= (3, 13): - def interact( - banner: str | None = None, - readfunc: Callable[[str], str] | None = None, - local: dict[str, Any] | None = None, - exitmsg: str | None = None, - local_exit: bool = False, - ) -> None: ... - -else: - def interact( - banner: str | None = None, - readfunc: Callable[[str], str] | None = None, - local: dict[str, Any] | None = None, - exitmsg: str | None = None, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/codeop.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/codeop.vpi deleted file mode 100644 index 8e311343..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/codeop.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import sys -from types import CodeType - -__all__ = ["compile_command", "Compile", "CommandCompiler"] - -if sys.version_info >= (3, 14): - def compile_command(source: str, filename: str = "", symbol: str = "single", flags: int = 0) -> CodeType | None: ... - -else: - def compile_command(source: str, filename: str = "", symbol: str = "single") -> CodeType | None: ... - -class Compile: - flags: int - if sys.version_info >= (3, 13): - def __call__(self, source: str, filename: str, symbol: str, flags: int = 0) -> CodeType: ... - else: - def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ... - -class CommandCompiler: - compiler: Compile - def __call__(self, source: str, filename: str = "", symbol: str = "single") -> CodeType | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/colorsys.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/colorsys.vpi deleted file mode 100644 index d4edab12..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/colorsys.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Final - -__all__ = ["rgb_to_yiq", "yiq_to_rgb", "rgb_to_hls", "hls_to_rgb", "rgb_to_hsv", "hsv_to_rgb"] - -def rgb_to_yiq(r: float, g: float, b: float) -> tuple[float, float, float]: ... -def yiq_to_rgb(y: float, i: float, q: float) -> tuple[float, float, float]: ... -def rgb_to_hls(r: float, g: float, b: float) -> tuple[float, float, float]: ... -def hls_to_rgb(h: float, l: float, s: float) -> tuple[float, float, float]: ... -def rgb_to_hsv(r: float, g: float, b: float) -> tuple[float, float, float]: ... -def hsv_to_rgb(h: float, s: float, v: float) -> tuple[float, float, float]: ... - -# undocumented -ONE_SIXTH: Final[float] -ONE_THIRD: Final[float] -TWO_THIRD: Final[float] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compileall.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compileall.vpi deleted file mode 100644 index 49a4c69d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compileall.vpi +++ /dev/null @@ -1,51 +0,0 @@ -from _typeshed import StrPath -from py_compile import PycInvalidationMode -from typing import Any, Protocol, type_check_only - -__all__ = ["compile_dir", "compile_file", "compile_path"] - -@type_check_only -class _SupportsSearch(Protocol): - def search(self, string: str, /) -> Any: ... - -def compile_dir( - dir: StrPath, - maxlevels: int | None = None, - ddir: StrPath | None = None, - force: bool = False, - rx: _SupportsSearch | None = None, - quiet: int = 0, - legacy: bool = False, - optimize: int = -1, - workers: int = 1, - invalidation_mode: PycInvalidationMode | None = None, - *, - stripdir: StrPath | None = None, - prependdir: StrPath | None = None, - limit_sl_dest: StrPath | None = None, - hardlink_dupes: bool = False, -) -> bool: ... -def compile_file( - fullname: StrPath, - ddir: StrPath | None = None, - force: bool = False, - rx: _SupportsSearch | None = None, - quiet: int = 0, - legacy: bool = False, - optimize: int = -1, - invalidation_mode: PycInvalidationMode | None = None, - *, - stripdir: StrPath | None = None, - prependdir: StrPath | None = None, - limit_sl_dest: StrPath | None = None, - hardlink_dupes: bool = False, -) -> bool: ... -def compile_path( - skip_curdir: bool = ..., - maxlevels: int = 0, - force: bool = False, - quiet: int = 0, - legacy: bool = False, - optimize: int = -1, - invalidation_mode: PycInvalidationMode | None = None, -) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/_common/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/_common/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/_common/_streams.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/_common/_streams.vpi deleted file mode 100644 index 96aec24d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/_common/_streams.vpi +++ /dev/null @@ -1,37 +0,0 @@ -from _typeshed import ReadableBuffer, WriteableBuffer -from collections.abc import Callable -from io import DEFAULT_BUFFER_SIZE, BufferedIOBase, RawIOBase -from typing import Any, Protocol, type_check_only - -BUFFER_SIZE = DEFAULT_BUFFER_SIZE - -@type_check_only -class _Reader(Protocol): - def read(self, n: int, /) -> bytes: ... - def seekable(self) -> bool: ... - def seek(self, n: int, /) -> Any: ... - -@type_check_only -class _Decompressor(Protocol): - def decompress(self, data: ReadableBuffer, /, max_length: int = ...) -> bytes: ... - @property - def unused_data(self) -> bytes: ... - @property - def eof(self) -> bool: ... - # `zlib._Decompress` does not have next property, but `DecompressReader` calls it: - # @property - # def needs_input(self) -> bool: ... - -class BaseStream(BufferedIOBase): ... - -class DecompressReader(RawIOBase): - def __init__( - self, - fp: _Reader, - decomp_factory: Callable[..., _Decompressor], # Consider backporting changes to _compression - trailing_error: type[Exception] | tuple[type[Exception], ...] = (), - **decomp_args: Any, # These are passed to decomp_factory. - ) -> None: ... - def readinto(self, b: WriteableBuffer) -> int: ... - def read(self, size: int = -1) -> bytes: ... - def seek(self, offset: int, whence: int = 0) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/bz2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/bz2.vpi deleted file mode 100644 index 9ddc39f2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/bz2.vpi +++ /dev/null @@ -1 +0,0 @@ -from bz2 import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/gzip.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/gzip.vpi deleted file mode 100644 index 9422a735..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/gzip.vpi +++ /dev/null @@ -1 +0,0 @@ -from gzip import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/lzma.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/lzma.vpi deleted file mode 100644 index 936c3813..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/lzma.vpi +++ /dev/null @@ -1 +0,0 @@ -from lzma import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zlib.vpi deleted file mode 100644 index 78d176c0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zlib.vpi +++ /dev/null @@ -1 +0,0 @@ -from zlib import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/__init__.vpi deleted file mode 100644 index 8673c59a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/__init__.vpi +++ /dev/null @@ -1,94 +0,0 @@ -import enum -from _typeshed import ReadableBuffer -from collections.abc import Iterable, Mapping -from compression.zstd._zstdfile import ZstdFile, open -from typing import Final, final - -import _zstd -from _zstd import ZstdCompressor, ZstdDecompressor, ZstdDict, ZstdError, get_frame_size, zstd_version - -__all__ = ( - # compression.zstd - "COMPRESSION_LEVEL_DEFAULT", - "compress", - "CompressionParameter", - "decompress", - "DecompressionParameter", - "finalize_dict", - "get_frame_info", - "Strategy", - "train_dict", - # compression.zstd._zstdfile - "open", - "ZstdFile", - # _zstd - "get_frame_size", - "zstd_version", - "zstd_version_info", - "ZstdCompressor", - "ZstdDecompressor", - "ZstdDict", - "ZstdError", -) - -zstd_version_info: Final[tuple[int, int, int]] -COMPRESSION_LEVEL_DEFAULT: Final = _zstd.ZSTD_CLEVEL_DEFAULT - -class FrameInfo: - __slots__ = ("decompressed_size", "dictionary_id") - decompressed_size: int - dictionary_id: int - def __init__(self, decompressed_size: int, dictionary_id: int) -> None: ... - -def get_frame_info(frame_buffer: ReadableBuffer) -> FrameInfo: ... -def train_dict(samples: Iterable[ReadableBuffer], dict_size: int) -> ZstdDict: ... -def finalize_dict(zstd_dict: ZstdDict, /, samples: Iterable[ReadableBuffer], dict_size: int, level: int) -> ZstdDict: ... -def compress( - data: ReadableBuffer, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, -) -> bytes: ... -def decompress( - data: ReadableBuffer, zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, options: Mapping[int, int] | None = None -) -> bytes: ... - -@final -class CompressionParameter(enum.IntEnum): - compression_level = _zstd.ZSTD_c_compressionLevel - window_log = _zstd.ZSTD_c_windowLog - hash_log = _zstd.ZSTD_c_hashLog - chain_log = _zstd.ZSTD_c_chainLog - search_log = _zstd.ZSTD_c_searchLog - min_match = _zstd.ZSTD_c_minMatch - target_length = _zstd.ZSTD_c_targetLength - strategy = _zstd.ZSTD_c_strategy - enable_long_distance_matching = _zstd.ZSTD_c_enableLongDistanceMatching - ldm_hash_log = _zstd.ZSTD_c_ldmHashLog - ldm_min_match = _zstd.ZSTD_c_ldmMinMatch - ldm_bucket_size_log = _zstd.ZSTD_c_ldmBucketSizeLog - ldm_hash_rate_log = _zstd.ZSTD_c_ldmHashRateLog - content_size_flag = _zstd.ZSTD_c_contentSizeFlag - checksum_flag = _zstd.ZSTD_c_checksumFlag - dict_id_flag = _zstd.ZSTD_c_dictIDFlag - nb_workers = _zstd.ZSTD_c_nbWorkers - job_size = _zstd.ZSTD_c_jobSize - overlap_log = _zstd.ZSTD_c_overlapLog - def bounds(self) -> tuple[int, int]: ... - -@final -class DecompressionParameter(enum.IntEnum): - window_log_max = _zstd.ZSTD_d_windowLogMax - def bounds(self) -> tuple[int, int]: ... - -@final -class Strategy(enum.IntEnum): - fast = _zstd.ZSTD_fast - dfast = _zstd.ZSTD_dfast - greedy = _zstd.ZSTD_greedy - lazy = _zstd.ZSTD_lazy - lazy2 = _zstd.ZSTD_lazy2 - btlazy2 = _zstd.ZSTD_btlazy2 - btopt = _zstd.ZSTD_btopt - btultra = _zstd.ZSTD_btultra - btultra2 = _zstd.ZSTD_btultra2 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/_zstdfile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/_zstdfile.vpi deleted file mode 100644 index b16b43c1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/compression/zstd/_zstdfile.vpi +++ /dev/null @@ -1,117 +0,0 @@ -from _typeshed import ReadableBuffer, StrOrBytesPath, SupportsWrite, WriteableBuffer -from collections.abc import Mapping -from compression._common import _streams -from compression.zstd import ZstdDict -from io import TextIOWrapper, _WrappedBuffer -from typing import Literal, Protocol, TypeAlias, overload, type_check_only - -from _zstd import ZstdCompressor, _ZstdCompressorFlushBlock, _ZstdCompressorFlushFrame - -__all__ = ("ZstdFile", "open") - -_ReadBinaryMode: TypeAlias = Literal["r", "rb"] -_WriteBinaryMode: TypeAlias = Literal["w", "wb", "x", "xb", "a", "ab"] -_ReadTextMode: TypeAlias = Literal["rt"] -_WriteTextMode: TypeAlias = Literal["wt", "xt", "at"] - -@type_check_only -class _FileBinaryRead(_streams._Reader, Protocol): - def close(self) -> None: ... - -@type_check_only -class _FileBinaryWrite(SupportsWrite[bytes], Protocol): - def close(self) -> None: ... - -class ZstdFile(_streams.BaseStream): - FLUSH_BLOCK = ZstdCompressor.FLUSH_BLOCK - FLUSH_FRAME = ZstdCompressor.FLUSH_FRAME - - @overload - def __init__( - self, - file: StrOrBytesPath | _FileBinaryRead, - /, - mode: _ReadBinaryMode = "r", - *, - level: None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> None: ... - @overload - def __init__( - self, - file: StrOrBytesPath | _FileBinaryWrite, - /, - mode: _WriteBinaryMode, - *, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> None: ... - - def write(self, data: ReadableBuffer, /) -> int: ... - def flush(self, mode: _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 1) -> bytes: ... # type: ignore[override] - def read(self, size: int | None = -1) -> bytes: ... - def read1(self, size: int | None = -1) -> bytes: ... - def readinto(self, b: WriteableBuffer) -> int: ... - def readinto1(self, b: WriteableBuffer) -> int: ... - def readline(self, size: int | None = -1) -> bytes: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def peek(self, size: int = -1) -> bytes: ... - @property - def name(self) -> str | bytes: ... - @property - def mode(self) -> Literal["rb", "wb"]: ... - -@overload -def open( - file: StrOrBytesPath | _FileBinaryRead, - /, - mode: _ReadBinaryMode = "rb", - *, - level: None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> ZstdFile: ... -@overload -def open( - file: StrOrBytesPath | _FileBinaryWrite, - /, - mode: _WriteBinaryMode, - *, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> ZstdFile: ... -@overload -def open( - file: StrOrBytesPath | _WrappedBuffer, - /, - mode: _ReadTextMode, - *, - level: None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - file: StrOrBytesPath | _WrappedBuffer, - /, - mode: _WriteTextMode, - *, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/__init__.vpi deleted file mode 100644 index ad4d20ea..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/__init__.vpi +++ /dev/null @@ -1,71 +0,0 @@ -import sys - -from ._base import ( - ALL_COMPLETED as ALL_COMPLETED, - FIRST_COMPLETED as FIRST_COMPLETED, - FIRST_EXCEPTION as FIRST_EXCEPTION, - BrokenExecutor as BrokenExecutor, - CancelledError as CancelledError, - Executor as Executor, - Future as Future, - InvalidStateError as InvalidStateError, - TimeoutError as TimeoutError, - as_completed as as_completed, - wait as wait, -) -from .process import ProcessPoolExecutor as ProcessPoolExecutor -from .thread import ThreadPoolExecutor as ThreadPoolExecutor - -if sys.version_info >= (3, 14): - from .interpreter import InterpreterPoolExecutor as InterpreterPoolExecutor - - __all__ = [ - "FIRST_COMPLETED", - "FIRST_EXCEPTION", - "ALL_COMPLETED", - "CancelledError", - "TimeoutError", - "InvalidStateError", - "BrokenExecutor", - "Future", - "Executor", - "wait", - "as_completed", - "ProcessPoolExecutor", - "ThreadPoolExecutor", - "InterpreterPoolExecutor", - ] - -elif sys.version_info >= (3, 13): - __all__ = ( - "FIRST_COMPLETED", - "FIRST_EXCEPTION", - "ALL_COMPLETED", - "CancelledError", - "TimeoutError", - "InvalidStateError", - "BrokenExecutor", - "Future", - "Executor", - "wait", - "as_completed", - "ProcessPoolExecutor", - "ThreadPoolExecutor", - ) -else: - __all__ = ( - "FIRST_COMPLETED", - "FIRST_EXCEPTION", - "ALL_COMPLETED", - "CancelledError", - "TimeoutError", - "BrokenExecutor", - "Future", - "Executor", - "wait", - "as_completed", - "ProcessPoolExecutor", - "ThreadPoolExecutor", - ) - -def __dir__() -> tuple[str, ...]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/_base.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/_base.vpi deleted file mode 100644 index 05680b5d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/_base.vpi +++ /dev/null @@ -1,119 +0,0 @@ -import sys -import threading -from _typeshed import Unused -from collections.abc import Callable, Iterable, Iterator -from logging import Logger -from types import GenericAlias, TracebackType -from typing import Any, Final, Generic, NamedTuple, ParamSpec, Protocol, TypeVar, type_check_only -from typing_extensions import Self - -FIRST_COMPLETED: Final = "FIRST_COMPLETED" -FIRST_EXCEPTION: Final = "FIRST_EXCEPTION" -ALL_COMPLETED: Final = "ALL_COMPLETED" -PENDING: Final = "PENDING" -RUNNING: Final = "RUNNING" -CANCELLED: Final = "CANCELLED" -CANCELLED_AND_NOTIFIED: Final = "CANCELLED_AND_NOTIFIED" -FINISHED: Final = "FINISHED" -_STATE_TO_DESCRIPTION_MAP: Final[dict[str, str]] -LOGGER: Logger - -class Error(Exception): ... -class CancelledError(Error): ... - -if sys.version_info >= (3, 11): - from builtins import TimeoutError as TimeoutError -else: - class TimeoutError(Error): ... - -class InvalidStateError(Error): ... -class BrokenExecutor(RuntimeError): ... - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) -_P = ParamSpec("_P") - -class Future(Generic[_T]): - _condition: threading.Condition - _state: str - _result: _T | None - _exception: BaseException | None - _waiters: list[_Waiter] - def cancel(self) -> bool: ... - def cancelled(self) -> bool: ... - def running(self) -> bool: ... - def done(self) -> bool: ... - def add_done_callback(self, fn: Callable[[Future[_T]], object]) -> None: ... - def result(self, timeout: float | None = None) -> _T: ... - def set_running_or_notify_cancel(self) -> bool: ... - def set_result(self, result: _T) -> None: ... - def exception(self, timeout: float | None = None) -> BaseException | None: ... - def set_exception(self, exception: BaseException | None) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class Executor: - def submit(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]: ... - if sys.version_info >= (3, 14): - def map( - self, - fn: Callable[..., _T], - *iterables: Iterable[Any], - timeout: float | None = None, - chunksize: int = 1, - buffersize: int | None = None, - ) -> Iterator[_T]: ... - else: - def map( - self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = None, chunksize: int = 1 - ) -> Iterator[_T]: ... - - def shutdown(self, wait: bool = True, *, cancel_futures: bool = False) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> bool | None: ... - -@type_check_only -class _AsCompletedFuture(Protocol[_T_co]): - # as_completed only mutates non-generic aspects of passed Futures and does not do any nominal - # checks. Therefore, we can use a Protocol here to allow as_completed to act covariantly. - # See the tests for concurrent.futures - _condition: threading.Condition - _state: str - _waiters: list[_Waiter] - # Not used by as_completed, but needed to propagate the generic type - def result(self, timeout: float | None = None) -> _T_co: ... - -def as_completed(fs: Iterable[_AsCompletedFuture[_T]], timeout: float | None = None) -> Iterator[Future[_T]]: ... - -class DoneAndNotDoneFutures(NamedTuple, Generic[_T]): - done: set[Future[_T]] - not_done: set[Future[_T]] - -def wait( - fs: Iterable[Future[_T]], timeout: float | None = None, return_when: str = "ALL_COMPLETED" -) -> DoneAndNotDoneFutures[_T]: ... - -class _Waiter: - event: threading.Event - finished_futures: list[Future[Any]] - def add_result(self, future: Future[Any]) -> None: ... - def add_exception(self, future: Future[Any]) -> None: ... - def add_cancelled(self, future: Future[Any]) -> None: ... - -class _AsCompletedWaiter(_Waiter): - lock: threading.Lock - -class _FirstCompletedWaiter(_Waiter): ... - -class _AllCompletedWaiter(_Waiter): - num_pending_calls: int - stop_on_exception: bool - lock: threading.Lock - def __init__(self, num_pending_calls: int, stop_on_exception: bool) -> None: ... - -class _AcquireFutures: - futures: Iterable[Future[Any]] - def __init__(self, futures: Iterable[Future[Any]]) -> None: ... - def __enter__(self) -> None: ... - def __exit__(self, *args: Unused) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/interpreter.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/interpreter.vpi deleted file mode 100644 index f6925806..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/interpreter.vpi +++ /dev/null @@ -1,82 +0,0 @@ -import sys -from collections.abc import Callable -from concurrent.futures import ThreadPoolExecutor -from typing import Any, Literal, ParamSpec, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self, TypeVar, TypeVarTuple, Unpack - -_Task: TypeAlias = tuple[bytes, Literal["function", "script"]] -_Ts = TypeVarTuple("_Ts") -_P = ParamSpec("_P") -_R = TypeVar("_R") - -@type_check_only -class _TaskFunc(Protocol): - @overload - def __call__(self, fn: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs) -> tuple[bytes, Literal["function"]]: ... - @overload - def __call__(self, fn: str) -> tuple[bytes, Literal["script"]]: ... - -if sys.version_info >= (3, 14): - from concurrent.futures.thread import BrokenThreadPool, WorkerContext as ThreadWorkerContext - from concurrent.interpreters import Interpreter, Queue - - def do_call(results: Queue, func: Callable[..., _R], args: tuple[Any, ...], kwargs: dict[str, Any]) -> _R: ... - - class WorkerContext(ThreadWorkerContext): - interp: Interpreter | None - results: Queue | None - - @overload # type: ignore[override] - @classmethod - def prepare( - cls, initializer: Callable[[Unpack[_Ts]], object], initargs: tuple[Unpack[_Ts]] - ) -> tuple[Callable[[], Self], _TaskFunc]: ... - @overload - @classmethod - def prepare(cls, initializer: Callable[[], object], initargs: tuple[()]) -> tuple[Callable[[], Self], _TaskFunc]: ... - - def __init__(self, initdata: _Task) -> None: ... - def __del__(self) -> None: ... - def run(self, task: _Task) -> None: ... # type: ignore[override] - - class BrokenInterpreterPool(BrokenThreadPool): ... - - class InterpreterPoolExecutor(ThreadPoolExecutor): - BROKEN: type[BrokenInterpreterPool] - - @overload # type: ignore[override] - @classmethod - def prepare_context( - cls, initializer: Callable[[], object], initargs: tuple[()] - ) -> tuple[Callable[[], WorkerContext], _TaskFunc]: ... - @overload - @classmethod - def prepare_context( - cls, initializer: Callable[[Unpack[_Ts]], object], initargs: tuple[Unpack[_Ts]] - ) -> tuple[Callable[[], WorkerContext], _TaskFunc]: ... - - @overload - def __init__( - self, - max_workers: int | None = None, - thread_name_prefix: str = "", - initializer: Callable[[], object] | None = None, - initargs: tuple[()] = (), - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None = None, - thread_name_prefix: str = "", - *, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None, - thread_name_prefix: str, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/process.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/process.vpi deleted file mode 100644 index 282bafa0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/process.vpi +++ /dev/null @@ -1,242 +0,0 @@ -import sys -from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping, MutableSequence -from multiprocessing.connection import Connection -from multiprocessing.context import BaseContext, Process -from multiprocessing.queues import Queue, SimpleQueue -from threading import Lock, Semaphore, Thread -from types import TracebackType -from typing import Any, Final, Generic, TypeVar, overload -from typing_extensions import TypeVarTuple, Unpack -from weakref import ref - -from ._base import BrokenExecutor, Executor, Future - -_T = TypeVar("_T") -_Ts = TypeVarTuple("_Ts") - -_threads_wakeups: MutableMapping[Any, Any] -_global_shutdown: bool - -class _ThreadWakeup: - _closed: bool - # Any: Unused send and recv methods - _reader: Connection[Any, Any] - _writer: Connection[Any, Any] - def close(self) -> None: ... - def wakeup(self) -> None: ... - def clear(self) -> None: ... - -def _python_exit() -> None: ... - -EXTRA_QUEUED_CALLS: Final = 1 - -_MAX_WINDOWS_WORKERS: Final = 61 - -class _RemoteTraceback(Exception): - tb: str - def __init__(self, tb: TracebackType) -> None: ... - -class _ExceptionWithTraceback: - exc: BaseException - tb: TracebackType - def __init__(self, exc: BaseException, tb: TracebackType) -> None: ... - def __reduce__(self) -> str | tuple[Any, ...]: ... - -def _rebuild_exc(exc: Exception, tb: str) -> Exception: ... - -class _WorkItem(Generic[_T]): - future: Future[_T] - fn: Callable[..., _T] - args: Iterable[Any] - kwargs: Mapping[str, Any] - def __init__(self, future: Future[_T], fn: Callable[..., _T], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ... - -class _ResultItem: - work_id: int - exception: Exception - result: Any - if sys.version_info >= (3, 11): - exit_pid: int | None - def __init__( - self, work_id: int, exception: Exception | None = None, result: Any | None = None, exit_pid: int | None = None - ) -> None: ... - else: - def __init__(self, work_id: int, exception: Exception | None = None, result: Any | None = None) -> None: ... - -class _CallItem: - work_id: int - fn: Callable[..., Any] - args: Iterable[Any] - kwargs: Mapping[str, Any] - def __init__(self, work_id: int, fn: Callable[..., Any], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ... - -class _SafeQueue(Queue[Future[Any]]): - pending_work_items: dict[int, _WorkItem[Any]] - if sys.version_info < (3, 12): - shutdown_lock: Lock - thread_wakeup: _ThreadWakeup - if sys.version_info >= (3, 12): - def __init__( - self, - max_size: int | None = 0, - *, - ctx: BaseContext, - pending_work_items: dict[int, _WorkItem[Any]], - thread_wakeup: _ThreadWakeup, - ) -> None: ... - else: - def __init__( - self, - max_size: int | None = 0, - *, - ctx: BaseContext, - pending_work_items: dict[int, _WorkItem[Any]], - shutdown_lock: Lock, - thread_wakeup: _ThreadWakeup, - ) -> None: ... - - def _on_queue_feeder_error(self, e: Exception, obj: _CallItem) -> None: ... - -def _get_chunks(*iterables: Any, chunksize: int) -> Generator[tuple[Any, ...]]: ... -def _process_chunk(fn: Callable[..., _T], chunk: Iterable[tuple[Any, ...]]) -> list[_T]: ... - -if sys.version_info >= (3, 11): - def _sendback_result( - result_queue: SimpleQueue[_WorkItem[Any]], - work_id: int, - result: Any | None = None, - exception: Exception | None = None, - exit_pid: int | None = None, - ) -> None: ... - -else: - def _sendback_result( - result_queue: SimpleQueue[_WorkItem[Any]], work_id: int, result: Any | None = None, exception: Exception | None = None - ) -> None: ... - -if sys.version_info >= (3, 11): - def _process_worker( - call_queue: Queue[_CallItem], - result_queue: SimpleQueue[_ResultItem], - initializer: Callable[[Unpack[_Ts]], object] | None, - initargs: tuple[Unpack[_Ts]], - max_tasks: int | None = None, - ) -> None: ... - -else: - def _process_worker( - call_queue: Queue[_CallItem], - result_queue: SimpleQueue[_ResultItem], - initializer: Callable[[Unpack[_Ts]], object] | None, - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - -class _ExecutorManagerThread(Thread): - thread_wakeup: _ThreadWakeup - shutdown_lock: Lock - executor_reference: ref[Any] - processes: MutableMapping[int, Process] - call_queue: Queue[_CallItem] - result_queue: SimpleQueue[_ResultItem] - work_ids_queue: Queue[int] - pending_work_items: dict[int, _WorkItem[Any]] - def __init__(self, executor: ProcessPoolExecutor) -> None: ... - def run(self) -> None: ... - def add_call_item_to_queue(self) -> None: ... - def wait_result_broken_or_wakeup(self) -> tuple[Any, bool, str]: ... - def process_result_item(self, result_item: int | _ResultItem) -> None: ... - def is_shutting_down(self) -> bool: ... - def terminate_broken(self, cause: str) -> None: ... - def flag_executor_shutting_down(self) -> None: ... - def shutdown_workers(self) -> None: ... - def join_executor_internals(self) -> None: ... - def get_n_children_alive(self) -> int: ... - -_system_limits_checked: bool -_system_limited: bool | None - -def _check_system_limits() -> None: ... -def _chain_from_iterable_of_lists(iterable: Iterable[MutableSequence[Any]]) -> Any: ... - -class BrokenProcessPool(BrokenExecutor): ... - -class ProcessPoolExecutor(Executor): - _mp_context: BaseContext | None - _initializer: Callable[..., None] | None - _initargs: tuple[Any, ...] - _executor_manager_thread: _ThreadWakeup - _processes: MutableMapping[int, Process] - _shutdown_thread: bool - _shutdown_lock: Lock - _idle_worker_semaphore: Semaphore - _broken: bool - _queue_count: int - _pending_work_items: dict[int, _WorkItem[Any]] - _cancel_pending_futures: bool - _executor_manager_thread_wakeup: _ThreadWakeup - _result_queue: SimpleQueue[Any] - _work_ids: Queue[Any] - if sys.version_info >= (3, 11): - @overload - def __init__( - self, - max_workers: int | None = None, - mp_context: BaseContext | None = None, - initializer: Callable[[], object] | None = None, - initargs: tuple[()] = (), - *, - max_tasks_per_child: int | None = None, - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None = None, - mp_context: BaseContext | None = None, - *, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - max_tasks_per_child: int | None = None, - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None, - mp_context: BaseContext | None, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - *, - max_tasks_per_child: int | None = None, - ) -> None: ... - else: - @overload - def __init__( - self, - max_workers: int | None = None, - mp_context: BaseContext | None = None, - initializer: Callable[[], object] | None = None, - initargs: tuple[()] = (), - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None = None, - mp_context: BaseContext | None = None, - *, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None, - mp_context: BaseContext | None, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - - def _start_executor_manager_thread(self) -> None: ... - def _adjust_process_count(self) -> None: ... - - if sys.version_info >= (3, 14): - def kill_workers(self) -> None: ... - def terminate_workers(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/thread.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/thread.vpi deleted file mode 100644 index 685bf1cf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/futures/thread.vpi +++ /dev/null @@ -1,143 +0,0 @@ -import queue -import sys -from collections.abc import Callable, Iterable, Mapping, Set as AbstractSet -from threading import Lock, Semaphore, Thread -from types import GenericAlias -from typing import Any, Generic, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, TypeVarTuple, Unpack -from weakref import ref - -from ._base import BrokenExecutor, Executor, Future - -_Ts = TypeVarTuple("_Ts") - -_threads_queues: Mapping[Any, Any] -_shutdown: bool -_global_shutdown_lock: Lock - -def _python_exit() -> None: ... - -_S = TypeVar("_S") - -_Task: TypeAlias = tuple[Callable[..., Any], tuple[Any, ...], dict[str, Any]] - -_C = TypeVar("_C", bound=Callable[..., object]) -_KT = TypeVar("_KT", bound=str) -_VT = TypeVar("_VT") - -@type_check_only -class _ResolveTaskFunc(Protocol): - def __call__( - self, func: _C, args: tuple[Unpack[_Ts]], kwargs: dict[_KT, _VT] - ) -> tuple[_C, tuple[Unpack[_Ts]], dict[_KT, _VT]]: ... - -if sys.version_info >= (3, 14): - class WorkerContext: - @overload - @classmethod - def prepare( - cls, initializer: Callable[[Unpack[_Ts]], object], initargs: tuple[Unpack[_Ts]] - ) -> tuple[Callable[[], Self], _ResolveTaskFunc]: ... - @overload - @classmethod - def prepare( - cls, initializer: Callable[[], object], initargs: tuple[()] - ) -> tuple[Callable[[], Self], _ResolveTaskFunc]: ... - - @overload - def __init__(self, initializer: Callable[[Unpack[_Ts]], object], initargs: tuple[Unpack[_Ts]]) -> None: ... - @overload - def __init__(self, initializer: Callable[[], object], initargs: tuple[()]) -> None: ... - - def initialize(self) -> None: ... - def finalize(self) -> None: ... - def run(self, task: _Task) -> None: ... - -if sys.version_info >= (3, 14): - class _WorkItem(Generic[_S]): - future: Future[Any] - task: _Task - def __init__(self, future: Future[Any], task: _Task) -> None: ... - def run(self, ctx: WorkerContext) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - - def _worker(executor_reference: ref[Any], ctx: WorkerContext, work_queue: queue.SimpleQueue[Any]) -> None: ... - -else: - class _WorkItem(Generic[_S]): - future: Future[_S] - fn: Callable[..., _S] - args: Iterable[Any] - kwargs: Mapping[str, Any] - def __init__(self, future: Future[_S], fn: Callable[..., _S], args: Iterable[Any], kwargs: Mapping[str, Any]) -> None: ... - def run(self) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - - def _worker( - executor_reference: ref[Any], - work_queue: queue.SimpleQueue[Any], - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - -class BrokenThreadPool(BrokenExecutor): ... - -class ThreadPoolExecutor(Executor): - if sys.version_info >= (3, 14): - BROKEN: type[BrokenThreadPool] - - _max_workers: int - _idle_semaphore: Semaphore - _threads: AbstractSet[Thread] - _broken: bool - _shutdown: bool - _shutdown_lock: Lock - _thread_name_prefix: str | None - if sys.version_info >= (3, 14): - _create_worker_context: Callable[[], WorkerContext] - _resolve_work_item_task: _ResolveTaskFunc - else: - _initializer: Callable[..., None] | None - _initargs: tuple[Any, ...] - _work_queue: queue.SimpleQueue[_WorkItem[Any]] - - if sys.version_info >= (3, 14): - @overload - @classmethod - def prepare_context( - cls, initializer: Callable[[], object], initargs: tuple[()] - ) -> tuple[Callable[[], WorkerContext], _ResolveTaskFunc]: ... - @overload - @classmethod - def prepare_context( - cls, initializer: Callable[[Unpack[_Ts]], object], initargs: tuple[Unpack[_Ts]] - ) -> tuple[Callable[[], WorkerContext], _ResolveTaskFunc]: ... - - @overload - def __init__( - self, - max_workers: int | None = None, - thread_name_prefix: str = "", - initializer: Callable[[], object] | None = None, - initargs: tuple[()] = (), - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None = None, - thread_name_prefix: str = "", - *, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - @overload - def __init__( - self, - max_workers: int | None, - thread_name_prefix: str, - initializer: Callable[[Unpack[_Ts]], object], - initargs: tuple[Unpack[_Ts]], - ) -> None: ... - - def _adjust_thread_count(self) -> None: ... - def _initializer_failed(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/__init__.vpi deleted file mode 100644 index d19db096..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/__init__.vpi +++ /dev/null @@ -1,68 +0,0 @@ -import sys -import threading -import types -from collections.abc import Callable -from typing import Any, Literal, ParamSpec, TypeVar -from typing_extensions import Self - -if sys.version_info >= (3, 14): # needed to satisfy pyright checks for Python <= 3.13 - from _interpreters import ( - InterpreterError as InterpreterError, - InterpreterNotFoundError as InterpreterNotFoundError, - NotShareableError as NotShareableError, - _SharedDict, - _Whence, - is_shareable as is_shareable, - ) - - from ._queues import Queue as Queue, QueueEmpty as QueueEmpty, QueueFull as QueueFull, create as create_queue - - __all__ = [ - "ExecutionFailed", - "Interpreter", - "InterpreterError", - "InterpreterNotFoundError", - "NotShareableError", - "Queue", - "QueueEmpty", - "QueueFull", - "create", - "create_queue", - "get_current", - "get_main", - "is_shareable", - "list_all", - ] - - _R = TypeVar("_R") - _P = ParamSpec("_P") - - class ExecutionFailed(InterpreterError): - excinfo: types.SimpleNamespace - - def __init__(self, excinfo: types.SimpleNamespace) -> None: ... - - def create() -> Interpreter: ... - def list_all() -> list[Interpreter]: ... - def get_current() -> Interpreter: ... - def get_main() -> Interpreter: ... - - class Interpreter: - def __new__(cls, id: int, /, _whence: _Whence | None = None, _ownsref: bool | None = None) -> Self: ... - def __reduce__(self) -> tuple[type[Self], int]: ... - def __hash__(self) -> int: ... - def __del__(self) -> None: ... - @property - def id(self) -> int: ... - @property - def whence( - self, - ) -> Literal["unknown", "runtime init", "legacy C-API", "C-API", "cross-interpreter C-API", "_interpreters module"]: ... - def is_running(self) -> bool: ... - def close(self) -> None: ... - def prepare_main( - self, ns: _SharedDict | None = None, /, **kwargs: Any - ) -> None: ... # kwargs has same value restrictions as _SharedDict - def exec(self, code: str | types.CodeType | Callable[[], object], /) -> None: ... - def call(self, callable: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ... - def call_in_thread(self, callable: Callable[_P, object], /, *args: _P.args, **kwargs: _P.kwargs) -> threading.Thread: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_crossinterp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_crossinterp.vpi deleted file mode 100644 index c8e29aaa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_crossinterp.vpi +++ /dev/null @@ -1,30 +0,0 @@ -import sys -from collections.abc import Callable -from typing import Final, NewType, TypeAlias -from typing_extensions import Never, Self - -if sys.version_info >= (3, 14): # needed to satisfy pyright checks for Python <= 3.13 - from _interpqueues import _UnboundOp - - class ItemInterpreterDestroyed(Exception): ... - # Actually a descriptor that behaves similarly to classmethod but prevents - # access from instances. - classonly = classmethod - - class UnboundItem: - __slots__ = () - def __new__(cls) -> Never: ... - @classonly - def singleton(cls, kind: str, module: str, name: str = "UNBOUND") -> Self: ... - - # Sentinel types and alias that don't exist at runtime. - _UnboundErrorType = NewType("_UnboundErrorType", object) - _UnboundRemoveType = NewType("_UnboundRemoveType", object) - _AnyUnbound: TypeAlias = _UnboundErrorType | _UnboundRemoveType | UnboundItem - - UNBOUND_ERROR: Final[_UnboundErrorType] - UNBOUND_REMOVE: Final[_UnboundRemoveType] - UNBOUND: Final[UnboundItem] # analogous to UNBOUND_REPLACE in C - - def serialize_unbound(unbound: _AnyUnbound) -> tuple[_UnboundOp]: ... - def resolve_unbound(flag: _UnboundOp, exctype_destroyed: Callable[[str], BaseException]) -> UnboundItem: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_queues.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_queues.vpi deleted file mode 100644 index b4a4fd56..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/concurrent/interpreters/_queues.vpi +++ /dev/null @@ -1,74 +0,0 @@ -import queue -import sys -from typing import Final, SupportsIndex -from typing_extensions import Self - -if sys.version_info >= (3, 14): # needed to satisfy pyright checks for Python <= 3.13 - from _interpqueues import QueueError as QueueError, QueueNotFoundError as QueueNotFoundError - - from . import _crossinterp - from ._crossinterp import UNBOUND_ERROR as UNBOUND_ERROR, UNBOUND_REMOVE as UNBOUND_REMOVE, UnboundItem, _AnyUnbound - - __all__ = [ - "UNBOUND", - "UNBOUND_ERROR", - "UNBOUND_REMOVE", - "ItemInterpreterDestroyed", - "Queue", - "QueueEmpty", - "QueueError", - "QueueFull", - "QueueNotFoundError", - "create", - "list_all", - ] - - class QueueEmpty(QueueError, queue.Empty): ... - class QueueFull(QueueError, queue.Full): ... - class ItemInterpreterDestroyed(QueueError, _crossinterp.ItemInterpreterDestroyed): ... - UNBOUND: Final[UnboundItem] - - def create(maxsize: int = 0, *, unbounditems: _AnyUnbound = ...) -> Queue: ... - def list_all() -> list[Queue]: ... - - class Queue: - def __new__(cls, id: int, /) -> Self: ... - def __del__(self) -> None: ... - def __hash__(self) -> int: ... - def __reduce__(self) -> tuple[type[Self], int]: ... - @property - def id(self) -> int: ... - @property - def unbounditems(self) -> _AnyUnbound: ... - @property - def maxsize(self) -> int: ... - def empty(self) -> bool: ... - def full(self) -> bool: ... - def qsize(self) -> int: ... - if sys.version_info >= (3, 14): - def put( - self, - obj: object, - block: bool = True, - timeout: SupportsIndex | None = None, - *, - unbounditems: _AnyUnbound | None = None, - _delay: float = 0.01, - ) -> None: ... - else: - def put( - self, - obj: object, - timeout: SupportsIndex | None = None, - *, - unbounditems: _AnyUnbound | None = None, - _delay: float = 0.01, - ) -> None: ... - - def put_nowait(self, obj: object, *, unbounditems: _AnyUnbound | None = None) -> None: ... - if sys.version_info >= (3, 14): - def get(self, block: bool = True, timeout: SupportsIndex | None = None, *, _delay: float = 0.01) -> object: ... - else: - def get(self, timeout: SupportsIndex | None = None, *, _delay: float = 0.01) -> object: ... - - def get_nowait(self) -> object: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/configparser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/configparser.vpi deleted file mode 100644 index 385336ec..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/configparser.vpi +++ /dev/null @@ -1,507 +0,0 @@ -import sys -from _typeshed import BytesPath, GenericPath, MaybeNone, StrOrBytesPath, StrPath, SupportsWrite -from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence -from re import Pattern -from typing import Any, AnyStr, ClassVar, Final, Literal, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import deprecated - -if sys.version_info >= (3, 14): - __all__ = ( - "NoSectionError", - "DuplicateOptionError", - "DuplicateSectionError", - "NoOptionError", - "InterpolationError", - "InterpolationDepthError", - "InterpolationMissingOptionError", - "InterpolationSyntaxError", - "ParsingError", - "MissingSectionHeaderError", - "MultilineContinuationError", - "UnnamedSectionDisabledError", - "InvalidWriteError", - "ConfigParser", - "RawConfigParser", - "Interpolation", - "BasicInterpolation", - "ExtendedInterpolation", - "SectionProxy", - "ConverterMapping", - "DEFAULTSECT", - "MAX_INTERPOLATION_DEPTH", - "UNNAMED_SECTION", - ) -elif sys.version_info >= (3, 13): - __all__ = ( - "NoSectionError", - "DuplicateOptionError", - "DuplicateSectionError", - "NoOptionError", - "InterpolationError", - "InterpolationDepthError", - "InterpolationMissingOptionError", - "InterpolationSyntaxError", - "ParsingError", - "MissingSectionHeaderError", - "ConfigParser", - "RawConfigParser", - "Interpolation", - "BasicInterpolation", - "ExtendedInterpolation", - "SectionProxy", - "ConverterMapping", - "DEFAULTSECT", - "MAX_INTERPOLATION_DEPTH", - "UNNAMED_SECTION", - "MultilineContinuationError", - ) -elif sys.version_info >= (3, 12): - __all__ = ( - "NoSectionError", - "DuplicateOptionError", - "DuplicateSectionError", - "NoOptionError", - "InterpolationError", - "InterpolationDepthError", - "InterpolationMissingOptionError", - "InterpolationSyntaxError", - "ParsingError", - "MissingSectionHeaderError", - "ConfigParser", - "RawConfigParser", - "Interpolation", - "BasicInterpolation", - "ExtendedInterpolation", - "LegacyInterpolation", - "SectionProxy", - "ConverterMapping", - "DEFAULTSECT", - "MAX_INTERPOLATION_DEPTH", - ) -else: - __all__ = [ - "NoSectionError", - "DuplicateOptionError", - "DuplicateSectionError", - "NoOptionError", - "InterpolationError", - "InterpolationDepthError", - "InterpolationMissingOptionError", - "InterpolationSyntaxError", - "ParsingError", - "MissingSectionHeaderError", - "ConfigParser", - "SafeConfigParser", - "RawConfigParser", - "Interpolation", - "BasicInterpolation", - "ExtendedInterpolation", - "LegacyInterpolation", - "SectionProxy", - "ConverterMapping", - "DEFAULTSECT", - "MAX_INTERPOLATION_DEPTH", - ] - -if sys.version_info >= (3, 13): - @type_check_only - class _UNNAMED_SECTION: ... - - UNNAMED_SECTION: _UNNAMED_SECTION - - _SectionName: TypeAlias = str | _UNNAMED_SECTION - # A list of sections can only include an unnamed section if the parser was initialized with - # allow_unnamed_section=True. Any prevents users from having to use explicit - # type checks if allow_unnamed_section is False (the default). - _SectionNameList: TypeAlias = list[Any] -else: - _SectionName: TypeAlias = str - _SectionNameList: TypeAlias = list[str] - -_Section: TypeAlias = Mapping[str, str] -_Parser: TypeAlias = MutableMapping[str, _Section] -_ConverterCallback: TypeAlias = Callable[[str], Any] -_ConvertersMap: TypeAlias = dict[str, _ConverterCallback] -_T = TypeVar("_T") - -DEFAULTSECT: Final = "DEFAULT" -MAX_INTERPOLATION_DEPTH: Final = 10 - -class Interpolation: - def before_get(self, parser: _Parser, section: _SectionName, option: str, value: str, defaults: _Section) -> str: ... - def before_set(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ... - def before_read(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ... - def before_write(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ... - -class BasicInterpolation(Interpolation): ... -class ExtendedInterpolation(Interpolation): ... - -if sys.version_info < (3, 13): - @deprecated( - "Deprecated since Python 3.2; removed in Python 3.13. Use `BasicInterpolation` or `ExtendedInterpolation` instead." - ) - class LegacyInterpolation(Interpolation): - def before_get(self, parser: _Parser, section: _SectionName, option: str, value: str, vars: _Section) -> str: ... - -class RawConfigParser(_Parser): - _SECT_TMPL: ClassVar[str] # undocumented - _OPT_TMPL: ClassVar[str] # undocumented - _OPT_NV_TMPL: ClassVar[str] # undocumented - - SECTCRE: Pattern[str] - OPTCRE: ClassVar[Pattern[str]] - OPTCRE_NV: ClassVar[Pattern[str]] # undocumented - NONSPACECRE: ClassVar[Pattern[str]] # undocumented - - BOOLEAN_STATES: ClassVar[Mapping[str, bool]] # undocumented - default_section: str - if sys.version_info >= (3, 13): - @overload - def __init__( - self, - defaults: Mapping[str, str | None] | None = None, - dict_type: type[Mapping[str, str]] = ..., - *, - allow_no_value: Literal[True], - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - allow_unnamed_section: bool = False, - ) -> None: ... - @overload - def __init__( - self, - defaults: Mapping[str, str | None] | None, - dict_type: type[Mapping[str, str]], - allow_no_value: Literal[True], - *, - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - allow_unnamed_section: bool = False, - ) -> None: ... - @overload - def __init__( - self, - defaults: _Section | None = None, - dict_type: type[Mapping[str, str]] = ..., - allow_no_value: bool = False, - *, - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - allow_unnamed_section: bool = False, - ) -> None: ... - else: - @overload - def __init__( - self, - defaults: Mapping[str, str | None] | None = None, - dict_type: type[Mapping[str, str]] = ..., - *, - allow_no_value: Literal[True], - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - ) -> None: ... - @overload - def __init__( - self, - defaults: Mapping[str, str | None] | None, - dict_type: type[Mapping[str, str]], - allow_no_value: Literal[True], - *, - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - ) -> None: ... - @overload - def __init__( - self, - defaults: _Section | None = None, - dict_type: type[Mapping[str, str]] = ..., - allow_no_value: bool = False, - *, - delimiters: Sequence[str] = ("=", ":"), - comment_prefixes: Sequence[str] = ("#", ";"), - inline_comment_prefixes: Sequence[str] | None = None, - strict: bool = True, - empty_lines_in_values: bool = True, - default_section: str = "DEFAULT", - interpolation: Interpolation | None = ..., - converters: _ConvertersMap = ..., - ) -> None: ... - - def __len__(self) -> int: ... - def __getitem__(self, key: _SectionName) -> SectionProxy: ... - def __setitem__(self, key: _SectionName, value: _Section) -> None: ... - def __delitem__(self, key: _SectionName) -> None: ... - def __iter__(self) -> Iterator[str]: ... - def __contains__(self, key: object) -> bool: ... - def defaults(self) -> _Section: ... - def sections(self) -> _SectionNameList: ... - def add_section(self, section: _SectionName) -> None: ... - def has_section(self, section: _SectionName) -> bool: ... - def options(self, section: _SectionName) -> list[str]: ... - def has_option(self, section: _SectionName, option: str) -> bool: ... - - @overload - def read(self, filenames: GenericPath[AnyStr], encoding: str | None = None) -> list[AnyStr]: ... - @overload - def read(self, filenames: Iterable[StrPath], encoding: str | None = None) -> list[str]: ... - @overload - def read(self, filenames: Iterable[BytesPath], encoding: str | None = None) -> list[bytes]: ... - @overload - def read(self, filenames: Iterable[StrOrBytesPath], encoding: str | None = None) -> list[str | bytes]: ... - - def read_file(self, f: Iterable[str], source: str | None = None) -> None: ... - def read_string(self, string: str, source: str = "") -> None: ... - def read_dict(self, dictionary: Mapping[str, Mapping[str, Any]], source: str = "") -> None: ... - if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.2; removed in Python 3.12. Use `parser.read_file()` instead.") - def readfp(self, fp: Iterable[str], filename: str | None = None) -> None: ... - - # These get* methods are partially applied (with the same names) in - # SectionProxy; the stubs should be kept updated together - @overload - def getint(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> int: ... - @overload - def getint( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T - ) -> int | _T: ... - - @overload - def getfloat(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> float: ... - @overload - def getfloat( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T - ) -> float | _T: ... - - @overload - def getboolean(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool: ... - @overload - def getboolean( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T - ) -> bool | _T: ... - - def _get_conv( - self, - section: _SectionName, - option: str, - conv: Callable[[str], _T], - *, - raw: bool = False, - vars: _Section | None = None, - fallback: _T = ..., - ) -> _T: ... - - # This is incompatible with MutableMapping so we ignore the type - @overload # type: ignore[override] - def get(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> str | MaybeNone: ... - @overload - def get( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T - ) -> str | _T | MaybeNone: ... - - @overload - def items(self, *, raw: bool = False, vars: _Section | None = None) -> ItemsView[str, SectionProxy]: ... - @overload - def items(self, section: _SectionName, raw: bool = False, vars: _Section | None = None) -> list[tuple[str, str]]: ... - - def set(self, section: _SectionName, option: str, value: str | None = None) -> None: ... - def write(self, fp: SupportsWrite[str], space_around_delimiters: bool = True) -> None: ... - def remove_option(self, section: _SectionName, option: str) -> bool: ... - def remove_section(self, section: _SectionName) -> bool: ... - def optionxform(self, optionstr: str) -> str: ... - @property - def converters(self) -> ConverterMapping: ... - -class ConfigParser(RawConfigParser): - # This is incompatible with MutableMapping so we ignore the type - @overload # type: ignore[override] - def get(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> str: ... - @overload - def get( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T - ) -> str | _T: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.2; removed in Python 3.12. Use `ConfigParser` instead.") - class SafeConfigParser(ConfigParser): ... - -class SectionProxy(MutableMapping[str, str]): - def __init__(self, parser: RawConfigParser, name: str) -> None: ... - def __getitem__(self, key: str) -> str: ... - def __setitem__(self, key: str, value: str) -> None: ... - def __delitem__(self, key: str) -> None: ... - def __contains__(self, key: object) -> bool: ... - def __len__(self) -> int: ... - def __iter__(self) -> Iterator[str]: ... - @property - def parser(self) -> RawConfigParser: ... - @property - def name(self) -> str: ... - - # This is incompatible with MutableMapping so we ignore the type - @overload # type: ignore[override] - def get( - self, - option: str, - fallback: None = None, - *, - raw: bool = False, - vars: _Section | None = None, - _impl: Any | None = None, - **kwargs: Any, # passed to the underlying parser's get() method - ) -> str | None: ... - @overload - def get( - self, - option: str, - fallback: _T, - *, - raw: bool = False, - vars: _Section | None = None, - _impl: Any | None = None, - **kwargs: Any, # passed to the underlying parser's get() method - ) -> str | _T: ... - - # These are partially-applied version of the methods with the same names in - # RawConfigParser; the stubs should be kept updated together - @overload - def getint(self, option: str, *, raw: bool = False, vars: _Section | None = None) -> int | None: ... - @overload - def getint(self, option: str, fallback: _T = ..., *, raw: bool = False, vars: _Section | None = None) -> int | _T: ... - - @overload - def getfloat(self, option: str, *, raw: bool = False, vars: _Section | None = None) -> float | None: ... - @overload - def getfloat(self, option: str, fallback: _T = ..., *, raw: bool = False, vars: _Section | None = None) -> float | _T: ... - - @overload - def getboolean(self, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool | None: ... - @overload - def getboolean(self, option: str, fallback: _T = ..., *, raw: bool = False, vars: _Section | None = None) -> bool | _T: ... - - # SectionProxy can have arbitrary attributes when custom converters are used - def __getattr__(self, key: str) -> Callable[..., Any]: ... - -class ConverterMapping(MutableMapping[str, _ConverterCallback | None]): - GETTERCRE: ClassVar[Pattern[Any]] - def __init__(self, parser: RawConfigParser) -> None: ... - def __getitem__(self, key: str) -> _ConverterCallback: ... - def __setitem__(self, key: str, value: _ConverterCallback | None) -> None: ... - def __delitem__(self, key: str) -> None: ... - def __iter__(self) -> Iterator[str]: ... - def __len__(self) -> int: ... - -class Error(Exception): - message: str - def __init__(self, msg: str = "") -> None: ... - -class NoSectionError(Error): - section: _SectionName - def __init__(self, section: _SectionName) -> None: ... - -class DuplicateSectionError(Error): - section: _SectionName - source: str | None - lineno: int | None - def __init__(self, section: _SectionName, source: str | None = None, lineno: int | None = None) -> None: ... - -class DuplicateOptionError(Error): - section: _SectionName - option: str - source: str | None - lineno: int | None - def __init__(self, section: _SectionName, option: str, source: str | None = None, lineno: int | None = None) -> None: ... - -class NoOptionError(Error): - section: _SectionName - option: str - def __init__(self, option: str, section: _SectionName) -> None: ... - -class InterpolationError(Error): - section: _SectionName - option: str - def __init__(self, option: str, section: _SectionName, msg: str) -> None: ... - -class InterpolationDepthError(InterpolationError): - def __init__(self, option: str, section: _SectionName, rawval: object) -> None: ... - -class InterpolationMissingOptionError(InterpolationError): - reference: str - def __init__(self, option: str, section: _SectionName, rawval: object, reference: str) -> None: ... - -class InterpolationSyntaxError(InterpolationError): ... - -class ParsingError(Error): - source: str - errors: list[tuple[int, str]] - if sys.version_info >= (3, 13): - def __init__(self, source: str, *args: object) -> None: ... - def combine(self, others: Iterable[ParsingError]) -> ParsingError: ... - elif sys.version_info >= (3, 12): - def __init__(self, source: str) -> None: ... - else: - @overload - def __init__(self, source: str) -> None: ... - @overload - @deprecated("The `filename` parameter removed in Python 3.12. Use `source` instead.") - def __init__(self, source: None, filename: str | None) -> None: ... - @overload - @deprecated("The `filename` parameter removed in Python 3.12. Use `source` instead.") - def __init__(self, source: None = None, *, filename: str | None) -> None: ... - - def append(self, lineno: int, line: str) -> None: ... - - if sys.version_info < (3, 12): - @property - @deprecated("Deprecated since Python 3.2; removed in Python 3.12. Use `source` instead.") - def filename(self) -> str: ... - @filename.setter - @deprecated("Deprecated since Python 3.2; removed in Python 3.12. Use `source` instead.") - def filename(self, value: str) -> None: ... - -class MissingSectionHeaderError(ParsingError): - lineno: int - line: str - def __init__(self, filename: str, lineno: int, line: str) -> None: ... - -if sys.version_info >= (3, 13): - class MultilineContinuationError(ParsingError): - lineno: int - line: str - def __init__(self, filename: str, lineno: int, line: str) -> None: ... - -if sys.version_info >= (3, 14): - class UnnamedSectionDisabledError(Error): - msg: Final = "Support for UNNAMED_SECTION is disabled." - def __init__(self) -> None: ... - - class InvalidWriteError(Error): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/contextvars.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/contextvars.vpi deleted file mode 100644 index 22dc3300..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/contextvars.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from _contextvars import Context as Context, ContextVar as ContextVar, Token as Token, copy_context as copy_context - -__all__ = ("Context", "ContextVar", "Token", "copy_context") diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/copyreg.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/copyreg.vpi deleted file mode 100644 index 3bfc0de8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/copyreg.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from collections.abc import Callable, Hashable -from typing import Any, SupportsInt, TypeAlias, TypeVar - -_T = TypeVar("_T") -_Reduce: TypeAlias = tuple[Callable[..., _T], tuple[Any, ...]] | tuple[Callable[..., _T], tuple[Any, ...], Any | None] - -__all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"] - -def pickle( - ob_type: type[_T], - pickle_function: Callable[[_T], str | _Reduce[_T]], - constructor_ob: Callable[[_Reduce[_T]], _T] | None = None, -) -> None: ... -def constructor(object: Callable[[_Reduce[_T]], _T]) -> None: ... -def add_extension(module: Hashable, name: Hashable, code: SupportsInt) -> None: ... -def remove_extension(module: Hashable, name: Hashable, code: int) -> None: ... -def clear_extension_cache() -> None: ... - -_DispatchTableType: TypeAlias = dict[type, Callable[[Any], str | _Reduce[Any]]] # imported by multiprocessing.reduction -dispatch_table: _DispatchTableType # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/crypt.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/crypt.vpi deleted file mode 100644 index f9263219..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/crypt.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import sys -from typing import Final, NamedTuple, type_check_only -from typing_extensions import disjoint_base - -if sys.platform != "win32": - @type_check_only - class _MethodBase(NamedTuple): - name: str - ident: str | None - salt_chars: int - total_size: int - - if sys.version_info >= (3, 12): - class _Method(_MethodBase): ... - else: - @disjoint_base - class _Method(_MethodBase): ... - - METHOD_CRYPT: Final[_Method] - METHOD_MD5: Final[_Method] - METHOD_SHA256: Final[_Method] - METHOD_SHA512: Final[_Method] - METHOD_BLOWFISH: Final[_Method] - methods: list[_Method] - def mksalt(method: _Method | None = None, *, rounds: int | None = None) -> str: ... - def crypt(word: str, salt: str | _Method | None = None) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/csv.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/csv.vpi deleted file mode 100644 index f8ab5f00..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/csv.vpi +++ /dev/null @@ -1,153 +0,0 @@ -import sys -from _csv import ( - QUOTE_ALL as QUOTE_ALL, - QUOTE_MINIMAL as QUOTE_MINIMAL, - QUOTE_NONE as QUOTE_NONE, - QUOTE_NONNUMERIC as QUOTE_NONNUMERIC, - Error as Error, - __version__ as __version__, - _DialectLike, - _QuotingType, - field_size_limit as field_size_limit, - get_dialect as get_dialect, - list_dialects as list_dialects, - reader as reader, - register_dialect as register_dialect, - unregister_dialect as unregister_dialect, - writer as writer, -) - -if sys.version_info >= (3, 12): - from _csv import QUOTE_NOTNULL as QUOTE_NOTNULL, QUOTE_STRINGS as QUOTE_STRINGS -from _csv import Reader, Writer -from _typeshed import SupportsWrite -from collections.abc import Collection, Iterable, Mapping, Sequence -from types import GenericAlias -from typing import Any, Generic, Literal, TypeVar, overload -from typing_extensions import Self - -__all__ = [ - "QUOTE_MINIMAL", - "QUOTE_ALL", - "QUOTE_NONNUMERIC", - "QUOTE_NONE", - "Error", - "Dialect", - "excel", - "excel_tab", - "field_size_limit", - "reader", - "writer", - "register_dialect", - "get_dialect", - "list_dialects", - "Sniffer", - "unregister_dialect", - "DictReader", - "DictWriter", - "unix_dialect", -] -if sys.version_info >= (3, 12): - __all__ += ["QUOTE_STRINGS", "QUOTE_NOTNULL"] -if sys.version_info < (3, 13): - __all__ += ["__doc__", "__version__"] - -_T = TypeVar("_T") - -class Dialect: - delimiter: str - quotechar: str | None - escapechar: str | None - doublequote: bool - skipinitialspace: bool - lineterminator: str - quoting: _QuotingType - strict: bool - def __init__(self) -> None: ... - -class excel(Dialect): ... -class excel_tab(excel): ... -class unix_dialect(Dialect): ... - -class DictReader(Generic[_T]): - fieldnames: Sequence[_T] | None - restkey: _T | None - restval: str | Any | None - reader: Reader - dialect: _DialectLike - line_num: int - - @overload - def __init__( - self, - f: Iterable[str], - fieldnames: Sequence[_T], - restkey: _T | None = None, - restval: str | Any | None = None, - dialect: _DialectLike = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, - ) -> None: ... - @overload - def __init__( - self: DictReader[str], - f: Iterable[str], - fieldnames: Sequence[str] | None = None, - restkey: str | None = None, - restval: str | None = None, - dialect: _DialectLike = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, - ) -> None: ... - - def __iter__(self) -> Self: ... - def __next__(self) -> dict[_T | Any, str | Any]: ... - if sys.version_info >= (3, 12): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class DictWriter(Generic[_T]): - fieldnames: Collection[_T] - restval: Any | None - extrasaction: Literal["raise", "ignore"] - writer: Writer - def __init__( - self, - f: SupportsWrite[str], - fieldnames: Collection[_T], - restval: Any | None = "", - extrasaction: Literal["raise", "ignore"] = "raise", - dialect: _DialectLike = "excel", - *, - delimiter: str = ",", - quotechar: str | None = '"', - escapechar: str | None = None, - doublequote: bool = True, - skipinitialspace: bool = False, - lineterminator: str = "\r\n", - quoting: _QuotingType = 0, - strict: bool = False, - ) -> None: ... - def writeheader(self) -> Any: ... - def writerow(self, rowdict: Mapping[_T, Any]) -> Any: ... - def writerows(self, rowdicts: Iterable[Mapping[_T, Any]]) -> None: ... - if sys.version_info >= (3, 12): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class Sniffer: - preferred: list[str] - def sniff(self, sample: str, delimiters: str | None = None) -> type[Dialect]: ... - def has_header(self, sample: str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/__init__.vpi deleted file mode 100644 index 7eee1b76..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/__init__.vpi +++ /dev/null @@ -1,394 +0,0 @@ -import sys -from _ctypes import ( - RTLD_GLOBAL as RTLD_GLOBAL, - RTLD_LOCAL as RTLD_LOCAL, - Array as Array, - CFuncPtr as _CFuncPtr, - Structure as Structure, - Union as Union, - _CanCastTo as _CanCastTo, - _CArgObject as _CArgObject, - _CData as _CData, - _CDataType as _CDataType, - _CField as _CField, - _CTypeBaseType, - _Pointer as _Pointer, - _PointerLike as _PointerLike, - _SimpleCData as _SimpleCData, - addressof as addressof, - alignment as alignment, - byref as byref, - get_errno as get_errno, - resize as resize, - set_errno as set_errno, - sizeof as sizeof, -) -from _typeshed import StrPath, SupportsBool, SupportsLen -from ctypes._endian import BigEndianStructure as BigEndianStructure, LittleEndianStructure as LittleEndianStructure -from types import GenericAlias -from typing import Any, ClassVar, Final, Generic, Literal, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, deprecated - -if sys.platform == "win32": - from _ctypes import FormatError as FormatError, get_last_error as get_last_error, set_last_error as set_last_error - - if sys.version_info >= (3, 14): - from _ctypes import COMError as COMError, CopyComPointer as CopyComPointer - -if sys.version_info >= (3, 11): - from ctypes._endian import BigEndianUnion as BigEndianUnion, LittleEndianUnion as LittleEndianUnion - -_CT = TypeVar("_CT", bound=_CData) -_T = TypeVar("_T", default=Any) -_DLLT = TypeVar("_DLLT", bound=CDLL) - -if sys.version_info >= (3, 14): - @overload - @deprecated("ctypes.POINTER with string") - def POINTER(cls: str) -> type[Any]: ... - @overload - def POINTER(cls: None) -> type[c_void_p]: ... - @overload - def POINTER(cls: type[_CT]) -> type[_Pointer[_CT]]: ... - - def pointer(obj: _CT) -> _Pointer[_CT]: ... - -else: - from _ctypes import POINTER as POINTER, pointer as pointer - -if sys.version_info >= (3, 14): - CField = _CField - -DEFAULT_MODE: Final[int] - -class ArgumentError(Exception): ... - -# defined within CDLL.__init__ -# Runtime name is ctypes.CDLL.__init__.._FuncPtr -@type_check_only -class _CDLLFuncPointer(_CFuncPtr): - _flags_: ClassVar[int] - _restype_: ClassVar[type[_CDataType]] - -# Not a real class; _CDLLFuncPointer with a __name__ set on it. -@type_check_only -class _NamedFuncPointer(_CDLLFuncPointer): - __name__: str - -if sys.version_info >= (3, 12): - _NameTypes: TypeAlias = StrPath | None -else: - _NameTypes: TypeAlias = str | None - -class CDLL: - _func_flags_: ClassVar[int] - _func_restype_: ClassVar[type[_CDataType]] - _name: str - _handle: int - _FuncPtr: type[_CDLLFuncPointer] - def __init__( - self, - name: _NameTypes, - mode: int = ..., - handle: int | None = None, - use_errno: bool = False, - use_last_error: bool = False, - winmode: int | None = None, - ) -> None: ... - def __getattr__(self, name: str) -> _NamedFuncPointer: ... - def __getitem__(self, name_or_ordinal: str) -> _NamedFuncPointer: ... - -if sys.platform == "win32": - class OleDLL(CDLL): ... - class WinDLL(CDLL): ... - -class PyDLL(CDLL): ... - -class LibraryLoader(Generic[_DLLT]): - def __init__(self, dlltype: type[_DLLT]) -> None: ... - def __getattr__(self, name: str) -> _DLLT: ... - def __getitem__(self, name: str) -> _DLLT: ... - def LoadLibrary(self, name: str) -> _DLLT: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -cdll: LibraryLoader[CDLL] -if sys.platform == "win32": - windll: LibraryLoader[WinDLL] - oledll: LibraryLoader[OleDLL] -pydll: LibraryLoader[PyDLL] -pythonapi: PyDLL - -# Class definition within CFUNCTYPE / WINFUNCTYPE / PYFUNCTYPE -# Names at runtime are -# ctypes.CFUNCTYPE..CFunctionType -# ctypes.WINFUNCTYPE..WinFunctionType -# ctypes.PYFUNCTYPE..CFunctionType -@type_check_only -class _CFunctionType(_CFuncPtr): - _argtypes_: ClassVar[list[type[_CData | _CDataType]]] - _restype_: ClassVar[type[_CData | _CDataType] | None] - _flags_: ClassVar[int] - -# Alias for either function pointer type -_FuncPointer: TypeAlias = _CDLLFuncPointer | _CFunctionType # noqa: Y047 # not used here - -def CFUNCTYPE( - restype: type[_CData | _CDataType] | None, - *argtypes: type[_CData | _CDataType], - use_errno: bool = False, - use_last_error: bool = False, -) -> type[_CFunctionType]: ... - -if sys.platform == "win32": - def WINFUNCTYPE( - restype: type[_CData | _CDataType] | None, - *argtypes: type[_CData | _CDataType], - use_errno: bool = False, - use_last_error: bool = False, - ) -> type[_CFunctionType]: ... - -def PYFUNCTYPE(restype: type[_CData | _CDataType] | None, *argtypes: type[_CData | _CDataType]) -> type[_CFunctionType]: ... - -# Any type that can be implicitly converted to c_void_p when passed as a C function argument. -# (bytes is not included here, see below.) -_CVoidPLike: TypeAlias = _PointerLike | Array[Any] | _CArgObject | int -# Same as above, but including types known to be read-only (i. e. bytes). -# This distinction is not strictly necessary (ctypes doesn't differentiate between const -# and non-const pointers), but it catches errors like memmove(b'foo', buf, 4) -# when memmove(buf, b'foo', 4) was intended. -_CVoidConstPLike: TypeAlias = _CVoidPLike | bytes - -_CastT = TypeVar("_CastT", bound=_CanCastTo) - -def cast(obj: _CData | _CDataType | _CArgObject | int, typ: type[_CastT]) -> _CastT: ... -def create_string_buffer(init: int | bytes, size: int | None = None) -> Array[c_char]: ... - -c_buffer = create_string_buffer - -def create_unicode_buffer(init: int | str, size: int | None = None) -> Array[c_wchar]: ... - -if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def SetPointerType(pointer: type[_Pointer[Any]], cls: _CTypeBaseType) -> None: ... - -@deprecated("Soft deprecated since Python 3.13. Use multiplication instead.") -def ARRAY(typ: _CT, len: int) -> Array[_CT]: ... - -if sys.platform == "win32": - def DllCanUnloadNow() -> int: ... - def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO: not documented - - # Actually just an instance of _NamedFuncPointer (aka _CDLLFuncPointer), - # but we want to set a more specific __call__ - @type_check_only - class _GetLastErrorFunctionType(_NamedFuncPointer): - def __call__(self) -> int: ... - - GetLastError: _GetLastErrorFunctionType - -# Actually just an instance of _CFunctionType, but we want to set a more -# specific __call__. -@type_check_only -class _MemmoveFunctionType(_CFunctionType): - def __call__(self, dst: _CVoidPLike, src: _CVoidConstPLike, count: int) -> int: ... - -memmove: _MemmoveFunctionType - -# Actually just an instance of _CFunctionType, but we want to set a more -# specific __call__. -@type_check_only -class _MemsetFunctionType(_CFunctionType): - def __call__(self, dst: _CVoidPLike, c: int, count: int) -> int: ... - -memset: _MemsetFunctionType - -def string_at(ptr: _CVoidConstPLike, size: int = -1) -> bytes: ... - -if sys.platform == "win32": - def WinError(code: int | None = None, descr: str | None = None) -> OSError: ... - -def wstring_at(ptr: _CVoidConstPLike, size: int = -1) -> str: ... - -if sys.version_info >= (3, 14): - def memoryview_at(ptr: _CVoidConstPLike, size: int, readonly: bool = False) -> memoryview: ... - -class py_object(_CanCastTo, _SimpleCData[_T]): - _type_: ClassVar[Literal["O"]] - if sys.version_info >= (3, 14): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class c_bool(_SimpleCData[bool]): - _type_: ClassVar[Literal["?"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - def __init__(self, value: SupportsBool | SupportsLen | None = ...) -> None: ... - -class c_byte(_SimpleCData[int]): - _type_: ClassVar[Literal["b"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_ubyte(_SimpleCData[int]): - _type_: ClassVar[Literal["B"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_short(_SimpleCData[int]): - _type_: ClassVar[Literal["h"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_ushort(_SimpleCData[int]): - _type_: ClassVar[Literal["H"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_long(_SimpleCData[int]): - _type_: ClassVar[Literal["l"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_ulong(_SimpleCData[int]): - _type_: ClassVar[Literal["L"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_int(_SimpleCData[int]): # can be an alias for c_long - _type_: ClassVar[Literal["i", "l"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_uint(_SimpleCData[int]): # can be an alias for c_ulong - _type_: ClassVar[Literal["I", "L"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_longlong(_SimpleCData[int]): # can be an alias for c_long - _type_: ClassVar[Literal["q", "l"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_ulonglong(_SimpleCData[int]): # can be an alias for c_ulong - _type_: ClassVar[Literal["Q", "L"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -c_int8 = c_byte -c_uint8 = c_ubyte - -class c_int16(_SimpleCData[int]): # can be an alias for c_short or c_int - _type_: ClassVar[Literal["h", "i"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_uint16(_SimpleCData[int]): # can be an alias for c_ushort or c_uint - _type_: ClassVar[Literal["H", "I"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_int32(_SimpleCData[int]): # can be an alias for c_int or c_long - _type_: ClassVar[Literal["i", "l"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_uint32(_SimpleCData[int]): # can be an alias for c_uint or c_ulong - _type_: ClassVar[Literal["I", "L"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_int64(_SimpleCData[int]): # can be an alias for c_long or c_longlong - _type_: ClassVar[Literal["l", "q"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_uint64(_SimpleCData[int]): # can be an alias for c_ulong or c_ulonglong - _type_: ClassVar[Literal["L", "Q"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_ssize_t(_SimpleCData[int]): # alias for c_int, c_long, or c_longlong - _type_: ClassVar[Literal["i", "l", "q"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_size_t(_SimpleCData[int]): # alias for c_uint, c_ulong, or c_ulonglong - _type_: ClassVar[Literal["I", "L", "Q"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_float(_SimpleCData[float]): - _type_: ClassVar[Literal["f"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_double(_SimpleCData[float]): - _type_: ClassVar[Literal["d"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - -class c_longdouble(_SimpleCData[float]): # can be an alias for c_double - _type_: ClassVar[Literal["d", "g"]] - -if sys.version_info >= (3, 14) and sys.platform != "win32": - # NOTE: currently (3.14.4) the `__ctype_{be,le}__` attributes of these complex types are missing at runtime: - # https://github.com/python/cpython/issues/148464 - - class c_double_complex(_SimpleCData[complex]): - if sys.version_info >= (3, 15): - _type_: ClassVar[Literal["Zd"]] - else: - _type_: ClassVar[Literal["D"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - - class c_float_complex(_SimpleCData[complex]): - if sys.version_info >= (3, 15): - _type_: ClassVar[Literal["Zf"]] - else: - _type_: ClassVar[Literal["F"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - - class c_longdouble_complex(_SimpleCData[complex]): - if sys.version_info >= (3, 15): - _type_: ClassVar[Literal["Zg"]] - else: - _type_: ClassVar[Literal["G"]] - -class c_char(_SimpleCData[bytes]): - _type_: ClassVar[Literal["c"]] - __ctype_be__: ClassVar[type[Self]] - __ctype_le__: ClassVar[type[Self]] - def __init__(self, value: int | bytes | bytearray = ...) -> None: ... - -class c_char_p(_PointerLike, _SimpleCData[bytes | None]): - _type_: ClassVar[Literal["z"]] - def __init__(self, value: int | bytes | None = ...) -> None: ... - @classmethod - def from_param(cls, value: Any, /) -> Self | _CArgObject: ... - -class c_void_p(_PointerLike, _SimpleCData[int | None]): - _type_: ClassVar[Literal["P"]] - @classmethod - def from_param(cls, value: Any, /) -> Self | _CArgObject: ... - -c_voidp = c_void_p # backwards compatibility (to a bug) - -class c_wchar(_SimpleCData[str]): - _type_: ClassVar[Literal["u"]] - -class c_wchar_p(_PointerLike, _SimpleCData[str | None]): - _type_: ClassVar[Literal["Z"]] - def __init__(self, value: int | str | None = ...) -> None: ... - @classmethod - def from_param(cls, value: Any, /) -> Self | _CArgObject: ... - -if sys.platform == "win32": - class HRESULT(_SimpleCData[int]): # TODO: undocumented - _type_: ClassVar[Literal["l"]] - -if sys.version_info >= (3, 12): - # At runtime, this is an alias for either c_int32 or c_int64, - # which are themselves an alias for one of c_int, c_long, or c_longlong - # This covers all our bases. - c_time_t: type[c_int32 | c_int64 | c_int | c_long | c_longlong] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/_endian.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/_endian.vpi deleted file mode 100644 index 97852f67..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/_endian.vpi +++ /dev/null @@ -1,16 +0,0 @@ -import sys -from ctypes import Structure, Union - -# At runtime, the native endianness is an alias for Structure, -# while the other is a subclass with a metaclass added in. -class BigEndianStructure(Structure): - __slots__ = () - -class LittleEndianStructure(Structure): ... - -# Same thing for these: one is an alias of Union at runtime -if sys.version_info >= (3, 11): - class BigEndianUnion(Union): - __slots__ = () - - class LittleEndianUnion(Union): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/__init__.vpi deleted file mode 100644 index c5dd9546..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/__init__.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Final - -__version__: Final[str] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dyld.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dyld.vpi deleted file mode 100644 index c7e94daa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dyld.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from collections.abc import Mapping -from ctypes.macholib.dylib import dylib_info as dylib_info -from ctypes.macholib.framework import framework_info as framework_info - -__all__ = ["dyld_find", "framework_find", "framework_info", "dylib_info"] - -def dyld_find(name: str, executable_path: str | None = None, env: Mapping[str, str] | None = None) -> str: ... -def framework_find(fn: str, executable_path: str | None = None, env: Mapping[str, str] | None = None) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dylib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dylib.vpi deleted file mode 100644 index 95945edf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/dylib.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import TypedDict, type_check_only - -__all__ = ["dylib_info"] - -# Actual result is produced by re.match.groupdict() -@type_check_only -class _DylibInfo(TypedDict): - location: str - name: str - shortname: str - version: str | None - suffix: str | None - -def dylib_info(filename: str) -> _DylibInfo | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/framework.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/framework.vpi deleted file mode 100644 index e92bf370..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/macholib/framework.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import TypedDict, type_check_only - -__all__ = ["framework_info"] - -# Actual result is produced by re.match.groupdict() -@type_check_only -class _FrameworkInfo(TypedDict): - location: str - name: str - shortname: str - version: str | None - suffix: str | None - -def framework_info(filename: str) -> _FrameworkInfo | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/util.vpi deleted file mode 100644 index 4f18c1d8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/util.vpi +++ /dev/null @@ -1,11 +0,0 @@ -import sys - -def find_library(name: str) -> str | None: ... - -if sys.platform == "win32": - def find_msvcrt() -> str | None: ... - -if sys.version_info >= (3, 14): - def dllist() -> list[str]: ... - -def test() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/wintypes.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/wintypes.vpi deleted file mode 100644 index b94c5e74..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ctypes/wintypes.vpi +++ /dev/null @@ -1,321 +0,0 @@ -import sys -from _ctypes import _CArgObject, _CField -from ctypes import ( - Array, - Structure, - _Pointer, - _SimpleCData, - c_char, - c_char_p, - c_double, - c_float, - c_int, - c_long, - c_longlong, - c_short, - c_uint, - c_ulong, - c_ulonglong, - c_ushort, - c_void_p, - c_wchar, - c_wchar_p, -) -from typing import Any, Final, TypeAlias, TypeVar -from typing_extensions import Self - -if sys.version_info >= (3, 12): - from ctypes import c_ubyte - - BYTE = c_ubyte -else: - from ctypes import c_byte - - BYTE = c_byte - -WORD = c_ushort -DWORD = c_ulong -CHAR = c_char -WCHAR = c_wchar -UINT = c_uint -INT = c_int -DOUBLE = c_double -FLOAT = c_float -BOOLEAN = BYTE -BOOL = c_long - -class VARIANT_BOOL(_SimpleCData[bool]): ... - -ULONG = c_ulong -LONG = c_long -USHORT = c_ushort -SHORT = c_short -LARGE_INTEGER = c_longlong -_LARGE_INTEGER = c_longlong -ULARGE_INTEGER = c_ulonglong -_ULARGE_INTEGER = c_ulonglong - -OLESTR = c_wchar_p -LPOLESTR = c_wchar_p -LPCOLESTR = c_wchar_p -LPWSTR = c_wchar_p -LPCWSTR = c_wchar_p -LPSTR = c_char_p -LPCSTR = c_char_p -LPVOID = c_void_p -LPCVOID = c_void_p - -# These two types are pointer-sized unsigned and signed ints, respectively. -# At runtime, they are either c_[u]long or c_[u]longlong, depending on the host's pointer size -# (they are not really separate classes). -class WPARAM(_SimpleCData[int]): ... -class LPARAM(_SimpleCData[int]): ... - -ATOM = WORD -LANGID = WORD -COLORREF = DWORD -LGRPID = DWORD -LCTYPE = DWORD -LCID = DWORD - -HANDLE = c_void_p -HACCEL = HANDLE -HBITMAP = HANDLE -HBRUSH = HANDLE -HCOLORSPACE = HANDLE -if sys.version_info >= (3, 14): - HCONV = HANDLE - HCONVLIST = HANDLE - HCURSOR = HANDLE - HDDEDATA = HANDLE - HDROP = HANDLE - HFILE = INT - HRESULT = LONG - HSZ = HANDLE -HDC = HANDLE -HDESK = HANDLE -HDWP = HANDLE -HENHMETAFILE = HANDLE -HFONT = HANDLE -HGDIOBJ = HANDLE -HGLOBAL = HANDLE -HHOOK = HANDLE -HICON = HANDLE -HINSTANCE = HANDLE -HKEY = HANDLE -HKL = HANDLE -HLOCAL = HANDLE -HMENU = HANDLE -HMETAFILE = HANDLE -HMODULE = HANDLE -HMONITOR = HANDLE -HPALETTE = HANDLE -HPEN = HANDLE -HRGN = HANDLE -HRSRC = HANDLE -HSTR = HANDLE -HTASK = HANDLE -HWINSTA = HANDLE -HWND = HANDLE -SC_HANDLE = HANDLE -SERVICE_STATUS_HANDLE = HANDLE - -_CIntLikeT = TypeVar("_CIntLikeT", bound=_SimpleCData[int]) -_CIntLikeField: TypeAlias = _CField[_CIntLikeT, int, _CIntLikeT | int] - -class RECT(Structure): - left: _CIntLikeField[LONG] - top: _CIntLikeField[LONG] - right: _CIntLikeField[LONG] - bottom: _CIntLikeField[LONG] - -RECTL = RECT -_RECTL = RECT -tagRECT = RECT - -class _SMALL_RECT(Structure): - Left: _CIntLikeField[SHORT] - Top: _CIntLikeField[SHORT] - Right: _CIntLikeField[SHORT] - Bottom: _CIntLikeField[SHORT] - -SMALL_RECT = _SMALL_RECT - -class _COORD(Structure): - X: _CIntLikeField[SHORT] - Y: _CIntLikeField[SHORT] - -class POINT(Structure): - x: _CIntLikeField[LONG] - y: _CIntLikeField[LONG] - -POINTL = POINT -_POINTL = POINT -tagPOINT = POINT - -class SIZE(Structure): - cx: _CIntLikeField[LONG] - cy: _CIntLikeField[LONG] - -SIZEL = SIZE -tagSIZE = SIZE - -def RGB(red: int, green: int, blue: int) -> int: ... - -class FILETIME(Structure): - dwLowDateTime: _CIntLikeField[DWORD] - dwHighDateTime: _CIntLikeField[DWORD] - -_FILETIME = FILETIME - -class MSG(Structure): - hWnd: _CField[HWND, int | None, HWND | int | None] - message: _CIntLikeField[UINT] - wParam: _CIntLikeField[WPARAM] - lParam: _CIntLikeField[LPARAM] - time: _CIntLikeField[DWORD] - pt: _CField[POINT, POINT, POINT] - -tagMSG = MSG -MAX_PATH: Final = 260 - -class WIN32_FIND_DATAA(Structure): - dwFileAttributes: _CIntLikeField[DWORD] - ftCreationTime: _CField[FILETIME, FILETIME, FILETIME] - ftLastAccessTime: _CField[FILETIME, FILETIME, FILETIME] - ftLastWriteTime: _CField[FILETIME, FILETIME, FILETIME] - nFileSizeHigh: _CIntLikeField[DWORD] - nFileSizeLow: _CIntLikeField[DWORD] - dwReserved0: _CIntLikeField[DWORD] - dwReserved1: _CIntLikeField[DWORD] - cFileName: _CField[Array[CHAR], bytes, bytes] - cAlternateFileName: _CField[Array[CHAR], bytes, bytes] - -class WIN32_FIND_DATAW(Structure): - dwFileAttributes: _CIntLikeField[DWORD] - ftCreationTime: _CField[FILETIME, FILETIME, FILETIME] - ftLastAccessTime: _CField[FILETIME, FILETIME, FILETIME] - ftLastWriteTime: _CField[FILETIME, FILETIME, FILETIME] - nFileSizeHigh: _CIntLikeField[DWORD] - nFileSizeLow: _CIntLikeField[DWORD] - dwReserved0: _CIntLikeField[DWORD] - dwReserved1: _CIntLikeField[DWORD] - cFileName: _CField[Array[WCHAR], str, str] - cAlternateFileName: _CField[Array[WCHAR], str, str] - -# These are all defined with the POINTER() function, which keeps a cache and will -# return a previously created class if it can. The self-reported __name__ -# of these classes is f"LP_{typ.__name__}", where typ is the original class -# passed in to the POINTER() function. - -# LP_c_short -class PSHORT(_Pointer[SHORT]): ... - -# LP_c_ushort -class PUSHORT(_Pointer[USHORT]): ... - -PWORD = PUSHORT -LPWORD = PUSHORT - -# LP_c_long -class PLONG(_Pointer[LONG]): ... - -LPLONG = PLONG -PBOOL = PLONG -LPBOOL = PLONG - -# LP_c_ulong -class PULONG(_Pointer[ULONG]): ... - -PDWORD = PULONG -LPDWORD = PDWORD -LPCOLORREF = PDWORD -PLCID = PDWORD - -# LP_c_int (or LP_c_long if int and long have the same size) -class PINT(_Pointer[INT]): ... - -LPINT = PINT - -# LP_c_uint (or LP_c_ulong if int and long have the same size) -class PUINT(_Pointer[UINT]): ... - -LPUINT = PUINT - -# LP_c_float -class PFLOAT(_Pointer[FLOAT]): ... - -# LP_c_longlong (or LP_c_long if long and long long have the same size) -class PLARGE_INTEGER(_Pointer[LARGE_INTEGER]): ... - -# LP_c_ulonglong (or LP_c_ulong if long and long long have the same size) -class PULARGE_INTEGER(_Pointer[ULARGE_INTEGER]): ... - -# LP_c_byte types -class PBYTE(_Pointer[BYTE]): ... - -LPBYTE = PBYTE -PBOOLEAN = PBYTE - -# LP_c_char -class PCHAR(_Pointer[CHAR]): - # this is inherited from ctypes.c_char_p, kind of. - @classmethod - def from_param(cls, value: Any, /) -> Self | _CArgObject: ... - -# LP_c_wchar -class PWCHAR(_Pointer[WCHAR]): - # inherited from ctypes.c_wchar_p, kind of - @classmethod - def from_param(cls, value: Any, /) -> Self | _CArgObject: ... - -# LP_c_void_p -class PHANDLE(_Pointer[HANDLE]): ... - -LPHANDLE = PHANDLE -PHKEY = PHANDLE -LPHKL = PHANDLE -LPSC_HANDLE = PHANDLE - -# LP_FILETIME -class PFILETIME(_Pointer[FILETIME]): ... - -LPFILETIME = PFILETIME - -# LP_MSG -class PMSG(_Pointer[MSG]): ... - -LPMSG = PMSG - -# LP_POINT -class PPOINT(_Pointer[POINT]): ... - -LPPOINT = PPOINT -PPOINTL = PPOINT - -# LP_RECT -class PRECT(_Pointer[RECT]): ... - -LPRECT = PRECT -PRECTL = PRECT -LPRECTL = PRECT - -# LP_SIZE -class PSIZE(_Pointer[SIZE]): ... - -LPSIZE = PSIZE -PSIZEL = PSIZE -LPSIZEL = PSIZE - -# LP__SMALL_RECT -class PSMALL_RECT(_Pointer[SMALL_RECT]): ... - -# LP_WIN32_FIND_DATAA -class PWIN32_FIND_DATAA(_Pointer[WIN32_FIND_DATAA]): ... - -LPWIN32_FIND_DATAA = PWIN32_FIND_DATAA - -# LP_WIN32_FIND_DATAW -class PWIN32_FIND_DATAW(_Pointer[WIN32_FIND_DATAW]): ... - -LPWIN32_FIND_DATAW = PWIN32_FIND_DATAW diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/curses/__init__.vpi deleted file mode 100644 index cf504811..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/__init__.vpi +++ /dev/null @@ -1,38 +0,0 @@ -from _curses import * -from _curses import window as window -from _typeshed import structseq -from collections.abc import Callable -from typing import Concatenate, Final, ParamSpec, TypeVar, final, type_check_only - -# NOTE: The _curses module is ordinarily only available on Unix, but the -# windows-curses package makes it available on Windows as well with the same -# contents. - -_T = TypeVar("_T") -_P = ParamSpec("_P") - -# available after calling `curses.initscr()` -# not `Final` as it can change during the terminal resize: -LINES: int -COLS: int - -# available after calling `curses.start_color()` -COLORS: Final[int] -COLOR_PAIRS: Final[int] - -def wrapper(func: Callable[Concatenate[window, _P], _T], /, *arg: _P.args, **kwds: _P.kwargs) -> _T: ... - -# At runtime this class is unexposed and calls itself curses.ncurses_version. -# That name would conflict with the actual curses.ncurses_version, which is -# an instance of this class. -@final -@type_check_only -class _ncurses_version(structseq[int], tuple[int, int, int]): - __match_args__: Final = ("major", "minor", "patch") - - @property - def major(self) -> int: ... - @property - def minor(self) -> int: ... - @property - def patch(self) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/ascii.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/curses/ascii.vpi deleted file mode 100644 index 0234434b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/ascii.vpi +++ /dev/null @@ -1,62 +0,0 @@ -from typing import Final, TypeVar - -_CharT = TypeVar("_CharT", str, int) - -NUL: Final = 0x00 -SOH: Final = 0x01 -STX: Final = 0x02 -ETX: Final = 0x03 -EOT: Final = 0x04 -ENQ: Final = 0x05 -ACK: Final = 0x06 -BEL: Final = 0x07 -BS: Final = 0x08 -TAB: Final = 0x09 -HT: Final = 0x09 -LF: Final = 0x0A -NL: Final = 0x0A -VT: Final = 0x0B -FF: Final = 0x0C -CR: Final = 0x0D -SO: Final = 0x0E -SI: Final = 0x0F -DLE: Final = 0x10 -DC1: Final = 0x11 -DC2: Final = 0x12 -DC3: Final = 0x13 -DC4: Final = 0x14 -NAK: Final = 0x15 -SYN: Final = 0x16 -ETB: Final = 0x17 -CAN: Final = 0x18 -EM: Final = 0x19 -SUB: Final = 0x1A -ESC: Final = 0x1B -FS: Final = 0x1C -GS: Final = 0x1D -RS: Final = 0x1E -US: Final = 0x1F -SP: Final = 0x20 -DEL: Final = 0x7F - -controlnames: Final[list[int]] - -def isalnum(c: str | int) -> bool: ... -def isalpha(c: str | int) -> bool: ... -def isascii(c: str | int) -> bool: ... -def isblank(c: str | int) -> bool: ... -def iscntrl(c: str | int) -> bool: ... -def isdigit(c: str | int) -> bool: ... -def isgraph(c: str | int) -> bool: ... -def islower(c: str | int) -> bool: ... -def isprint(c: str | int) -> bool: ... -def ispunct(c: str | int) -> bool: ... -def isspace(c: str | int) -> bool: ... -def isupper(c: str | int) -> bool: ... -def isxdigit(c: str | int) -> bool: ... -def isctrl(c: str | int) -> bool: ... -def ismeta(c: str | int) -> bool: ... -def ascii(c: _CharT) -> _CharT: ... -def ctrl(c: _CharT) -> _CharT: ... -def alt(c: _CharT) -> _CharT: ... -def unctrl(c: str | int) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/has_key.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/curses/has_key.vpi deleted file mode 100644 index 3811060b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/has_key.vpi +++ /dev/null @@ -1 +0,0 @@ -def has_key(ch: int | str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/panel.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/curses/panel.vpi deleted file mode 100644 index 861559d3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/panel.vpi +++ /dev/null @@ -1 +0,0 @@ -from _curses_panel import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/textpad.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/curses/textpad.vpi deleted file mode 100644 index 48ef67c9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/curses/textpad.vpi +++ /dev/null @@ -1,11 +0,0 @@ -from _curses import window -from collections.abc import Callable - -def rectangle(win: window, uly: int, ulx: int, lry: int, lrx: int) -> None: ... - -class Textbox: - stripspaces: bool - def __init__(self, win: window, insert_mode: bool = False) -> None: ... - def edit(self, validate: Callable[[int], int] | None = None) -> str: ... - def do_command(self, ch: str | int) -> None: ... - def gather(self) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/datetime.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/datetime.vpi deleted file mode 100644 index 95c62a9c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/datetime.vpi +++ /dev/null @@ -1,381 +0,0 @@ -import sys -from abc import abstractmethod -from time import struct_time -from typing import ClassVar, Final, NoReturn, SupportsIndex, TypeAlias, final, overload, type_check_only -from typing_extensions import CapsuleType, Self, deprecated, disjoint_base - -if sys.version_info >= (3, 11): - __all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo", "MINYEAR", "MAXYEAR", "UTC") -else: - __all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo", "MINYEAR", "MAXYEAR") - -MINYEAR: Final = 1 -MAXYEAR: Final = 9999 - -class tzinfo: - @abstractmethod - def tzname(self, dt: datetime | None, /) -> str | None: ... - @abstractmethod - def utcoffset(self, dt: datetime | None, /) -> timedelta | None: ... - @abstractmethod - def dst(self, dt: datetime | None, /) -> timedelta | None: ... - def fromutc(self, dt: datetime, /) -> datetime: ... - -# Alias required to avoid name conflicts with date(time).tzinfo. -_TzInfo: TypeAlias = tzinfo - -@final -class timezone(tzinfo): - utc: ClassVar[timezone] - min: ClassVar[timezone] - max: ClassVar[timezone] - def __new__(cls, offset: timedelta, name: str = ...) -> Self: ... - def tzname(self, dt: datetime | None, /) -> str: ... - def utcoffset(self, dt: datetime | None, /) -> timedelta: ... - def dst(self, dt: datetime | None, /) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, value: object, /) -> bool: ... - -if sys.version_info >= (3, 11): - UTC: timezone - -# This class calls itself datetime.IsoCalendarDate. It's neither -# NamedTuple nor structseq. -@final -@type_check_only -class _IsoCalendarDate(tuple[int, int, int]): - @property - def year(self) -> int: ... - @property - def week(self) -> int: ... - @property - def weekday(self) -> int: ... - -@disjoint_base -class date: - min: ClassVar[date] - max: ClassVar[date] - resolution: ClassVar[timedelta] - def __new__(cls, year: SupportsIndex, month: SupportsIndex, day: SupportsIndex) -> Self: ... - @classmethod - def fromtimestamp(cls, timestamp: float, /) -> Self: ... - @classmethod - def today(cls) -> Self: ... - @classmethod - def fromordinal(cls, n: int, /) -> Self: ... - - if sys.version_info >= (3, 15): - @classmethod - def fromisoformat(cls, string: str, /) -> Self: ... - else: - @classmethod - def fromisoformat(cls, date_string: str, /) -> Self: ... - - @classmethod - def fromisocalendar(cls, year: int, week: int, day: int) -> Self: ... - @property - def year(self) -> int: ... - @property - def month(self) -> int: ... - @property - def day(self) -> int: ... - def ctime(self) -> str: ... - - if sys.version_info >= (3, 14): - if sys.version_info >= (3, 15): - @classmethod - def strptime(cls, string: str, format: str, /) -> Self: ... - else: - @classmethod - def strptime(cls, date_string: str, format: str, /) -> Self: ... - - # On <3.12, the name of the parameter in the pure-Python implementation - # didn't match the name in the C implementation, - # meaning it is only *safe* to pass it as a keyword argument on 3.12+ - if sys.version_info >= (3, 12): - def strftime(self, format: str) -> str: ... - else: - def strftime(self, format: str, /) -> str: ... - - def __format__(self, fmt: str, /) -> str: ... - def isoformat(self) -> str: ... - def timetuple(self) -> struct_time: ... - def toordinal(self) -> int: ... - if sys.version_info >= (3, 13): - def __replace__(self, /, *, year: SupportsIndex = ..., month: SupportsIndex = ..., day: SupportsIndex = ...) -> Self: ... - - def replace(self, year: SupportsIndex = ..., month: SupportsIndex = ..., day: SupportsIndex = ...) -> Self: ... - def __le__(self, value: date, /) -> bool: ... - def __lt__(self, value: date, /) -> bool: ... - def __ge__(self, value: date, /) -> bool: ... - def __gt__(self, value: date, /) -> bool: ... - def __eq__(self, value: object, /) -> bool: ... - def __add__(self, value: timedelta, /) -> Self: ... - def __radd__(self, value: timedelta, /) -> Self: ... - - @overload - def __sub__(self, value: datetime, /) -> NoReturn: ... - @overload - def __sub__(self, value: Self, /) -> timedelta: ... - @overload - def __sub__(self, value: timedelta, /) -> Self: ... - - def __hash__(self) -> int: ... - def weekday(self) -> int: ... - def isoweekday(self) -> int: ... - def isocalendar(self) -> _IsoCalendarDate: ... - -@disjoint_base -class time: - min: ClassVar[time] - max: ClassVar[time] - resolution: ClassVar[timedelta] - def __new__( - cls, - hour: SupportsIndex = 0, - minute: SupportsIndex = 0, - second: SupportsIndex = 0, - microsecond: SupportsIndex = 0, - tzinfo: _TzInfo | None = None, - *, - fold: int = 0, - ) -> Self: ... - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _TzInfo | None: ... - @property - def fold(self) -> int: ... - def __le__(self, value: time, /) -> bool: ... - def __lt__(self, value: time, /) -> bool: ... - def __ge__(self, value: time, /) -> bool: ... - def __gt__(self, value: time, /) -> bool: ... - def __eq__(self, value: object, /) -> bool: ... - def __hash__(self) -> int: ... - def isoformat(self, timespec: str = "auto") -> str: ... - - if sys.version_info >= (3, 15): - @classmethod - def fromisoformat(cls, string: str, /) -> Self: ... - else: - @classmethod - def fromisoformat(cls, time_string: str, /) -> Self: ... - - if sys.version_info >= (3, 14): - if sys.version_info >= (3, 15): - @classmethod - def strptime(cls, string: str, format: str, /) -> Self: ... - else: - @classmethod - def strptime(cls, date_string: str, format: str, /) -> Self: ... - - # On <3.12, the name of the parameter in the pure-Python implementation - # didn't match the name in the C implementation, - # meaning it is only *safe* to pass it as a keyword argument on 3.12+ - if sys.version_info >= (3, 12): - def strftime(self, format: str) -> str: ... - else: - def strftime(self, format: str, /) -> str: ... - - def __format__(self, fmt: str, /) -> str: ... - def utcoffset(self) -> timedelta | None: ... - def tzname(self) -> str | None: ... - def dst(self) -> timedelta | None: ... - if sys.version_info >= (3, 13): - def __replace__( - self, - /, - *, - hour: SupportsIndex = ..., - minute: SupportsIndex = ..., - second: SupportsIndex = ..., - microsecond: SupportsIndex = ..., - tzinfo: _TzInfo | None = ..., - fold: int = ..., - ) -> Self: ... - - def replace( - self, - hour: SupportsIndex = ..., - minute: SupportsIndex = ..., - second: SupportsIndex = ..., - microsecond: SupportsIndex = ..., - tzinfo: _TzInfo | None = ..., - *, - fold: int = ..., - ) -> Self: ... - -_Date: TypeAlias = date -_Time: TypeAlias = time - -@disjoint_base -class timedelta: - min: ClassVar[timedelta] - max: ClassVar[timedelta] - resolution: ClassVar[timedelta] - def __new__( - cls, - days: float = 0, - seconds: float = 0, - microseconds: float = 0, - milliseconds: float = 0, - minutes: float = 0, - hours: float = 0, - weeks: float = 0, - ) -> Self: ... - @property - def days(self) -> int: ... - @property - def seconds(self) -> int: ... - @property - def microseconds(self) -> int: ... - def total_seconds(self) -> float: ... - def __add__(self, value: timedelta, /) -> timedelta: ... - def __radd__(self, value: timedelta, /) -> timedelta: ... - def __sub__(self, value: timedelta, /) -> timedelta: ... - def __rsub__(self, value: timedelta, /) -> timedelta: ... - def __neg__(self) -> timedelta: ... - def __pos__(self) -> timedelta: ... - def __abs__(self) -> timedelta: ... - def __mul__(self, value: float, /) -> timedelta: ... - def __rmul__(self, value: float, /) -> timedelta: ... - - @overload - def __floordiv__(self, value: timedelta, /) -> int: ... - @overload - def __floordiv__(self, value: int, /) -> timedelta: ... - - @overload - def __truediv__(self, value: timedelta, /) -> float: ... - @overload - def __truediv__(self, value: float, /) -> timedelta: ... - - def __mod__(self, value: timedelta, /) -> timedelta: ... - def __divmod__(self, value: timedelta, /) -> tuple[int, timedelta]: ... - def __le__(self, value: timedelta, /) -> bool: ... - def __lt__(self, value: timedelta, /) -> bool: ... - def __ge__(self, value: timedelta, /) -> bool: ... - def __gt__(self, value: timedelta, /) -> bool: ... - def __eq__(self, value: object, /) -> bool: ... - def __bool__(self) -> bool: ... - def __hash__(self) -> int: ... - -@disjoint_base -class datetime(date): - min: ClassVar[datetime] - max: ClassVar[datetime] - def __new__( - cls, - year: SupportsIndex, - month: SupportsIndex, - day: SupportsIndex, - hour: SupportsIndex = 0, - minute: SupportsIndex = 0, - second: SupportsIndex = 0, - microsecond: SupportsIndex = 0, - tzinfo: _TzInfo | None = None, - *, - fold: int = 0, - ) -> Self: ... - @property - def hour(self) -> int: ... - @property - def minute(self) -> int: ... - @property - def second(self) -> int: ... - @property - def microsecond(self) -> int: ... - @property - def tzinfo(self) -> _TzInfo | None: ... - @property - def fold(self) -> int: ... - # On <3.12, the name of the first parameter in the pure-Python implementation - # didn't match the name in the C implementation, - # meaning it is only *safe* to pass it as a keyword argument on 3.12+ - if sys.version_info >= (3, 12): - @classmethod - def fromtimestamp(cls, timestamp: float, tz: _TzInfo | None = None) -> Self: ... - else: - @classmethod - def fromtimestamp(cls, timestamp: float, /, tz: _TzInfo | None = None) -> Self: ... - - @classmethod - @deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .fromtimestamp(datetime.timezone.utc)") - def utcfromtimestamp(cls, t: float, /) -> Self: ... - @classmethod - def now(cls, tz: _TzInfo | None = None) -> Self: ... - @classmethod - @deprecated("Use timezone-aware objects to represent datetimes in UTC; e.g. by calling .now(datetime.timezone.utc)") - def utcnow(cls) -> Self: ... - @classmethod - def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self: ... - if sys.version_info >= (3, 15): - @classmethod - def fromisoformat(cls, string: str, /) -> Self: ... - - def timestamp(self) -> float: ... - def utctimetuple(self) -> struct_time: ... - def date(self) -> _Date: ... - def time(self) -> _Time: ... - def timetz(self) -> _Time: ... - if sys.version_info >= (3, 13): - def __replace__( - self, - /, - *, - year: SupportsIndex = ..., - month: SupportsIndex = ..., - day: SupportsIndex = ..., - hour: SupportsIndex = ..., - minute: SupportsIndex = ..., - second: SupportsIndex = ..., - microsecond: SupportsIndex = ..., - tzinfo: _TzInfo | None = ..., - fold: int = ..., - ) -> Self: ... - - def replace( - self, - year: SupportsIndex = ..., - month: SupportsIndex = ..., - day: SupportsIndex = ..., - hour: SupportsIndex = ..., - minute: SupportsIndex = ..., - second: SupportsIndex = ..., - microsecond: SupportsIndex = ..., - tzinfo: _TzInfo | None = ..., - *, - fold: int = ..., - ) -> Self: ... - def astimezone(self, tz: _TzInfo | None = None) -> Self: ... - def isoformat(self, sep: str = "T", timespec: str = "auto") -> str: ... - - if sys.version_info >= (3, 15): - @classmethod - def strptime(cls, string: str, format: str, /) -> Self: ... - else: - @classmethod - def strptime(cls, date_string: str, format: str, /) -> Self: ... - - def utcoffset(self) -> timedelta | None: ... - def tzname(self) -> str | None: ... - def dst(self) -> timedelta | None: ... - def __le__(self, value: datetime, /) -> bool: ... # type: ignore[override] - def __lt__(self, value: datetime, /) -> bool: ... # type: ignore[override] - def __ge__(self, value: datetime, /) -> bool: ... # type: ignore[override] - def __gt__(self, value: datetime, /) -> bool: ... # type: ignore[override] - def __eq__(self, value: object, /) -> bool: ... - def __hash__(self) -> int: ... - - @overload # type: ignore[override] - def __sub__(self, value: Self, /) -> timedelta: ... - @overload - def __sub__(self, value: timedelta, /) -> Self: ... - -datetime_CAPI: CapsuleType diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/__init__.vpi deleted file mode 100644 index 0871381e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/__init__.vpi +++ /dev/null @@ -1,105 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Iterator, MutableMapping -from types import TracebackType -from typing import Literal, TypeAlias, type_check_only -from typing_extensions import Self - -__all__ = ["open", "whichdb", "error"] - -_KeyType: TypeAlias = str | bytes -_ValueType: TypeAlias = str | bytes | bytearray -_TFlags: TypeAlias = Literal[ - "r", - "w", - "c", - "n", - "rf", - "wf", - "cf", - "nf", - "rs", - "ws", - "cs", - "ns", - "ru", - "wu", - "cu", - "nu", - "rfs", - "wfs", - "cfs", - "nfs", - "rfu", - "wfu", - "cfu", - "nfu", - "rsf", - "wsf", - "csf", - "nsf", - "rsu", - "wsu", - "csu", - "nsu", - "ruf", - "wuf", - "cuf", - "nuf", - "rus", - "wus", - "cus", - "nus", - "rfsu", - "wfsu", - "cfsu", - "nfsu", - "rfus", - "wfus", - "cfus", - "nfus", - "rsfu", - "wsfu", - "csfu", - "nsfu", - "rsuf", - "wsuf", - "csuf", - "nsuf", - "rufs", - "wufs", - "cufs", - "nufs", - "rusf", - "wusf", - "cusf", - "nusf", -] - -@type_check_only -class _Database(MutableMapping[_KeyType, bytes]): - def close(self) -> None: ... - def __getitem__(self, key: _KeyType) -> bytes: ... - def __setitem__(self, key: _KeyType, value: _ValueType) -> None: ... - def __delitem__(self, key: _KeyType) -> None: ... - def __iter__(self) -> Iterator[bytes]: ... - def __len__(self) -> int: ... - def __del__(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - -# This class is not exposed. It calls itself dbm.error. -@type_check_only -class _error(Exception): ... - -error: tuple[type[_error], type[OSError]] - -if sys.version_info >= (3, 11): - def whichdb(filename: StrOrBytesPath) -> str | None: ... - def open(file: StrOrBytesPath, flag: _TFlags = "r", mode: int = 0o666) -> _Database: ... - -else: - def whichdb(filename: str) -> str | None: ... - def open(file: str, flag: _TFlags = "r", mode: int = 0o666) -> _Database: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/dumb.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/dumb.vpi deleted file mode 100644 index d5a769e6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/dumb.vpi +++ /dev/null @@ -1,41 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Iterator, MutableMapping -from types import TracebackType -from typing import TypeAlias -from typing_extensions import Self - -__all__ = ["error", "open"] - -_KeyType: TypeAlias = str | bytes -_ValueType: TypeAlias = str | bytes - -error = OSError - -# This class doesn't exist at runtime. open() can return an instance of -# any of the three implementations of dbm (dumb, gnu, ndbm), and this -# class is intended to represent the common interface supported by all three. -class _Database(MutableMapping[_KeyType, bytes]): - def __init__(self, filebasename: str, mode: str, flag: str = "c") -> None: ... - def sync(self) -> None: ... - if sys.version_info >= (3, 15): - def reorganize(self) -> None: ... - - def iterkeys(self) -> Iterator[bytes]: ... # undocumented - def close(self) -> None: ... - def __getitem__(self, key: _KeyType) -> bytes: ... - def __setitem__(self, key: _KeyType, val: _ValueType) -> None: ... - def __delitem__(self, key: _KeyType) -> None: ... - def __iter__(self) -> Iterator[bytes]: ... - def __len__(self) -> int: ... - def __del__(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - -if sys.version_info >= (3, 11): - def open(file: StrOrBytesPath, flag: str = "c", mode: int = 0o666) -> _Database: ... - -else: - def open(file: str, flag: str = "c", mode: int = 0o666) -> _Database: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/gnu.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/gnu.vpi deleted file mode 100644 index 2dac3d12..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/gnu.vpi +++ /dev/null @@ -1 +0,0 @@ -from _gdbm import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/ndbm.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/ndbm.vpi deleted file mode 100644 index 66c943ab..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/ndbm.vpi +++ /dev/null @@ -1 +0,0 @@ -from _dbm import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/sqlite3.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/sqlite3.vpi deleted file mode 100644 index e7034cfd..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dbm/sqlite3.vpi +++ /dev/null @@ -1,34 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, Unused -from collections.abc import Generator, MutableMapping -from typing import Final, Literal, TypeAlias -from typing_extensions import LiteralString, Self - -BUILD_TABLE: Final[LiteralString] -GET_SIZE: Final[LiteralString] -LOOKUP_KEY: Final[LiteralString] -STORE_KV: Final[LiteralString] -DELETE_KEY: Final[LiteralString] -ITER_KEYS: Final[LiteralString] -if sys.version_info >= (3, 15): - REORGANIZE: Final[LiteralString] - -_SqliteData: TypeAlias = str | ReadableBuffer | int | float - -class error(OSError): ... - -class _Database(MutableMapping[bytes, bytes]): - def __init__(self, path: StrOrBytesPath, /, *, flag: Literal["r", "w", "c", "n"], mode: int) -> None: ... - def __len__(self) -> int: ... - def __getitem__(self, key: _SqliteData) -> bytes: ... - def __setitem__(self, key: _SqliteData, value: _SqliteData) -> None: ... - def __delitem__(self, key: _SqliteData) -> None: ... - def __iter__(self) -> Generator[bytes]: ... - def close(self) -> None: ... - def keys(self) -> list[bytes]: ... # type: ignore[override] - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - if sys.version_info >= (3, 15): - def reorganize(self) -> None: ... - -def open(filename: StrOrBytesPath, /, flag: Literal["r", "w", "c", "n"] = "r", mode: int = 0o666) -> _Database: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/decimal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/decimal.vpi deleted file mode 100644 index f16fa8aa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/decimal.vpi +++ /dev/null @@ -1,278 +0,0 @@ -import numbers -import sys -from _decimal import ( - HAVE_CONTEXTVAR as HAVE_CONTEXTVAR, - HAVE_THREADS as HAVE_THREADS, - MAX_EMAX as MAX_EMAX, - MAX_PREC as MAX_PREC, - MIN_EMIN as MIN_EMIN, - MIN_ETINY as MIN_ETINY, - ROUND_05UP as ROUND_05UP, - ROUND_CEILING as ROUND_CEILING, - ROUND_DOWN as ROUND_DOWN, - ROUND_FLOOR as ROUND_FLOOR, - ROUND_HALF_DOWN as ROUND_HALF_DOWN, - ROUND_HALF_EVEN as ROUND_HALF_EVEN, - ROUND_HALF_UP as ROUND_HALF_UP, - ROUND_UP as ROUND_UP, - BasicContext as BasicContext, - DefaultContext as DefaultContext, - ExtendedContext as ExtendedContext, - __libmpdec_version__ as __libmpdec_version__, - __version__ as __version__, - getcontext as getcontext, - localcontext as localcontext, - setcontext as setcontext, -) -from collections.abc import Container, Sequence -from types import TracebackType -from typing import Any, ClassVar, Literal, NamedTuple, TypeAlias, final, overload, type_check_only -from typing_extensions import Self, disjoint_base - -if sys.version_info >= (3, 14): - from _decimal import IEEE_CONTEXT_MAX_BITS as IEEE_CONTEXT_MAX_BITS, IEEEContext as IEEEContext -if sys.version_info >= (3, 15): - from _decimal import SPEC_VERSION as SPEC_VERSION - -_Decimal: TypeAlias = Decimal | int -_DecimalNew: TypeAlias = Decimal | float | str | tuple[int, Sequence[int], int] -_ComparableNum: TypeAlias = Decimal | float | numbers.Rational -_TrapType: TypeAlias = type[DecimalException] - -# At runtime, these classes are implemented in C as part of "_decimal". -# However, they consider themselves to live in "decimal", so we'll put them here. - -# This type isn't exposed at runtime. It calls itself decimal.ContextManager -@final -@type_check_only -class _ContextManager: - def __init__(self, new_context: Context) -> None: ... - def __enter__(self) -> Context: ... - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - -class DecimalTuple(NamedTuple): - sign: int - digits: tuple[int, ...] - exponent: int | Literal["n", "N", "F"] - -class DecimalException(ArithmeticError): ... -class Clamped(DecimalException): ... -class InvalidOperation(DecimalException): ... -class ConversionSyntax(InvalidOperation): ... -class DivisionByZero(DecimalException, ZeroDivisionError): ... -class DivisionImpossible(InvalidOperation): ... -class DivisionUndefined(InvalidOperation, ZeroDivisionError): ... -class Inexact(DecimalException): ... -class InvalidContext(InvalidOperation): ... -class Rounded(DecimalException): ... -class Subnormal(DecimalException): ... -class Overflow(Inexact, Rounded): ... -class Underflow(Inexact, Rounded, Subnormal): ... -class FloatOperation(DecimalException, TypeError): ... - -@disjoint_base -class Decimal: - def __new__(cls, value: _DecimalNew = "0", context: Context | None = None) -> Self: ... - if sys.version_info >= (3, 14): - @classmethod - def from_number(cls, number: Decimal | float, /) -> Self: ... - - @classmethod - def from_float(cls, f: float, /) -> Self: ... - def __bool__(self) -> bool: ... - def compare(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def __hash__(self) -> int: ... - def as_tuple(self) -> DecimalTuple: ... - def as_integer_ratio(self) -> tuple[int, int]: ... - def to_eng_string(self, context: Context | None = None) -> str: ... - def __abs__(self) -> Decimal: ... - def __add__(self, value: _Decimal, /) -> Decimal: ... - def __divmod__(self, value: _Decimal, /) -> tuple[Decimal, Decimal]: ... - def __eq__(self, value: object, /) -> bool: ... - def __floordiv__(self, value: _Decimal, /) -> Decimal: ... - def __ge__(self, value: _ComparableNum, /) -> bool: ... - def __gt__(self, value: _ComparableNum, /) -> bool: ... - def __le__(self, value: _ComparableNum, /) -> bool: ... - def __lt__(self, value: _ComparableNum, /) -> bool: ... - def __mod__(self, value: _Decimal, /) -> Decimal: ... - def __mul__(self, value: _Decimal, /) -> Decimal: ... - def __neg__(self) -> Decimal: ... - def __pos__(self) -> Decimal: ... - def __pow__(self, value: _Decimal, mod: _Decimal | None = None, /) -> Decimal: ... - def __radd__(self, value: _Decimal, /) -> Decimal: ... - def __rdivmod__(self, value: _Decimal, /) -> tuple[Decimal, Decimal]: ... - def __rfloordiv__(self, value: _Decimal, /) -> Decimal: ... - def __rmod__(self, value: _Decimal, /) -> Decimal: ... - def __rmul__(self, value: _Decimal, /) -> Decimal: ... - def __rsub__(self, value: _Decimal, /) -> Decimal: ... - def __rtruediv__(self, value: _Decimal, /) -> Decimal: ... - def __sub__(self, value: _Decimal, /) -> Decimal: ... - def __truediv__(self, value: _Decimal, /) -> Decimal: ... - def remainder_near(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def __float__(self) -> float: ... - def __int__(self) -> int: ... - def __trunc__(self) -> int: ... - @property - def real(self) -> Decimal: ... - @property - def imag(self) -> Decimal: ... - def conjugate(self) -> Decimal: ... - def __complex__(self) -> complex: ... - - @overload - def __round__(self) -> int: ... - @overload - def __round__(self, ndigits: int, /) -> Decimal: ... - - def __floor__(self) -> int: ... - def __ceil__(self) -> int: ... - def fma(self, other: _Decimal, third: _Decimal, context: Context | None = None) -> Decimal: ... - def __rpow__(self, value: _Decimal, mod: Context | None = None, /) -> Decimal: ... - def normalize(self, context: Context | None = None) -> Decimal: ... - def quantize(self, exp: _Decimal, rounding: str | None = None, context: Context | None = None) -> Decimal: ... - def same_quantum(self, other: _Decimal, context: Context | None = None) -> bool: ... - def to_integral_exact(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ... - def to_integral_value(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ... - def to_integral(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ... - def sqrt(self, context: Context | None = None) -> Decimal: ... - def max(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def min(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def adjusted(self) -> int: ... - def canonical(self) -> Decimal: ... - def compare_signal(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def compare_total(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def compare_total_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def copy_abs(self) -> Decimal: ... - def copy_negate(self) -> Decimal: ... - def copy_sign(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def exp(self, context: Context | None = None) -> Decimal: ... - def is_canonical(self) -> bool: ... - def is_finite(self) -> bool: ... - def is_infinite(self) -> bool: ... - def is_nan(self) -> bool: ... - def is_normal(self, context: Context | None = None) -> bool: ... - def is_qnan(self) -> bool: ... - def is_signed(self) -> bool: ... - def is_snan(self) -> bool: ... - def is_subnormal(self, context: Context | None = None) -> bool: ... - def is_zero(self) -> bool: ... - def ln(self, context: Context | None = None) -> Decimal: ... - def log10(self, context: Context | None = None) -> Decimal: ... - def logb(self, context: Context | None = None) -> Decimal: ... - def logical_and(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def logical_invert(self, context: Context | None = None) -> Decimal: ... - def logical_or(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def logical_xor(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def max_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def min_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def next_minus(self, context: Context | None = None) -> Decimal: ... - def next_plus(self, context: Context | None = None) -> Decimal: ... - def next_toward(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def number_class(self, context: Context | None = None) -> str: ... - def radix(self) -> Decimal: ... - def rotate(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def scaleb(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def shift(self, other: _Decimal, context: Context | None = None) -> Decimal: ... - def __reduce__(self) -> tuple[type[Self], tuple[str]]: ... - def __copy__(self) -> Self: ... - def __deepcopy__(self, memo: Any, /) -> Self: ... - def __format__(self, specifier: str, context: Context | None = None, /) -> str: ... - -@disjoint_base -class Context: - # TODO: Context doesn't allow you to delete *any* attributes from instances of the class at runtime, - # even settable attributes like `prec` and `rounding`, - # but that's inexpressible in the stub. - # Type checkers either ignore it or misinterpret it - # if you add a `def __delattr__(self, name: str, /) -> NoReturn` method to the stub - prec: int - rounding: str - Emin: int - Emax: int - capitals: int - clamp: int - traps: dict[_TrapType, bool] - flags: dict[_TrapType, bool] - def __init__( - self, - prec: int | None = None, - rounding: str | None = None, - Emin: int | None = None, - Emax: int | None = None, - capitals: int | None = None, - clamp: int | None = None, - flags: dict[_TrapType, bool] | Container[_TrapType] | None = None, - traps: dict[_TrapType, bool] | Container[_TrapType] | None = None, - ) -> None: ... - def __reduce__(self) -> tuple[type[Self], tuple[Any, ...]]: ... - def clear_flags(self) -> None: ... - def clear_traps(self) -> None: ... - def copy(self) -> Context: ... - def __copy__(self) -> Context: ... - # see https://github.com/python/cpython/issues/94107 - __hash__: ClassVar[None] # type: ignore[assignment] - def Etiny(self) -> int: ... - def Etop(self) -> int: ... - def create_decimal(self, num: _DecimalNew = "0", /) -> Decimal: ... - def create_decimal_from_float(self, f: float, /) -> Decimal: ... - def abs(self, x: _Decimal, /) -> Decimal: ... - def add(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def canonical(self, x: Decimal, /) -> Decimal: ... - def compare(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def compare_signal(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def compare_total(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def compare_total_mag(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def copy_abs(self, x: _Decimal, /) -> Decimal: ... - def copy_decimal(self, x: _Decimal, /) -> Decimal: ... - def copy_negate(self, x: _Decimal, /) -> Decimal: ... - def copy_sign(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def divide(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def divide_int(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def divmod(self, x: _Decimal, y: _Decimal, /) -> tuple[Decimal, Decimal]: ... - def exp(self, x: _Decimal, /) -> Decimal: ... - def fma(self, x: _Decimal, y: _Decimal, z: _Decimal, /) -> Decimal: ... - def is_canonical(self, x: _Decimal, /) -> bool: ... - def is_finite(self, x: _Decimal, /) -> bool: ... - def is_infinite(self, x: _Decimal, /) -> bool: ... - def is_nan(self, x: _Decimal, /) -> bool: ... - def is_normal(self, x: _Decimal, /) -> bool: ... - def is_qnan(self, x: _Decimal, /) -> bool: ... - def is_signed(self, x: _Decimal, /) -> bool: ... - def is_snan(self, x: _Decimal, /) -> bool: ... - def is_subnormal(self, x: _Decimal, /) -> bool: ... - def is_zero(self, x: _Decimal, /) -> bool: ... - def ln(self, x: _Decimal, /) -> Decimal: ... - def log10(self, x: _Decimal, /) -> Decimal: ... - def logb(self, x: _Decimal, /) -> Decimal: ... - def logical_and(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def logical_invert(self, x: _Decimal, /) -> Decimal: ... - def logical_or(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def logical_xor(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def max(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def max_mag(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def min(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def min_mag(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def minus(self, x: _Decimal, /) -> Decimal: ... - def multiply(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def next_minus(self, x: _Decimal, /) -> Decimal: ... - def next_plus(self, x: _Decimal, /) -> Decimal: ... - def next_toward(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def normalize(self, x: _Decimal, /) -> Decimal: ... - def number_class(self, x: _Decimal, /) -> str: ... - def plus(self, x: _Decimal, /) -> Decimal: ... - def power(self, a: _Decimal, b: _Decimal, modulo: _Decimal | None = None) -> Decimal: ... - def quantize(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def radix(self) -> Decimal: ... - def remainder(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def remainder_near(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def rotate(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def same_quantum(self, x: _Decimal, y: _Decimal, /) -> bool: ... - def scaleb(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def shift(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def sqrt(self, x: _Decimal, /) -> Decimal: ... - def subtract(self, x: _Decimal, y: _Decimal, /) -> Decimal: ... - def to_eng_string(self, x: _Decimal, /) -> str: ... - def to_sci_string(self, x: _Decimal, /) -> str: ... - def to_integral_exact(self, x: _Decimal, /) -> Decimal: ... - def to_integral_value(self, x: _Decimal, /) -> Decimal: ... - def to_integral(self, x: _Decimal, /) -> Decimal: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/difflib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/difflib.vpi deleted file mode 100644 index a3bda7f9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/difflib.vpi +++ /dev/null @@ -1,157 +0,0 @@ -import re -import sys -from collections.abc import Callable, Iterable, Iterator, Sequence -from types import GenericAlias -from typing import Any, AnyStr, Generic, Literal, NamedTuple, TypeVar, overload - -__all__ = [ - "get_close_matches", - "ndiff", - "restore", - "SequenceMatcher", - "Differ", - "IS_CHARACTER_JUNK", - "IS_LINE_JUNK", - "context_diff", - "unified_diff", - "diff_bytes", - "HtmlDiff", - "Match", -] - -_T = TypeVar("_T") - -class Match(NamedTuple): - a: int - b: int - size: int - -class SequenceMatcher(Generic[_T]): - @overload - def __init__(self, isjunk: Callable[[_T], bool] | None, a: Sequence[_T], b: Sequence[_T], autojunk: bool = True) -> None: ... - @overload - def __init__(self, *, a: Sequence[_T], b: Sequence[_T], autojunk: bool = True) -> None: ... - @overload - def __init__( - self: SequenceMatcher[str], - isjunk: Callable[[str], bool] | None = None, - a: Sequence[str] = "", - b: Sequence[str] = "", - autojunk: bool = True, - ) -> None: ... - - def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ... - def set_seq1(self, a: Sequence[_T]) -> None: ... - def set_seq2(self, b: Sequence[_T]) -> None: ... - def find_longest_match(self, alo: int = 0, ahi: int | None = None, blo: int = 0, bhi: int | None = None) -> Match: ... - def get_matching_blocks(self) -> list[Match]: ... - def get_opcodes(self) -> list[tuple[Literal["replace", "delete", "insert", "equal"], int, int, int, int]]: ... - def get_grouped_opcodes(self, n: int = 3) -> Iterable[list[tuple[str, int, int, int, int]]]: ... - def ratio(self) -> float: ... - def quick_ratio(self) -> float: ... - def real_quick_ratio(self) -> float: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -@overload -def get_close_matches(word: AnyStr, possibilities: Iterable[AnyStr], n: int = 3, cutoff: float = 0.6) -> list[AnyStr]: ... -@overload -def get_close_matches( - word: Sequence[_T], possibilities: Iterable[Sequence[_T]], n: int = 3, cutoff: float = 0.6 -) -> list[Sequence[_T]]: ... - -class Differ: - def __init__(self, linejunk: Callable[[str], bool] | None = None, charjunk: Callable[[str], bool] | None = None) -> None: ... - def compare(self, a: Sequence[str], b: Sequence[str]) -> Iterator[str]: ... - -if sys.version_info >= (3, 14): - def IS_LINE_JUNK(line: str, pat: Callable[[str], re.Match[str] | None] | None = None) -> bool: ... - -else: - def IS_LINE_JUNK(line: str, pat: Callable[[str], re.Match[str] | None] = ...) -> bool: ... - -def IS_CHARACTER_JUNK(ch: str, ws: str = " \t") -> bool: ... # ws is undocumented - -if sys.version_info >= (3, 15): - def unified_diff( - a: Sequence[str], - b: Sequence[str], - fromfile: str = "", - tofile: str = "", - fromfiledate: str = "", - tofiledate: str = "", - n: int = 3, - lineterm: str = "\n", - *, - color: bool = False, - ) -> Iterator[str]: ... - -else: - def unified_diff( - a: Sequence[str], - b: Sequence[str], - fromfile: str = "", - tofile: str = "", - fromfiledate: str = "", - tofiledate: str = "", - n: int = 3, - lineterm: str = "\n", - ) -> Iterator[str]: ... - -def context_diff( - a: Sequence[str], - b: Sequence[str], - fromfile: str = "", - tofile: str = "", - fromfiledate: str = "", - tofiledate: str = "", - n: int = 3, - lineterm: str = "\n", -) -> Iterator[str]: ... -def ndiff( - a: Sequence[str], - b: Sequence[str], - linejunk: Callable[[str], bool] | None = None, - charjunk: Callable[[str], bool] | None = ..., -) -> Iterator[str]: ... - -class HtmlDiff: - def __init__( - self, - tabsize: int = 8, - wrapcolumn: int | None = None, - linejunk: Callable[[str], bool] | None = None, - charjunk: Callable[[str], bool] | None = ..., - ) -> None: ... - def make_file( - self, - fromlines: Sequence[str], - tolines: Sequence[str], - fromdesc: str = "", - todesc: str = "", - context: bool = False, - numlines: int = 5, - *, - charset: str = "utf-8", - ) -> str: ... - def make_table( - self, - fromlines: Sequence[str], - tolines: Sequence[str], - fromdesc: str = "", - todesc: str = "", - context: bool = False, - numlines: int = 5, - ) -> str: ... - -def restore(delta: Iterable[str], which: int) -> Iterator[str]: ... -def diff_bytes( - dfunc: Callable[[Sequence[str], Sequence[str], str, str, str, str, int, str], Iterator[str]], - a: Iterable[bytes | bytearray], - b: Iterable[bytes | bytearray], - fromfile: bytes | bytearray = b"", - tofile: bytes | bytearray = b"", - fromfiledate: bytes | bytearray = b"", - tofiledate: bytes | bytearray = b"", - n: int = 3, - lineterm: bytes | bytearray = b"\n", -) -> Iterator[bytes]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/dis.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/dis.vpi deleted file mode 100644 index 984f932e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/dis.vpi +++ /dev/null @@ -1,302 +0,0 @@ -import sys -import types -from collections.abc import Callable, Iterator -from opcode import * # `dis` re-exports it as a part of public API -from typing import IO, Any, Final, NamedTuple, TypeAlias, overload -from typing_extensions import Self, deprecated, disjoint_base - -__all__ = [ - "code_info", - "dis", - "disassemble", - "distb", - "disco", - "findlinestarts", - "findlabels", - "show_code", - "get_instructions", - "Instruction", - "Bytecode", - "cmp_op", - "hasconst", - "hasname", - "hasjrel", - "hasjabs", - "haslocal", - "hascompare", - "hasfree", - "opname", - "opmap", - "HAVE_ARGUMENT", - "EXTENDED_ARG", - "stack_effect", -] -if sys.version_info >= (3, 13): - __all__ += ["hasjump"] - -if sys.version_info >= (3, 12): - __all__ += ["hasarg", "hasexc"] -else: - __all__ += ["hasnargs"] - -# Strictly this should not have to include Callable, but mypy doesn't use FunctionType -# for functions (python/mypy#3171) -_HaveCodeType: TypeAlias = types.MethodType | types.FunctionType | types.CodeType | type | Callable[..., Any] - -if sys.version_info >= (3, 11): - class Positions(NamedTuple): - lineno: int | None = None - end_lineno: int | None = None - col_offset: int | None = None - end_col_offset: int | None = None - -if sys.version_info >= (3, 13): - class _Instruction(NamedTuple): - opname: str - opcode: int - arg: int | None - argval: Any - argrepr: str - offset: int - start_offset: int - starts_line: bool - line_number: int | None - label: int | None = None - positions: Positions | None = None - cache_info: list[tuple[str, int, Any]] | None = None - -elif sys.version_info >= (3, 11): - class _Instruction(NamedTuple): - opname: str - opcode: int - arg: int | None - argval: Any - argrepr: str - offset: int - starts_line: int | None - is_jump_target: bool - positions: Positions | None = None - -else: - class _Instruction(NamedTuple): - opname: str - opcode: int - arg: int | None - argval: Any - argrepr: str - offset: int - starts_line: int | None - is_jump_target: bool - -if sys.version_info >= (3, 12): - class Instruction(_Instruction): - if sys.version_info < (3, 13): - def _disassemble(self, lineno_width: int = 3, mark_as_current: bool = False, offset_width: int = 4) -> str: ... - if sys.version_info >= (3, 13): - @property - def oparg(self) -> int: ... - @property - def baseopcode(self) -> int: ... - @property - def baseopname(self) -> str: ... - @property - def cache_offset(self) -> int: ... - @property - def end_offset(self) -> int: ... - @property - def jump_target(self) -> int: ... - @property - def is_jump_target(self) -> bool: ... - if sys.version_info >= (3, 14): - @staticmethod - def make( - opname: str, - arg: int | None, - argval: Any, - argrepr: str, - offset: int, - start_offset: int, - starts_line: bool, - line_number: int | None, - label: int | None = None, - positions: Positions | None = None, - cache_info: list[tuple[str, int, Any]] | None = None, - ) -> Instruction: ... - -else: - @disjoint_base - class Instruction(_Instruction): - def _disassemble(self, lineno_width: int = 3, mark_as_current: bool = False, offset_width: int = 4) -> str: ... - -class Bytecode: - codeobj: types.CodeType - first_line: int - if sys.version_info >= (3, 14): - show_positions: bool - # 3.14 added `show_positions` - def __init__( - self, - x: _HaveCodeType | str, - *, - first_line: int | None = None, - current_offset: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - show_positions: bool = False, - ) -> None: ... - elif sys.version_info >= (3, 13): - show_offsets: bool - # 3.13 added `show_offsets` - def __init__( - self, - x: _HaveCodeType | str, - *, - first_line: int | None = None, - current_offset: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - ) -> None: ... - elif sys.version_info >= (3, 11): - def __init__( - self, - x: _HaveCodeType | str, - *, - first_line: int | None = None, - current_offset: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - ) -> None: ... - else: - def __init__( - self, x: _HaveCodeType | str, *, first_line: int | None = None, current_offset: int | None = None - ) -> None: ... - - if sys.version_info >= (3, 11): - @classmethod - def from_traceback(cls, tb: types.TracebackType, *, show_caches: bool = False, adaptive: bool = False) -> Self: ... - else: - @classmethod - def from_traceback(cls, tb: types.TracebackType) -> Self: ... - - def __iter__(self) -> Iterator[Instruction]: ... - def info(self) -> str: ... - def dis(self) -> str: ... - -COMPILER_FLAG_NAMES: Final[dict[int, str]] - -def findlabels(code: _HaveCodeType) -> list[int]: ... -def findlinestarts(code: _HaveCodeType) -> Iterator[tuple[int, int]]: ... -def pretty_flags(flags: int) -> str: ... -def code_info(x: _HaveCodeType | str) -> str: ... - -if sys.version_info >= (3, 14): - # 3.14 added `show_positions` - def dis( - x: _HaveCodeType | str | bytes | bytearray | None = None, - *, - file: IO[str] | None = None, - depth: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - show_positions: bool = False, - ) -> None: ... - def disassemble( - co: _HaveCodeType, - lasti: int = -1, - *, - file: IO[str] | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - show_positions: bool = False, - ) -> None: ... - def distb( - tb: types.TracebackType | None = None, - *, - file: IO[str] | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - show_positions: bool = False, - ) -> None: ... - -elif sys.version_info >= (3, 13): - # 3.13 added `show_offsets` - def dis( - x: _HaveCodeType | str | bytes | bytearray | None = None, - *, - file: IO[str] | None = None, - depth: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - ) -> None: ... - def disassemble( - co: _HaveCodeType, - lasti: int = -1, - *, - file: IO[str] | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - ) -> None: ... - def distb( - tb: types.TracebackType | None = None, - *, - file: IO[str] | None = None, - show_caches: bool = False, - adaptive: bool = False, - show_offsets: bool = False, - ) -> None: ... - -elif sys.version_info >= (3, 11): - # 3.11 added `show_caches` and `adaptive` - def dis( - x: _HaveCodeType | str | bytes | bytearray | None = None, - *, - file: IO[str] | None = None, - depth: int | None = None, - show_caches: bool = False, - adaptive: bool = False, - ) -> None: ... - def disassemble( - co: _HaveCodeType, lasti: int = -1, *, file: IO[str] | None = None, show_caches: bool = False, adaptive: bool = False - ) -> None: ... - def distb( - tb: types.TracebackType | None = None, *, file: IO[str] | None = None, show_caches: bool = False, adaptive: bool = False - ) -> None: ... - -else: - def dis( - x: _HaveCodeType | str | bytes | bytearray | None = None, *, file: IO[str] | None = None, depth: int | None = None - ) -> None: ... - def disassemble(co: _HaveCodeType, lasti: int = -1, *, file: IO[str] | None = None) -> None: ... - def distb(tb: types.TracebackType | None = None, *, file: IO[str] | None = None) -> None: ... - -if sys.version_info >= (3, 13): - # 3.13 made `show_caches` `None` by default and has no effect - @overload - def get_instructions(x: _HaveCodeType, *, first_line: int | None = None, adaptive: bool = False) -> Iterator[Instruction]: ... - @overload - @deprecated( - "The `show_caches` parameter is deprecated since Python 3.13. " - "The iterator generates the `Instruction` instances with the `cache_info` field populated." - ) - def get_instructions( - x: _HaveCodeType, *, first_line: int | None = None, show_caches: bool | None = None, adaptive: bool = False - ) -> Iterator[Instruction]: ... - -elif sys.version_info >= (3, 11): - def get_instructions( - x: _HaveCodeType, *, first_line: int | None = None, show_caches: bool = False, adaptive: bool = False - ) -> Iterator[Instruction]: ... - -else: - def get_instructions(x: _HaveCodeType, *, first_line: int | None = None) -> Iterator[Instruction]: ... - -def show_code(co: _HaveCodeType, *, file: IO[str] | None = None) -> None: ... - -disco = disassemble diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/__init__.vpi deleted file mode 100644 index 328a5b78..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/__init__.vpi +++ /dev/null @@ -1,5 +0,0 @@ -# Attempts to improve these stubs are probably not the best use of time: -# - distutils is deleted in Python 3.12 and newer -# - Most users already do not use stdlib distutils, due to setuptools monkeypatching -# - We have very little quality assurance on these stubs, since due to the two above issues -# we allowlist all distutils errors in stubtest. diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/_msvccompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/_msvccompiler.vpi deleted file mode 100644 index bba9373b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/_msvccompiler.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from _typeshed import Incomplete -from distutils.ccompiler import CCompiler -from typing import ClassVar, Final - -PLAT_SPEC_TO_RUNTIME: Final[dict[str, str]] -PLAT_TO_VCVARS: Final[dict[str, str]] - -class MSVCCompiler(CCompiler): - compiler_type: ClassVar[str] - executables: ClassVar[dict[Incomplete, Incomplete]] - res_extension: ClassVar[str] - initialized: bool - def initialize(self, plat_name: str | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/archive_util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/archive_util.vpi deleted file mode 100644 index 5de23bad..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/archive_util.vpi +++ /dev/null @@ -1,36 +0,0 @@ -from _typeshed import StrOrBytesPath, StrPath -from typing import Literal, overload - -@overload -def make_archive( - base_name: str, - format: str, - root_dir: StrOrBytesPath | None = None, - base_dir: str | None = None, - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, - owner: str | None = None, - group: str | None = None, -) -> str: ... -@overload -def make_archive( - base_name: StrPath, - format: str, - root_dir: StrOrBytesPath, - base_dir: str | None = None, - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, - owner: str | None = None, - group: str | None = None, -) -> str: ... - -def make_tarball( - base_name: str, - base_dir: StrPath, - compress: str | None = "gzip", - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, - owner: str | None = None, - group: str | None = None, -) -> str: ... -def make_zipfile(base_name: str, base_dir: str, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/bcppcompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/bcppcompiler.vpi deleted file mode 100644 index 3e432f94..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/bcppcompiler.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from distutils.ccompiler import CCompiler - -class BCPPCompiler(CCompiler): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/ccompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/ccompiler.vpi deleted file mode 100644 index 83bbada6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/ccompiler.vpi +++ /dev/null @@ -1,182 +0,0 @@ -from _typeshed import BytesPath, StrPath, Unused -from collections.abc import Callable, Iterable, Sequence -from distutils.file_util import _BytesPathT, _StrPathT -from typing import Literal, TypeAlias, overload -from typing_extensions import TypeVarTuple, Unpack - -_Macro: TypeAlias = tuple[str] | tuple[str, str | None] -_Ts = TypeVarTuple("_Ts") - -def gen_lib_options( - compiler: CCompiler, library_dirs: list[str], runtime_library_dirs: list[str], libraries: list[str] -) -> list[str]: ... -def gen_preprocess_options(macros: list[_Macro], include_dirs: list[str]) -> list[str]: ... -def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str: ... -def new_compiler( - plat: str | None = None, - compiler: str | None = None, - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, - force: bool | Literal[0, 1] = 0, -) -> CCompiler: ... -def show_compilers() -> None: ... - -class CCompiler: - dry_run: bool - force: bool - verbose: bool - output_dir: str | None - macros: list[_Macro] - include_dirs: list[str] - libraries: list[str] - library_dirs: list[str] - runtime_library_dirs: list[str] - objects: list[str] - def __init__( - self, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0, force: bool | Literal[0, 1] = 0 - ) -> None: ... - def add_include_dir(self, dir: str) -> None: ... - def set_include_dirs(self, dirs: list[str]) -> None: ... - def add_library(self, libname: str) -> None: ... - def set_libraries(self, libnames: list[str]) -> None: ... - def add_library_dir(self, dir: str) -> None: ... - def set_library_dirs(self, dirs: list[str]) -> None: ... - def add_runtime_library_dir(self, dir: str) -> None: ... - def set_runtime_library_dirs(self, dirs: list[str]) -> None: ... - def define_macro(self, name: str, value: str | None = None) -> None: ... - def undefine_macro(self, name: str) -> None: ... - def add_link_object(self, object: str) -> None: ... - def set_link_objects(self, objects: list[str]) -> None: ... - def detect_language(self, sources: str | list[str]) -> str | None: ... - def find_library_file(self, dirs: list[str], lib: str, debug: bool | Literal[0, 1] = 0) -> str | None: ... - def has_function( - self, - funcname: str, - includes: list[str] | None = None, - include_dirs: list[str] | None = None, - libraries: list[str] | None = None, - library_dirs: list[str] | None = None, - ) -> bool: ... - def library_dir_option(self, dir: str) -> str: ... - def library_option(self, lib: str) -> str: ... - def runtime_library_dir_option(self, dir: str) -> str: ... - def set_executables(self, **args: str) -> None: ... - def compile( - self, - sources: Sequence[StrPath], - output_dir: str | None = None, - macros: list[_Macro] | None = None, - include_dirs: list[str] | None = None, - debug: bool | Literal[0, 1] = 0, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - depends: list[str] | None = None, - ) -> list[str]: ... - def create_static_lib( - self, - objects: list[str], - output_libname: str, - output_dir: str | None = None, - debug: bool | Literal[0, 1] = 0, - target_lang: str | None = None, - ) -> None: ... - def link( - self, - target_desc: str, - objects: list[str], - output_filename: str, - output_dir: str | None = None, - libraries: list[str] | None = None, - library_dirs: list[str] | None = None, - runtime_library_dirs: list[str] | None = None, - export_symbols: list[str] | None = None, - debug: bool | Literal[0, 1] = 0, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - build_temp: str | None = None, - target_lang: str | None = None, - ) -> None: ... - def link_executable( - self, - objects: list[str], - output_progname: str, - output_dir: str | None = None, - libraries: list[str] | None = None, - library_dirs: list[str] | None = None, - runtime_library_dirs: list[str] | None = None, - debug: bool | Literal[0, 1] = 0, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - target_lang: str | None = None, - ) -> None: ... - def link_shared_lib( - self, - objects: list[str], - output_libname: str, - output_dir: str | None = None, - libraries: list[str] | None = None, - library_dirs: list[str] | None = None, - runtime_library_dirs: list[str] | None = None, - export_symbols: list[str] | None = None, - debug: bool | Literal[0, 1] = 0, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - build_temp: str | None = None, - target_lang: str | None = None, - ) -> None: ... - def link_shared_object( - self, - objects: list[str], - output_filename: str, - output_dir: str | None = None, - libraries: list[str] | None = None, - library_dirs: list[str] | None = None, - runtime_library_dirs: list[str] | None = None, - export_symbols: list[str] | None = None, - debug: bool | Literal[0, 1] = 0, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - build_temp: str | None = None, - target_lang: str | None = None, - ) -> None: ... - def preprocess( - self, - source: str, - output_file: str | None = None, - macros: list[_Macro] | None = None, - include_dirs: list[str] | None = None, - extra_preargs: list[str] | None = None, - extra_postargs: list[str] | None = None, - ) -> None: ... - - @overload - def executable_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ... - @overload - def executable_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ... - - def library_filename( - self, libname: str, lib_type: str = "static", strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath = "" - ) -> str: ... - def object_filenames( - self, source_filenames: Iterable[StrPath], strip_dir: bool | Literal[0, 1] = 0, output_dir: StrPath | None = "" - ) -> list[str]: ... - - @overload - def shared_object_filename(self, basename: str, strip_dir: Literal[0, False] = 0, output_dir: StrPath = "") -> str: ... - @overload - def shared_object_filename(self, basename: StrPath, strip_dir: Literal[1, True], output_dir: StrPath = "") -> str: ... - - def execute( - self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1 - ) -> None: ... - def spawn(self, cmd: Iterable[str]) -> None: ... - def mkpath(self, name: str, mode: int = 0o777) -> None: ... - - @overload - def move_file(self, src: StrPath, dst: _StrPathT) -> _StrPathT | str: ... - @overload - def move_file(self, src: BytesPath, dst: _BytesPathT) -> _BytesPathT | bytes: ... - - def announce(self, msg: str, level: int = 1) -> None: ... - def warn(self, msg: str) -> None: ... - def debug_print(self, msg: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cmd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cmd.vpi deleted file mode 100644 index 35b991ab..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cmd.vpi +++ /dev/null @@ -1,238 +0,0 @@ -from _typeshed import BytesPath, StrOrBytesPath, StrPath, Unused -from abc import abstractmethod -from collections.abc import Callable, Iterable -from distutils.command.bdist import bdist -from distutils.command.bdist_dumb import bdist_dumb -from distutils.command.bdist_rpm import bdist_rpm -from distutils.command.build import build -from distutils.command.build_clib import build_clib -from distutils.command.build_ext import build_ext -from distutils.command.build_py import build_py -from distutils.command.build_scripts import build_scripts -from distutils.command.check import check -from distutils.command.clean import clean -from distutils.command.config import config -from distutils.command.install import install -from distutils.command.install_data import install_data -from distutils.command.install_egg_info import install_egg_info -from distutils.command.install_headers import install_headers -from distutils.command.install_lib import install_lib -from distutils.command.install_scripts import install_scripts -from distutils.command.register import register -from distutils.command.sdist import sdist -from distutils.command.upload import upload -from distutils.dist import Distribution -from distutils.file_util import _BytesPathT, _StrPathT -from typing import Any, ClassVar, Literal, TypeVar, overload -from typing_extensions import TypeVarTuple, Unpack - -_CommandT = TypeVar("_CommandT", bound=Command) -_Ts = TypeVarTuple("_Ts") - -class Command: - dry_run: bool | Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run - distribution: Distribution - # Any to work around variance issues - sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] - def __init__(self, dist: Distribution) -> None: ... - @abstractmethod - def initialize_options(self) -> None: ... - @abstractmethod - def finalize_options(self) -> None: ... - @abstractmethod - def run(self) -> None: ... - def announce(self, msg: str, level: int = 1) -> None: ... - def debug_print(self, msg: str) -> None: ... - def ensure_string(self, option: str, default: str | None = None) -> None: ... - def ensure_string_list(self, option: str) -> None: ... - def ensure_filename(self, option: str) -> None: ... - def ensure_dirname(self, option: str) -> None: ... - def get_command_name(self) -> str: ... - def set_undefined_options(self, src_cmd: str, *option_pairs: tuple[str, str]) -> None: ... - - # NOTE: This list comes directly from the distutils/command folder. Minus bdist_msi and bdist_wininst. - @overload - def get_finalized_command(self, command: Literal["bdist"], create: bool | Literal[0, 1] = 1) -> bdist: ... - @overload - def get_finalized_command(self, command: Literal["bdist_dumb"], create: bool | Literal[0, 1] = 1) -> bdist_dumb: ... - @overload - def get_finalized_command(self, command: Literal["bdist_rpm"], create: bool | Literal[0, 1] = 1) -> bdist_rpm: ... - @overload - def get_finalized_command(self, command: Literal["build"], create: bool | Literal[0, 1] = 1) -> build: ... - @overload - def get_finalized_command(self, command: Literal["build_clib"], create: bool | Literal[0, 1] = 1) -> build_clib: ... - @overload - def get_finalized_command(self, command: Literal["build_ext"], create: bool | Literal[0, 1] = 1) -> build_ext: ... - @overload - def get_finalized_command(self, command: Literal["build_py"], create: bool | Literal[0, 1] = 1) -> build_py: ... - @overload - def get_finalized_command(self, command: Literal["build_scripts"], create: bool | Literal[0, 1] = 1) -> build_scripts: ... - @overload - def get_finalized_command(self, command: Literal["check"], create: bool | Literal[0, 1] = 1) -> check: ... - @overload - def get_finalized_command(self, command: Literal["clean"], create: bool | Literal[0, 1] = 1) -> clean: ... - @overload - def get_finalized_command(self, command: Literal["config"], create: bool | Literal[0, 1] = 1) -> config: ... - @overload - def get_finalized_command(self, command: Literal["install"], create: bool | Literal[0, 1] = 1) -> install: ... - @overload - def get_finalized_command(self, command: Literal["install_data"], create: bool | Literal[0, 1] = 1) -> install_data: ... - @overload - def get_finalized_command( - self, command: Literal["install_egg_info"], create: bool | Literal[0, 1] = 1 - ) -> install_egg_info: ... - @overload - def get_finalized_command(self, command: Literal["install_headers"], create: bool | Literal[0, 1] = 1) -> install_headers: ... - @overload - def get_finalized_command(self, command: Literal["install_lib"], create: bool | Literal[0, 1] = 1) -> install_lib: ... - @overload - def get_finalized_command(self, command: Literal["install_scripts"], create: bool | Literal[0, 1] = 1) -> install_scripts: ... - @overload - def get_finalized_command(self, command: Literal["register"], create: bool | Literal[0, 1] = 1) -> register: ... - @overload - def get_finalized_command(self, command: Literal["sdist"], create: bool | Literal[0, 1] = 1) -> sdist: ... - @overload - def get_finalized_command(self, command: Literal["upload"], create: bool | Literal[0, 1] = 1) -> upload: ... - @overload - def get_finalized_command(self, command: str, create: bool | Literal[0, 1] = 1) -> Command: ... - - @overload - def reinitialize_command(self, command: Literal["bdist"], reinit_subcommands: bool | Literal[0, 1] = 0) -> bdist: ... - @overload - def reinitialize_command( - self, command: Literal["bdist_dumb"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> bdist_dumb: ... - @overload - def reinitialize_command(self, command: Literal["bdist_rpm"], reinit_subcommands: bool | Literal[0, 1] = 0) -> bdist_rpm: ... - @overload - def reinitialize_command(self, command: Literal["build"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build: ... - @overload - def reinitialize_command( - self, command: Literal["build_clib"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> build_clib: ... - @overload - def reinitialize_command(self, command: Literal["build_ext"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build_ext: ... - @overload - def reinitialize_command(self, command: Literal["build_py"], reinit_subcommands: bool | Literal[0, 1] = 0) -> build_py: ... - @overload - def reinitialize_command( - self, command: Literal["build_scripts"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> build_scripts: ... - @overload - def reinitialize_command(self, command: Literal["check"], reinit_subcommands: bool | Literal[0, 1] = 0) -> check: ... - @overload - def reinitialize_command(self, command: Literal["clean"], reinit_subcommands: bool | Literal[0, 1] = 0) -> clean: ... - @overload - def reinitialize_command(self, command: Literal["config"], reinit_subcommands: bool | Literal[0, 1] = 0) -> config: ... - @overload - def reinitialize_command(self, command: Literal["install"], reinit_subcommands: bool | Literal[0, 1] = 0) -> install: ... - @overload - def reinitialize_command( - self, command: Literal["install_data"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> install_data: ... - @overload - def reinitialize_command( - self, command: Literal["install_egg_info"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> install_egg_info: ... - @overload - def reinitialize_command( - self, command: Literal["install_headers"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> install_headers: ... - @overload - def reinitialize_command( - self, command: Literal["install_lib"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> install_lib: ... - @overload - def reinitialize_command( - self, command: Literal["install_scripts"], reinit_subcommands: bool | Literal[0, 1] = 0 - ) -> install_scripts: ... - @overload - def reinitialize_command(self, command: Literal["register"], reinit_subcommands: bool | Literal[0, 1] = 0) -> register: ... - @overload - def reinitialize_command(self, command: Literal["sdist"], reinit_subcommands: bool | Literal[0, 1] = 0) -> sdist: ... - @overload - def reinitialize_command(self, command: Literal["upload"], reinit_subcommands: bool | Literal[0, 1] = 0) -> upload: ... - @overload - def reinitialize_command(self, command: str, reinit_subcommands: bool | Literal[0, 1] = 0) -> Command: ... - @overload - def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool | Literal[0, 1] = 0) -> _CommandT: ... - - def run_command(self, command: str) -> None: ... - def get_sub_commands(self) -> list[str]: ... - def warn(self, msg: str) -> None: ... - def execute( - self, func: Callable[[Unpack[_Ts]], Unused], args: tuple[Unpack[_Ts]], msg: str | None = None, level: int = 1 - ) -> None: ... - def mkpath(self, name: str, mode: int = 0o777) -> None: ... - - @overload - def copy_file( - self, - infile: StrPath, - outfile: _StrPathT, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - link: str | None = None, - level: Unused = 1, - ) -> tuple[_StrPathT | str, bool]: ... - @overload - def copy_file( - self, - infile: BytesPath, - outfile: _BytesPathT, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - link: str | None = None, - level: Unused = 1, - ) -> tuple[_BytesPathT | bytes, bool]: ... - - def copy_tree( - self, - infile: StrPath, - outfile: str, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - preserve_symlinks: bool | Literal[0, 1] = 0, - level: Unused = 1, - ) -> list[str]: ... - - @overload - def move_file(self, src: StrPath, dst: _StrPathT, level: Unused = 1) -> _StrPathT | str: ... - @overload - def move_file(self, src: BytesPath, dst: _BytesPathT, level: Unused = 1) -> _BytesPathT | bytes: ... - - def spawn(self, cmd: Iterable[str], search_path: bool | Literal[0, 1] = 1, level: Unused = 1) -> None: ... - - @overload - def make_archive( - self, - base_name: str, - format: str, - root_dir: StrOrBytesPath | None = None, - base_dir: str | None = None, - owner: str | None = None, - group: str | None = None, - ) -> str: ... - @overload - def make_archive( - self, - base_name: StrPath, - format: str, - root_dir: StrOrBytesPath, - base_dir: str | None = None, - owner: str | None = None, - group: str | None = None, - ) -> str: ... - - def make_file( - self, - infiles: str | list[str] | tuple[str, ...], - outfile: StrOrBytesPath, - func: Callable[[Unpack[_Ts]], Unused], - args: tuple[Unpack[_Ts]], - exec_msg: str | None = None, - skip_msg: str | None = None, - level: Unused = 1, - ) -> None: ... - def ensure_finalized(self) -> None: ... - def dump_options(self, header=None, indent: str = "") -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/__init__.vpi deleted file mode 100644 index 856c5eb8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/__init__.vpi +++ /dev/null @@ -1,41 +0,0 @@ -from . import ( - bdist, - bdist_dumb, - bdist_rpm, - build, - build_clib, - build_ext, - build_py, - build_scripts, - check, - clean, - install, - install_data, - install_headers, - install_lib, - install_scripts, - register, - sdist, - upload, -) - -__all__ = [ - "build", - "build_py", - "build_ext", - "build_clib", - "build_scripts", - "clean", - "install", - "install_lib", - "install_headers", - "install_scripts", - "install_data", - "sdist", - "register", - "bdist", - "bdist_dumb", - "bdist_rpm", - "check", - "upload", -] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist.vpi deleted file mode 100644 index 6f996207..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist.vpi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import ClassVar - -from ..cmd import Command - -def show_formats() -> None: ... - -class bdist(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - no_format_option: ClassVar[tuple[str, ...]] - default_format: ClassVar[dict[str, str]] - format_commands: ClassVar[list[str]] - format_command: ClassVar[dict[str, tuple[str, str]]] - bdist_base: Incomplete - plat_name: Incomplete - formats: Incomplete - dist_dir: Incomplete - skip_build: int - group: Incomplete - owner: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.vpi deleted file mode 100644 index 297a0c39..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_dumb.vpi +++ /dev/null @@ -1,22 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class bdist_dumb(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - default_format: ClassVar[dict[str, str]] - bdist_dir: Incomplete - plat_name: Incomplete - format: Incomplete - keep_temp: int - dist_dir: Incomplete - skip_build: Incomplete - relative: int - owner: Incomplete - group: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.vpi deleted file mode 100644 index d677f81d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_msi.vpi +++ /dev/null @@ -1,45 +0,0 @@ -import sys -from _typeshed import Incomplete -from typing import ClassVar, Literal - -from ..cmd import Command - -if sys.platform == "win32": - from msilib import Control, Dialog - - class PyDialog(Dialog): - def __init__(self, *args, **kw) -> None: ... - def title(self, title) -> None: ... - def back(self, title, next, name: str = "Back", active: bool | Literal[0, 1] = 1) -> Control: ... - def cancel(self, title, next, name: str = "Cancel", active: bool | Literal[0, 1] = 1) -> Control: ... - def next(self, title, next, name: str = "Next", active: bool | Literal[0, 1] = 1) -> Control: ... - def xbutton(self, name, title, next, xpos) -> Control: ... - - class bdist_msi(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - all_versions: Incomplete - other_version: str - def __init__(self, *args, **kw) -> None: ... - bdist_dir: Incomplete - plat_name: Incomplete - keep_temp: int - no_target_compile: int - no_target_optimize: int - target_version: Incomplete - dist_dir: Incomplete - skip_build: Incomplete - install_script: Incomplete - pre_install_script: Incomplete - versions: Incomplete - def initialize_options(self) -> None: ... - install_script_key: Incomplete - def finalize_options(self) -> None: ... - db: Incomplete - def run(self) -> None: ... - def add_files(self) -> None: ... - def add_find_python(self) -> None: ... - def add_scripts(self) -> None: ... - def add_ui(self) -> None: ... - def get_installer_filename(self, fullname): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_packager.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_packager.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.vpi deleted file mode 100644 index 83b41610..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/bdist_rpm.vpi +++ /dev/null @@ -1,53 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class bdist_rpm(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - negative_opt: ClassVar[dict[str, str]] - bdist_base: Incomplete - rpm_base: Incomplete - dist_dir: Incomplete - python: Incomplete - fix_python: Incomplete - spec_only: Incomplete - binary_only: Incomplete - source_only: Incomplete - use_bzip2: Incomplete - distribution_name: Incomplete - group: Incomplete - release: Incomplete - serial: Incomplete - vendor: Incomplete - packager: Incomplete - doc_files: Incomplete - changelog: Incomplete - icon: Incomplete - prep_script: Incomplete - build_script: Incomplete - install_script: Incomplete - clean_script: Incomplete - verify_script: Incomplete - pre_install: Incomplete - post_install: Incomplete - pre_uninstall: Incomplete - post_uninstall: Incomplete - prep: Incomplete - provides: Incomplete - requires: Incomplete - conflicts: Incomplete - build_requires: Incomplete - obsoletes: Incomplete - keep_temp: int - use_rpm_opt_flags: int - rpm3_mode: int - no_autoreq: int - force_arch: Incomplete - quiet: int - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def finalize_package_data(self) -> None: ... - def run(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build.vpi deleted file mode 100644 index 3ec0c961..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build.vpi +++ /dev/null @@ -1,34 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import Any, ClassVar - -from ..cmd import Command - -def show_compilers() -> None: ... - -class build(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - build_base: str - build_purelib: Incomplete - build_platlib: Incomplete - build_lib: Incomplete - build_temp: Incomplete - build_scripts: Incomplete - compiler: Incomplete - plat_name: Incomplete - debug: Incomplete - force: int - executable: Incomplete - parallel: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def has_pure_modules(self): ... - def has_c_libraries(self): ... - def has_ext_modules(self): ... - def has_scripts(self): ... - # Any to work around variance issues - sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_clib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_clib.vpi deleted file mode 100644 index 69cfbe71..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_clib.vpi +++ /dev/null @@ -1,29 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import ClassVar - -from ..cmd import Command - -def show_compilers() -> None: ... - -class build_clib(Command): - description: str - user_options: ClassVar[list[tuple[str, str, str]]] - boolean_options: ClassVar[list[str]] - help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - build_clib: Incomplete - build_temp: Incomplete - libraries: Incomplete - include_dirs: Incomplete - define: Incomplete - undef: Incomplete - debug: Incomplete - force: int - compiler: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def check_library_list(self, libraries) -> None: ... - def get_library_names(self): ... - def get_source_files(self): ... - def build_libraries(self, libraries) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_ext.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_ext.vpi deleted file mode 100644 index c5a9b5d5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_ext.vpi +++ /dev/null @@ -1,52 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import ClassVar - -from ..cmd import Command - -extension_name_re: Incomplete - -def show_compilers() -> None: ... - -class build_ext(Command): - description: str - sep_by: Incomplete - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - extensions: Incomplete - build_lib: Incomplete - plat_name: Incomplete - build_temp: Incomplete - inplace: int - package: Incomplete - include_dirs: Incomplete - define: Incomplete - undef: Incomplete - libraries: Incomplete - library_dirs: Incomplete - rpath: Incomplete - link_objects: Incomplete - debug: Incomplete - force: Incomplete - compiler: Incomplete - swig: Incomplete - swig_cpp: Incomplete - swig_opts: Incomplete - user: Incomplete - parallel: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def check_extensions_list(self, extensions) -> None: ... - def get_source_files(self): ... - def get_outputs(self): ... - def build_extensions(self) -> None: ... - def build_extension(self, ext) -> None: ... - def swig_sources(self, sources, extension): ... - def find_swig(self): ... - def get_ext_fullpath(self, ext_name: str) -> str: ... - def get_ext_fullname(self, ext_name: str) -> str: ... - def get_ext_filename(self, ext_name: str) -> str: ... - def get_export_symbols(self, ext): ... - def get_libraries(self, ext): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_py.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_py.vpi deleted file mode 100644 index 23ed230b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_py.vpi +++ /dev/null @@ -1,45 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar, Literal - -from ..cmd import Command -from ..util import Mixin2to3 as Mixin2to3 - -class build_py(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - negative_opt: ClassVar[dict[str, str]] - build_lib: Incomplete - py_modules: Incomplete - package: Incomplete - package_data: Incomplete - package_dir: Incomplete - compile: int - optimize: int - force: Incomplete - def initialize_options(self) -> None: ... - packages: Incomplete - data_files: Incomplete - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def get_data_files(self): ... - def find_data_files(self, package, src_dir): ... - def build_package_data(self) -> None: ... - def get_package_dir(self, package): ... - def check_package(self, package, package_dir): ... - def check_module(self, module, module_file): ... - def find_package_modules(self, package, package_dir): ... - def find_modules(self): ... - def find_all_modules(self): ... - def get_source_files(self): ... - def get_module_outfile(self, build_dir, package, module): ... - def get_outputs(self, include_bytecode: bool | Literal[0, 1] = 1) -> list[str]: ... - def build_module(self, module, module_file, package): ... - def build_modules(self) -> None: ... - def build_packages(self) -> None: ... - def byte_compile(self, files) -> None: ... - -class build_py_2to3(build_py, Mixin2to3): - updated_files: Incomplete - def run(self) -> None: ... - def build_module(self, module, module_file, package): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.vpi deleted file mode 100644 index 8372919b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/build_scripts.vpi +++ /dev/null @@ -1,25 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command -from ..util import Mixin2to3 as Mixin2to3 - -first_line_re: Incomplete - -class build_scripts(Command): - description: str - user_options: ClassVar[list[tuple[str, str, str]]] - boolean_options: ClassVar[list[str]] - build_dir: Incomplete - scripts: Incomplete - force: Incomplete - executable: Incomplete - outfiles: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def get_source_files(self): ... - def run(self) -> None: ... - def copy_scripts(self): ... - -class build_scripts_2to3(build_scripts, Mixin2to3): - def copy_scripts(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/check.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/check.vpi deleted file mode 100644 index f2034e65..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/check.vpi +++ /dev/null @@ -1,39 +0,0 @@ -from _typeshed import Incomplete -from typing import Any, ClassVar, Final, Literal, TypeAlias - -from ..cmd import Command - -_Reporter: TypeAlias = Any # really docutils.utils.Reporter - -# Only defined if docutils is installed. -# Depends on a third-party stub. Since distutils is deprecated anyway, -# it's easier to just suppress the "any subclassing" error. -class SilentReporter(_Reporter): - messages: Incomplete - def __init__( - self, - source, - report_level, - halt_level, - stream: Incomplete | None = ..., - debug: bool | Literal[0, 1] = 0, - encoding: str = ..., - error_handler: str = ..., - ) -> None: ... - def system_message(self, level, message, *children, **kwargs): ... - -HAS_DOCUTILS: Final[bool] - -class check(Command): - description: str - user_options: ClassVar[list[tuple[str, str, str]]] - boolean_options: ClassVar[list[str]] - restructuredtext: int - metadata: int - strict: int - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def warn(self, msg): ... - def run(self) -> None: ... - def check_metadata(self) -> None: ... - def check_restructuredtext(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/clean.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/clean.vpi deleted file mode 100644 index 0f3768d6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/clean.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class clean(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - build_base: Incomplete - build_lib: Incomplete - build_temp: Incomplete - build_scripts: Incomplete - bdist_base: Incomplete - all: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/config.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/config.vpi deleted file mode 100644 index 381e8e46..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/config.vpi +++ /dev/null @@ -1,84 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Sequence -from re import Pattern -from typing import ClassVar, Final, Literal - -from ..ccompiler import CCompiler -from ..cmd import Command - -LANG_EXT: Final[dict[str, str]] - -class config(Command): - description: str - # Tuple is full name, short name, description - user_options: ClassVar[list[tuple[str, str | None, str]]] - compiler: str | CCompiler - cc: str | None - include_dirs: Sequence[str] | None - libraries: Sequence[str] | None - library_dirs: Sequence[str] | None - noisy: int - dump_source: int - temp_files: Sequence[str] - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def try_cpp( - self, - body: str | None = None, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - lang: str = "c", - ) -> bool: ... - def search_cpp( - self, - pattern: Pattern[str] | str, - body: str | None = None, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - lang: str = "c", - ) -> bool: ... - def try_compile( - self, body: str, headers: Sequence[str] | None = None, include_dirs: Sequence[str] | None = None, lang: str = "c" - ) -> bool: ... - def try_link( - self, - body: str, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - libraries: Sequence[str] | None = None, - library_dirs: Sequence[str] | None = None, - lang: str = "c", - ) -> bool: ... - def try_run( - self, - body: str, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - libraries: Sequence[str] | None = None, - library_dirs: Sequence[str] | None = None, - lang: str = "c", - ) -> bool: ... - def check_func( - self, - func: str, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - libraries: Sequence[str] | None = None, - library_dirs: Sequence[str] | None = None, - decl: bool | Literal[0, 1] = 0, - call: bool | Literal[0, 1] = 0, - ) -> bool: ... - def check_lib( - self, - library: str, - library_dirs: Sequence[str] | None = None, - headers: Sequence[str] | None = None, - include_dirs: Sequence[str] | None = None, - other_libraries: list[str] = [], - ) -> bool: ... - def check_header( - self, header: str, include_dirs: Sequence[str] | None = None, library_dirs: Sequence[str] | None = None, lang: str = "c" - ) -> bool: ... - -def dump_file(filename: StrOrBytesPath, head=None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install.vpi deleted file mode 100644 index 7e11cf25..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install.vpi +++ /dev/null @@ -1,67 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Callable -from typing import Any, ClassVar, Final, Literal - -from ..cmd import Command - -HAS_USER_SITE: Final[bool] - -SCHEME_KEYS: Final[tuple[Literal["purelib"], Literal["platlib"], Literal["headers"], Literal["scripts"], Literal["data"]]] -INSTALL_SCHEMES: Final[dict[str, dict[str, str]]] - -class install(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - negative_opt: ClassVar[dict[str, str]] - prefix: str | None - exec_prefix: Incomplete - home: str | None - user: bool - install_base: Incomplete - install_platbase: Incomplete - root: str | None - install_purelib: Incomplete - install_platlib: Incomplete - install_headers: Incomplete - install_lib: str | None - install_scripts: Incomplete - install_data: Incomplete - install_userbase: Incomplete - install_usersite: Incomplete - compile: Incomplete - optimize: Incomplete - extra_path: Incomplete - install_path_file: int - force: int - skip_build: int - warn_dir: int - build_base: Incomplete - build_lib: Incomplete - record: Incomplete - def initialize_options(self) -> None: ... - config_vars: Incomplete - install_libbase: Incomplete - def finalize_options(self) -> None: ... - def dump_dirs(self, msg) -> None: ... - def finalize_unix(self) -> None: ... - def finalize_other(self) -> None: ... - def select_scheme(self, name) -> None: ... - def expand_basedirs(self) -> None: ... - def expand_dirs(self) -> None: ... - def convert_paths(self, *names) -> None: ... - path_file: Incomplete - extra_dirs: Incomplete - def handle_extra_path(self) -> None: ... - def change_roots(self, *names) -> None: ... - def create_home_path(self) -> None: ... - def run(self) -> None: ... - def create_path_file(self) -> None: ... - def get_outputs(self): ... - def get_inputs(self): ... - def has_lib(self): ... - def has_headers(self): ... - def has_scripts(self): ... - def has_data(self): ... - # Any to work around variance issues - sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_data.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_data.vpi deleted file mode 100644 index 609de62b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_data.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class install_data(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - install_dir: Incomplete - outfiles: Incomplete - root: Incomplete - force: int - data_files: Incomplete - warn_dir: int - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def get_inputs(self): ... - def get_outputs(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.vpi deleted file mode 100644 index 75bb906c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_egg_info.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class install_egg_info(Command): - description: ClassVar[str] - user_options: ClassVar[list[tuple[str, str, str]]] - install_dir: Incomplete - def initialize_options(self) -> None: ... - target: Incomplete - outputs: Incomplete - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def get_outputs(self) -> list[str]: ... - -def safe_name(name): ... -def safe_version(version): ... -def to_filename(name): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_headers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_headers.vpi deleted file mode 100644 index 3caad8a0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_headers.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class install_headers(Command): - description: str - user_options: ClassVar[list[tuple[str, str, str]]] - boolean_options: ClassVar[list[str]] - install_dir: Incomplete - force: int - outfiles: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def get_inputs(self): ... - def get_outputs(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_lib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_lib.vpi deleted file mode 100644 index a537e254..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_lib.vpi +++ /dev/null @@ -1,26 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar, Final - -from ..cmd import Command - -PYTHON_SOURCE_EXTENSION: Final = ".py" - -class install_lib(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - negative_opt: ClassVar[dict[str, str]] - install_dir: Incomplete - build_dir: Incomplete - force: int - compile: Incomplete - optimize: Incomplete - skip_build: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def build(self) -> None: ... - def install(self): ... - def byte_compile(self, files) -> None: ... - def get_outputs(self): ... - def get_inputs(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.vpi deleted file mode 100644 index 658594f3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/install_scripts.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..cmd import Command - -class install_scripts(Command): - description: str - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - install_dir: Incomplete - force: int - build_dir: Incomplete - skip_build: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - outfiles: Incomplete - def run(self) -> None: ... - def get_inputs(self): ... - def get_outputs(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/register.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/register.vpi deleted file mode 100644 index c3bd62aa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/register.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from collections.abc import Callable -from typing import Any, ClassVar - -from ..config import PyPIRCCommand - -class register(PyPIRCCommand): - description: str - # Any to work around variance issues - sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] - list_classifiers: int - strict: int - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def check_metadata(self) -> None: ... - def classifiers(self) -> None: ... - def verify_metadata(self) -> None: ... - def send_metadata(self) -> None: ... - def build_post_data(self, action): ... - def post_to_server(self, data, auth=None): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/sdist.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/sdist.vpi deleted file mode 100644 index 48a14071..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/sdist.vpi +++ /dev/null @@ -1,45 +0,0 @@ -from _typeshed import Incomplete, Unused -from collections.abc import Callable -from typing import Any, ClassVar - -from ..cmd import Command - -def show_formats() -> None: ... - -class sdist(Command): - description: str - def checking_metadata(self): ... - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], Unused]]]] - negative_opt: ClassVar[dict[str, str]] - # Any to work around variance issues - sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]] - READMES: ClassVar[tuple[str, ...]] - template: Incomplete - manifest: Incomplete - use_defaults: int - prune: int - manifest_only: int - force_manifest: int - formats: Incomplete - keep_temp: int - dist_dir: Incomplete - archive_files: Incomplete - metadata_check: int - owner: Incomplete - group: Incomplete - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - filelist: Incomplete - def run(self) -> None: ... - def check_metadata(self) -> None: ... - def get_file_list(self) -> None: ... - def add_defaults(self) -> None: ... - def read_template(self) -> None: ... - def prune_file_list(self) -> None: ... - def write_manifest(self) -> None: ... - def read_manifest(self) -> None: ... - def make_release_tree(self, base_dir, files) -> None: ... - def make_distribution(self) -> None: ... - def get_archive_files(self): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/upload.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/upload.vpi deleted file mode 100644 index afcfbaf4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/command/upload.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar - -from ..config import PyPIRCCommand - -class upload(PyPIRCCommand): - description: ClassVar[str] - username: str - password: str - show_response: int - sign: bool - identity: Incomplete - def initialize_options(self) -> None: ... - repository: Incomplete - realm: Incomplete - def finalize_options(self) -> None: ... - def run(self) -> None: ... - def upload_file(self, command: str, pyversion: str, filename: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/config.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/config.vpi deleted file mode 100644 index 5814a828..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/config.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from abc import abstractmethod -from distutils.cmd import Command -from typing import ClassVar - -DEFAULT_PYPIRC: str - -class PyPIRCCommand(Command): - DEFAULT_REPOSITORY: ClassVar[str] - DEFAULT_REALM: ClassVar[str] - repository: None - realm: None - user_options: ClassVar[list[tuple[str, str | None, str]]] - boolean_options: ClassVar[list[str]] - def initialize_options(self) -> None: ... - def finalize_options(self) -> None: ... - @abstractmethod - def run(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/core.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/core.vpi deleted file mode 100644 index 174f2499..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/core.vpi +++ /dev/null @@ -1,58 +0,0 @@ -from _typeshed import Incomplete, StrOrBytesPath -from collections.abc import Mapping -from distutils.cmd import Command as Command -from distutils.dist import Distribution as Distribution -from distutils.extension import Extension as Extension -from typing import Any, Final, Literal - -USAGE: Final[str] - -def gen_usage(script_name: StrOrBytesPath) -> str: ... - -setup_keywords: tuple[str, ...] -extension_keywords: tuple[str, ...] - -def setup( - *, - name: str = ..., - version: str = ..., - description: str = ..., - long_description: str = ..., - author: str = ..., - author_email: str = ..., - maintainer: str = ..., - maintainer_email: str = ..., - url: str = ..., - download_url: str = ..., - packages: list[str] = ..., - py_modules: list[str] = ..., - scripts: list[str] = ..., - ext_modules: list[Extension] = ..., - classifiers: list[str] = ..., - distclass: type[Distribution] = ..., - script_name: str = ..., - script_args: list[str] = ..., - options: Mapping[str, Incomplete] = ..., - license: str = ..., - keywords: list[str] | str = ..., - platforms: list[str] | str = ..., - cmdclass: Mapping[str, type[Command]] = ..., - data_files: list[tuple[str, list[str]]] = ..., - package_dir: Mapping[str, str] = ..., - obsoletes: list[str] = ..., - provides: list[str] = ..., - requires: list[str] = ..., - command_packages: list[str] = ..., - command_options: Mapping[str, Mapping[str, tuple[Incomplete, Incomplete]]] = ..., - package_data: Mapping[str, list[str]] = ..., - include_package_data: bool | Literal[0, 1] = ..., - libraries: list[str] = ..., - headers: list[str] = ..., - ext_package: str = ..., - include_dirs: list[str] = ..., - password: str = ..., - fullname: str = ..., - # Custom Distributions could accept more params - **attrs: Any, -) -> Distribution: ... -def run_setup(script_name: str, script_args: list[str] | None = None, stop_after: str = "run") -> Distribution: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cygwinccompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cygwinccompiler.vpi deleted file mode 100644 index 80924d63..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/cygwinccompiler.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from distutils.unixccompiler import UnixCCompiler -from distutils.version import LooseVersion -from re import Pattern -from typing import Final, Literal - -def get_msvcr() -> list[str] | None: ... - -class CygwinCCompiler(UnixCCompiler): ... -class Mingw32CCompiler(CygwinCCompiler): ... - -CONFIG_H_OK: Final = "ok" -CONFIG_H_NOTOK: Final = "not ok" -CONFIG_H_UNCERTAIN: Final = "uncertain" - -def check_config_h() -> tuple[Literal["ok", "not ok", "uncertain"], str]: ... - -RE_VERSION: Final[Pattern[bytes]] - -def get_versions() -> tuple[LooseVersion | None, ...]: ... -def is_cygwingcc() -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/debug.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/debug.vpi deleted file mode 100644 index 30095883..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/debug.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Final - -DEBUG: Final[str | None] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dep_util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dep_util.vpi deleted file mode 100644 index 058377ac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dep_util.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from _typeshed import StrOrBytesPath, SupportsLenAndGetItem -from collections.abc import Iterable -from typing import Literal, TypeVar - -_SourcesT = TypeVar("_SourcesT", bound=StrOrBytesPath) -_TargetsT = TypeVar("_TargetsT", bound=StrOrBytesPath) - -def newer(source: StrOrBytesPath, target: StrOrBytesPath) -> bool | Literal[1]: ... -def newer_pairwise( - sources: SupportsLenAndGetItem[_SourcesT], targets: SupportsLenAndGetItem[_TargetsT] -) -> tuple[list[_SourcesT], list[_TargetsT]]: ... -def newer_group( - sources: Iterable[StrOrBytesPath], target: StrOrBytesPath, missing: Literal["error", "ignore", "newer"] = "error" -) -> Literal[0, 1]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dir_util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dir_util.vpi deleted file mode 100644 index 23e2c3bc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dir_util.vpi +++ /dev/null @@ -1,23 +0,0 @@ -from _typeshed import StrOrBytesPath, StrPath -from collections.abc import Iterable -from typing import Literal - -def mkpath(name: str, mode: int = 0o777, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> list[str]: ... -def create_tree( - base_dir: StrPath, - files: Iterable[StrPath], - mode: int = 0o777, - verbose: bool | Literal[0, 1] = 1, - dry_run: bool | Literal[0, 1] = 0, -) -> None: ... -def copy_tree( - src: StrPath, - dst: str, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - preserve_symlinks: bool | Literal[0, 1] = 0, - update: bool | Literal[0, 1] = 0, - verbose: bool | Literal[0, 1] = 1, - dry_run: bool | Literal[0, 1] = 0, -) -> list[str]: ... -def remove_tree(directory: StrOrBytesPath, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dist.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dist.vpi deleted file mode 100644 index 58650e85..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/dist.vpi +++ /dev/null @@ -1,318 +0,0 @@ -from _typeshed import Incomplete, StrOrBytesPath, StrPath, SupportsWrite -from collections.abc import Iterable, MutableMapping -from distutils.cmd import Command -from distutils.command.bdist import bdist -from distutils.command.bdist_dumb import bdist_dumb -from distutils.command.bdist_rpm import bdist_rpm -from distutils.command.build import build -from distutils.command.build_clib import build_clib -from distutils.command.build_ext import build_ext -from distutils.command.build_py import build_py -from distutils.command.build_scripts import build_scripts -from distutils.command.check import check -from distutils.command.clean import clean -from distutils.command.config import config -from distutils.command.install import install -from distutils.command.install_data import install_data -from distutils.command.install_egg_info import install_egg_info -from distutils.command.install_headers import install_headers -from distutils.command.install_lib import install_lib -from distutils.command.install_scripts import install_scripts -from distutils.command.register import register -from distutils.command.sdist import sdist -from distutils.command.upload import upload -from re import Pattern -from typing import IO, ClassVar, Literal, TypeAlias, TypeVar, overload - -command_re: Pattern[str] - -_OptionsList: TypeAlias = list[tuple[str, str | None, str, int] | tuple[str, str | None, str]] -_CommandT = TypeVar("_CommandT", bound=Command) - -class DistributionMetadata: - def __init__(self, path: StrOrBytesPath | None = None) -> None: ... - name: str | None - version: str | None - author: str | None - author_email: str | None - maintainer: str | None - maintainer_email: str | None - url: str | None - license: str | None - description: str | None - long_description: str | None - keywords: str | list[str] | None - platforms: str | list[str] | None - classifiers: str | list[str] | None - download_url: str | None - provides: list[str] | None - requires: list[str] | None - obsoletes: list[str] | None - def read_pkg_file(self, file: IO[str]) -> None: ... - def write_pkg_info(self, base_dir: StrPath) -> None: ... - def write_pkg_file(self, file: SupportsWrite[str]) -> None: ... - def get_name(self) -> str: ... - def get_version(self) -> str: ... - def get_fullname(self) -> str: ... - def get_author(self) -> str: ... - def get_author_email(self) -> str: ... - def get_maintainer(self) -> str: ... - def get_maintainer_email(self) -> str: ... - def get_contact(self) -> str: ... - def get_contact_email(self) -> str: ... - def get_url(self) -> str: ... - def get_license(self) -> str: ... - def get_licence(self) -> str: ... - def get_description(self) -> str: ... - def get_long_description(self) -> str: ... - def get_keywords(self) -> str | list[str]: ... - def get_platforms(self) -> str | list[str]: ... - def get_classifiers(self) -> str | list[str]: ... - def get_download_url(self) -> str: ... - def get_requires(self) -> list[str]: ... - def set_requires(self, value: Iterable[str]) -> None: ... - def get_provides(self) -> list[str]: ... - def set_provides(self, value: Iterable[str]) -> None: ... - def get_obsoletes(self) -> list[str]: ... - def set_obsoletes(self, value: Iterable[str]) -> None: ... - -class Distribution: - cmdclass: dict[str, type[Command]] - metadata: DistributionMetadata - def __init__(self, attrs: MutableMapping[str, Incomplete] | None = None) -> None: ... - def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ... - def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ... - global_options: ClassVar[_OptionsList] - common_usage: ClassVar[str] - display_options: ClassVar[_OptionsList] - display_option_names: ClassVar[list[str]] - negative_opt: ClassVar[dict[str, str]] - verbose: bool | Literal[0, 1] - dry_run: bool | Literal[0, 1] - help: bool | Literal[0, 1] - command_packages: list[str] | None - script_name: str | None - script_args: list[str] | None - command_options: dict[str, dict[str, tuple[str, str]]] - dist_files: list[tuple[str, str, str]] - packages: Incomplete - package_data: dict[str, list[str]] - package_dir: Incomplete - py_modules: Incomplete - libraries: Incomplete - headers: Incomplete - ext_modules: Incomplete - ext_package: Incomplete - include_dirs: Incomplete - extra_path: Incomplete - scripts: Incomplete - data_files: Incomplete - password: str - command_obj: Incomplete - have_run: Incomplete - want_user_cfg: bool - def dump_option_dicts(self, header=None, commands=None, indent: str = "") -> None: ... - def find_config_files(self): ... - commands: Incomplete - def parse_command_line(self): ... - def finalize_options(self) -> None: ... - def handle_display_options(self, option_order): ... - def print_command_list(self, commands, header, max_length) -> None: ... - def print_commands(self) -> None: ... - def get_command_list(self): ... - def get_command_packages(self): ... - - # NOTE: This list comes directly from the distutils/command folder. Minus bdist_msi and bdist_wininst. - @overload - def get_command_obj(self, command: Literal["bdist"], create: Literal[1, True] = 1) -> bdist: ... - @overload - def get_command_obj(self, command: Literal["bdist_dumb"], create: Literal[1, True] = 1) -> bdist_dumb: ... - @overload - def get_command_obj(self, command: Literal["bdist_rpm"], create: Literal[1, True] = 1) -> bdist_rpm: ... - @overload - def get_command_obj(self, command: Literal["build"], create: Literal[1, True] = 1) -> build: ... - @overload - def get_command_obj(self, command: Literal["build_clib"], create: Literal[1, True] = 1) -> build_clib: ... - @overload - def get_command_obj(self, command: Literal["build_ext"], create: Literal[1, True] = 1) -> build_ext: ... - @overload - def get_command_obj(self, command: Literal["build_py"], create: Literal[1, True] = 1) -> build_py: ... - @overload - def get_command_obj(self, command: Literal["build_scripts"], create: Literal[1, True] = 1) -> build_scripts: ... - @overload - def get_command_obj(self, command: Literal["check"], create: Literal[1, True] = 1) -> check: ... - @overload - def get_command_obj(self, command: Literal["clean"], create: Literal[1, True] = 1) -> clean: ... - @overload - def get_command_obj(self, command: Literal["config"], create: Literal[1, True] = 1) -> config: ... - @overload - def get_command_obj(self, command: Literal["install"], create: Literal[1, True] = 1) -> install: ... - @overload - def get_command_obj(self, command: Literal["install_data"], create: Literal[1, True] = 1) -> install_data: ... - @overload - def get_command_obj(self, command: Literal["install_egg_info"], create: Literal[1, True] = 1) -> install_egg_info: ... - @overload - def get_command_obj(self, command: Literal["install_headers"], create: Literal[1, True] = 1) -> install_headers: ... - @overload - def get_command_obj(self, command: Literal["install_lib"], create: Literal[1, True] = 1) -> install_lib: ... - @overload - def get_command_obj(self, command: Literal["install_scripts"], create: Literal[1, True] = 1) -> install_scripts: ... - @overload - def get_command_obj(self, command: Literal["register"], create: Literal[1, True] = 1) -> register: ... - @overload - def get_command_obj(self, command: Literal["sdist"], create: Literal[1, True] = 1) -> sdist: ... - @overload - def get_command_obj(self, command: Literal["upload"], create: Literal[1, True] = 1) -> upload: ... - @overload - def get_command_obj(self, command: str, create: Literal[1, True] = 1) -> Command: ... - # Not replicating the overloads for "Command | None", user may use "isinstance" - @overload - def get_command_obj(self, command: str, create: Literal[0, False]) -> Command | None: ... - - @overload - def get_command_class(self, command: Literal["bdist"]) -> type[bdist]: ... - @overload - def get_command_class(self, command: Literal["bdist_dumb"]) -> type[bdist_dumb]: ... - @overload - def get_command_class(self, command: Literal["bdist_rpm"]) -> type[bdist_rpm]: ... - @overload - def get_command_class(self, command: Literal["build"]) -> type[build]: ... - @overload - def get_command_class(self, command: Literal["build_clib"]) -> type[build_clib]: ... - @overload - def get_command_class(self, command: Literal["build_ext"]) -> type[build_ext]: ... - @overload - def get_command_class(self, command: Literal["build_py"]) -> type[build_py]: ... - @overload - def get_command_class(self, command: Literal["build_scripts"]) -> type[build_scripts]: ... - @overload - def get_command_class(self, command: Literal["check"]) -> type[check]: ... - @overload - def get_command_class(self, command: Literal["clean"]) -> type[clean]: ... - @overload - def get_command_class(self, command: Literal["config"]) -> type[config]: ... - @overload - def get_command_class(self, command: Literal["install"]) -> type[install]: ... - @overload - def get_command_class(self, command: Literal["install_data"]) -> type[install_data]: ... - @overload - def get_command_class(self, command: Literal["install_egg_info"]) -> type[install_egg_info]: ... - @overload - def get_command_class(self, command: Literal["install_headers"]) -> type[install_headers]: ... - @overload - def get_command_class(self, command: Literal["install_lib"]) -> type[install_lib]: ... - @overload - def get_command_class(self, command: Literal["install_scripts"]) -> type[install_scripts]: ... - @overload - def get_command_class(self, command: Literal["register"]) -> type[register]: ... - @overload - def get_command_class(self, command: Literal["sdist"]) -> type[sdist]: ... - @overload - def get_command_class(self, command: Literal["upload"]) -> type[upload]: ... - @overload - def get_command_class(self, command: str) -> type[Command]: ... - - @overload - def reinitialize_command(self, command: Literal["bdist"], reinit_subcommands: bool = False) -> bdist: ... - @overload - def reinitialize_command(self, command: Literal["bdist_dumb"], reinit_subcommands: bool = False) -> bdist_dumb: ... - @overload - def reinitialize_command(self, command: Literal["bdist_rpm"], reinit_subcommands: bool = False) -> bdist_rpm: ... - @overload - def reinitialize_command(self, command: Literal["build"], reinit_subcommands: bool = False) -> build: ... - @overload - def reinitialize_command(self, command: Literal["build_clib"], reinit_subcommands: bool = False) -> build_clib: ... - @overload - def reinitialize_command(self, command: Literal["build_ext"], reinit_subcommands: bool = False) -> build_ext: ... - @overload - def reinitialize_command(self, command: Literal["build_py"], reinit_subcommands: bool = False) -> build_py: ... - @overload - def reinitialize_command(self, command: Literal["build_scripts"], reinit_subcommands: bool = False) -> build_scripts: ... - @overload - def reinitialize_command(self, command: Literal["check"], reinit_subcommands: bool = False) -> check: ... - @overload - def reinitialize_command(self, command: Literal["clean"], reinit_subcommands: bool = False) -> clean: ... - @overload - def reinitialize_command(self, command: Literal["config"], reinit_subcommands: bool = False) -> config: ... - @overload - def reinitialize_command(self, command: Literal["install"], reinit_subcommands: bool = False) -> install: ... - @overload - def reinitialize_command(self, command: Literal["install_data"], reinit_subcommands: bool = False) -> install_data: ... - @overload - def reinitialize_command( - self, command: Literal["install_egg_info"], reinit_subcommands: bool = False - ) -> install_egg_info: ... - @overload - def reinitialize_command(self, command: Literal["install_headers"], reinit_subcommands: bool = False) -> install_headers: ... - @overload - def reinitialize_command(self, command: Literal["install_lib"], reinit_subcommands: bool = False) -> install_lib: ... - @overload - def reinitialize_command(self, command: Literal["install_scripts"], reinit_subcommands: bool = False) -> install_scripts: ... - @overload - def reinitialize_command(self, command: Literal["register"], reinit_subcommands: bool = False) -> register: ... - @overload - def reinitialize_command(self, command: Literal["sdist"], reinit_subcommands: bool = False) -> sdist: ... - @overload - def reinitialize_command(self, command: Literal["upload"], reinit_subcommands: bool = False) -> upload: ... - @overload - def reinitialize_command(self, command: str, reinit_subcommands: bool = False) -> Command: ... - @overload - def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False) -> _CommandT: ... - - def announce(self, msg, level: int = 2) -> None: ... - def run_commands(self) -> None: ... - def run_command(self, command: str) -> None: ... - def has_pure_modules(self) -> bool: ... - def has_ext_modules(self) -> bool: ... - def has_c_libraries(self) -> bool: ... - def has_modules(self) -> bool: ... - def has_headers(self) -> bool: ... - def has_scripts(self) -> bool: ... - def has_data_files(self) -> bool: ... - def is_pure(self) -> bool: ... - - # Default getter methods generated in __init__ from self.metadata._METHOD_BASENAMES - def get_name(self) -> str: ... - def get_version(self) -> str: ... - def get_fullname(self) -> str: ... - def get_author(self) -> str: ... - def get_author_email(self) -> str: ... - def get_maintainer(self) -> str: ... - def get_maintainer_email(self) -> str: ... - def get_contact(self) -> str: ... - def get_contact_email(self) -> str: ... - def get_url(self) -> str: ... - def get_license(self) -> str: ... - def get_licence(self) -> str: ... - def get_description(self) -> str: ... - def get_long_description(self) -> str: ... - def get_keywords(self) -> str | list[str]: ... - def get_platforms(self) -> str | list[str]: ... - def get_classifiers(self) -> str | list[str]: ... - def get_download_url(self) -> str: ... - def get_requires(self) -> list[str]: ... - def get_provides(self) -> list[str]: ... - def get_obsoletes(self) -> list[str]: ... - - # Default attributes generated in __init__ from self.display_option_names - help_commands: bool | Literal[0] - name: str | Literal[0] - version: str | Literal[0] - fullname: str | Literal[0] - author: str | Literal[0] - author_email: str | Literal[0] - maintainer: str | Literal[0] - maintainer_email: str | Literal[0] - contact: str | Literal[0] - contact_email: str | Literal[0] - url: str | Literal[0] - license: str | Literal[0] - licence: str | Literal[0] - description: str | Literal[0] - long_description: str | Literal[0] - platforms: str | list[str] | Literal[0] - classifiers: str | list[str] | Literal[0] - keywords: str | list[str] | Literal[0] - provides: list[str] | Literal[0] - requires: list[str] | Literal[0] - obsoletes: list[str] | Literal[0] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/errors.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/errors.vpi deleted file mode 100644 index e483362b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/errors.vpi +++ /dev/null @@ -1,19 +0,0 @@ -class DistutilsError(Exception): ... -class DistutilsModuleError(DistutilsError): ... -class DistutilsClassError(DistutilsError): ... -class DistutilsGetoptError(DistutilsError): ... -class DistutilsArgError(DistutilsError): ... -class DistutilsFileError(DistutilsError): ... -class DistutilsOptionError(DistutilsError): ... -class DistutilsSetupError(DistutilsError): ... -class DistutilsPlatformError(DistutilsError): ... -class DistutilsExecError(DistutilsError): ... -class DistutilsInternalError(DistutilsError): ... -class DistutilsTemplateError(DistutilsError): ... -class DistutilsByteCompileError(DistutilsError): ... -class CCompilerError(Exception): ... -class PreprocessError(CCompilerError): ... -class CompileError(CCompilerError): ... -class LibError(CCompilerError): ... -class LinkError(CCompilerError): ... -class UnknownFileError(CCompilerError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/extension.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/extension.vpi deleted file mode 100644 index 789bbf6e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/extension.vpi +++ /dev/null @@ -1,36 +0,0 @@ -class Extension: - name: str - sources: list[str] - include_dirs: list[str] - define_macros: list[tuple[str, str | None]] - undef_macros: list[str] - library_dirs: list[str] - libraries: list[str] - runtime_library_dirs: list[str] - extra_objects: list[str] - extra_compile_args: list[str] - extra_link_args: list[str] - export_symbols: list[str] - swig_opts: list[str] - depends: list[str] - language: str | None - optional: bool | None - def __init__( - self, - name: str, - sources: list[str], - include_dirs: list[str] | None = None, - define_macros: list[tuple[str, str | None]] | None = None, - undef_macros: list[str] | None = None, - library_dirs: list[str] | None = None, - libraries: list[str] | None = None, - runtime_library_dirs: list[str] | None = None, - extra_objects: list[str] | None = None, - extra_compile_args: list[str] | None = None, - extra_link_args: list[str] | None = None, - export_symbols: list[str] | None = None, - swig_opts: list[str] | None = None, - depends: list[str] | None = None, - language: str | None = None, - optional: bool | None = None, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/fancy_getopt.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/fancy_getopt.vpi deleted file mode 100644 index 676ce1be..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/fancy_getopt.vpi +++ /dev/null @@ -1,45 +0,0 @@ -from collections.abc import Iterable, Mapping -from getopt import _SliceableT, _StrSequenceT_co -from re import Pattern -from typing import Any, Final, TypeAlias, overload - -_Option: TypeAlias = tuple[str, str | None, str] - -longopt_pat: Final = r"[a-zA-Z](?:[a-zA-Z0-9-]*)" -longopt_re: Final[Pattern[str]] -neg_alias_re: Final[Pattern[str]] -longopt_xlate: Final[dict[int, int]] - -class FancyGetopt: - def __init__(self, option_table: list[_Option] | None = None) -> None: ... - - # TODO: kinda wrong, `getopt(object=object())` is invalid - @overload - def getopt( - self, args: _SliceableT[_StrSequenceT_co] | None = None, object: None = None - ) -> tuple[_StrSequenceT_co, OptionDummy]: ... - @overload - def getopt( - self, args: _SliceableT[_StrSequenceT_co] | None, object: Any - ) -> _StrSequenceT_co: ... # object is an arbitrary non-slotted object - - def get_option_order(self) -> list[tuple[str, str]]: ... - def generate_help(self, header: str | None = None) -> list[str]: ... - -# Same note as FancyGetopt.getopt -@overload -def fancy_getopt( - options: list[_Option], negative_opt: Mapping[_Option, _Option], object: None, args: _SliceableT[_StrSequenceT_co] | None -) -> tuple[_StrSequenceT_co, OptionDummy]: ... -@overload -def fancy_getopt( - options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: _SliceableT[_StrSequenceT_co] | None -) -> _StrSequenceT_co: ... - -WS_TRANS: Final[dict[int, str]] - -def wrap_text(text: str, width: int) -> list[str]: ... -def translate_longopt(opt: str) -> str: ... - -class OptionDummy: - def __init__(self, options: Iterable[str] = []) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/file_util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/file_util.vpi deleted file mode 100644 index 9d5bf508..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/file_util.vpi +++ /dev/null @@ -1,40 +0,0 @@ -from _typeshed import BytesPath, StrOrBytesPath, StrPath -from collections.abc import Iterable -from typing import Literal, TypeVar, overload - -_StrPathT = TypeVar("_StrPathT", bound=StrPath) -_BytesPathT = TypeVar("_BytesPathT", bound=BytesPath) - -@overload -def copy_file( - src: StrPath, - dst: _StrPathT, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - update: bool | Literal[0, 1] = 0, - link: str | None = None, - verbose: bool | Literal[0, 1] = 1, - dry_run: bool | Literal[0, 1] = 0, -) -> tuple[_StrPathT | str, bool]: ... -@overload -def copy_file( - src: BytesPath, - dst: _BytesPathT, - preserve_mode: bool | Literal[0, 1] = 1, - preserve_times: bool | Literal[0, 1] = 1, - update: bool | Literal[0, 1] = 0, - link: str | None = None, - verbose: bool | Literal[0, 1] = 1, - dry_run: bool | Literal[0, 1] = 0, -) -> tuple[_BytesPathT | bytes, bool]: ... - -@overload -def move_file( - src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0 -) -> _StrPathT | str: ... -@overload -def move_file( - src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 1, dry_run: bool | Literal[0, 1] = 0 -) -> _BytesPathT | bytes: ... - -def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/filelist.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/filelist.vpi deleted file mode 100644 index c3347fe7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/filelist.vpi +++ /dev/null @@ -1,61 +0,0 @@ -from collections.abc import Iterable -from re import Pattern -from typing import Literal, overload - -# class is entirely undocumented -class FileList: - allfiles: Iterable[str] | None - files: list[str] - def __init__(self, warn: None = None, debug_print: None = None) -> None: ... - def set_allfiles(self, allfiles: Iterable[str]) -> None: ... - def findall(self, dir: str = ".") -> None: ... - def debug_print(self, msg: str) -> None: ... - def append(self, item: str) -> None: ... - def extend(self, items: Iterable[str]) -> None: ... - def sort(self) -> None: ... - def remove_duplicates(self) -> None: ... - def process_template_line(self, line: str) -> None: ... - - @overload - def include_pattern( - self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0 - ) -> bool: ... - @overload - def include_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ... - @overload - def include_pattern( - self, - pattern: str | Pattern[str], - anchor: bool | Literal[0, 1] = 1, - prefix: str | None = None, - is_regex: bool | Literal[0, 1] = 0, - ) -> bool: ... - - @overload - def exclude_pattern( - self, pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[0, False] = 0 - ) -> bool: ... - @overload - def exclude_pattern(self, pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> bool: ... - @overload - def exclude_pattern( - self, - pattern: str | Pattern[str], - anchor: bool | Literal[0, 1] = 1, - prefix: str | None = None, - is_regex: bool | Literal[0, 1] = 0, - ) -> bool: ... - -def findall(dir: str = ".") -> list[str]: ... -def glob_to_re(pattern: str) -> str: ... - -@overload -def translate_pattern( - pattern: str, anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: Literal[False, 0] = 0 -) -> Pattern[str]: ... -@overload -def translate_pattern(pattern: str | Pattern[str], *, is_regex: Literal[True, 1]) -> Pattern[str]: ... -@overload -def translate_pattern( - pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = 1, prefix: str | None = None, is_regex: bool | Literal[0, 1] = 0 -) -> Pattern[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/log.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/log.vpi deleted file mode 100644 index 7246dd6b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/log.vpi +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Any, Final - -DEBUG: Final = 1 -INFO: Final = 2 -WARN: Final = 3 -ERROR: Final = 4 -FATAL: Final = 5 - -class Log: - def __init__(self, threshold: int = 3) -> None: ... - # Arbitrary msg args' type depends on the format method - def log(self, level: int, msg: str, *args: Any) -> None: ... - def debug(self, msg: str, *args: Any) -> None: ... - def info(self, msg: str, *args: Any) -> None: ... - def warn(self, msg: str, *args: Any) -> None: ... - def error(self, msg: str, *args: Any) -> None: ... - def fatal(self, msg: str, *args: Any) -> None: ... - -def log(level: int, msg: str, *args: Any) -> None: ... -def debug(msg: str, *args: Any) -> None: ... -def info(msg: str, *args: Any) -> None: ... -def warn(msg: str, *args: Any) -> None: ... -def error(msg: str, *args: Any) -> None: ... -def fatal(msg: str, *args: Any) -> None: ... -def set_threshold(level: int) -> int: ... -def set_verbosity(v: int) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/msvccompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/msvccompiler.vpi deleted file mode 100644 index 80872a6b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/msvccompiler.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from distutils.ccompiler import CCompiler - -class MSVCCompiler(CCompiler): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/spawn.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/spawn.vpi deleted file mode 100644 index ae07a495..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/spawn.vpi +++ /dev/null @@ -1,10 +0,0 @@ -from collections.abc import Iterable -from typing import Literal - -def spawn( - cmd: Iterable[str], - search_path: bool | Literal[0, 1] = 1, - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, -) -> None: ... -def find_executable(executable: str, path: str | None = None) -> str | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/sysconfig.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/sysconfig.vpi deleted file mode 100644 index 7c8e0e7b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/sysconfig.vpi +++ /dev/null @@ -1,32 +0,0 @@ -from collections.abc import Mapping -from distutils.ccompiler import CCompiler -from typing import Final, Literal, overload -from typing_extensions import deprecated - -PREFIX: Final[str] -EXEC_PREFIX: Final[str] -BASE_PREFIX: Final[str] -BASE_EXEC_PREFIX: Final[str] -project_base: Final[str] -python_build: Final[bool] - -def expand_makefile_vars(s: str, vars: Mapping[str, str]) -> str: ... - -@overload -@deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11") -def get_config_var(name: Literal["SO"]) -> int | str | None: ... -@overload -def get_config_var(name: str) -> int | str | None: ... - -@overload -def get_config_vars() -> dict[str, str | int]: ... -@overload -def get_config_vars(arg: str, /, *args: str) -> list[str | int]: ... - -def get_config_h_filename() -> str: ... -def get_makefile_filename() -> str: ... -def get_python_inc(plat_specific: bool | Literal[0, 1] = 0, prefix: str | None = None) -> str: ... -def get_python_lib( - plat_specific: bool | Literal[0, 1] = 0, standard_lib: bool | Literal[0, 1] = 0, prefix: str | None = None -) -> str: ... -def customize_compiler(compiler: CCompiler) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/text_file.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/text_file.vpi deleted file mode 100644 index 54951af7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/text_file.vpi +++ /dev/null @@ -1,21 +0,0 @@ -from typing import IO, Literal - -class TextFile: - def __init__( - self, - filename: str | None = None, - file: IO[str] | None = None, - *, - strip_comments: bool | Literal[0, 1] = ..., - lstrip_ws: bool | Literal[0, 1] = ..., - rstrip_ws: bool | Literal[0, 1] = ..., - skip_blanks: bool | Literal[0, 1] = ..., - join_lines: bool | Literal[0, 1] = ..., - collapse_join: bool | Literal[0, 1] = ..., - ) -> None: ... - def open(self, filename: str) -> None: ... - def close(self) -> None: ... - def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = None) -> None: ... - def readline(self) -> str | None: ... - def readlines(self) -> list[str]: ... - def unreadline(self, line: str) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/unixccompiler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/unixccompiler.vpi deleted file mode 100644 index e1d44347..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/unixccompiler.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from distutils.ccompiler import CCompiler - -class UnixCCompiler(CCompiler): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/util.vpi deleted file mode 100644 index 0e1bb416..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/util.vpi +++ /dev/null @@ -1,53 +0,0 @@ -from _typeshed import StrPath, Unused -from collections.abc import Callable, Container, Iterable, Mapping -from typing import Any, Literal -from typing_extensions import TypeVarTuple, Unpack - -_Ts = TypeVarTuple("_Ts") - -def get_host_platform() -> str: ... -def get_platform() -> str: ... -def convert_path(pathname: str) -> str: ... -def change_root(new_root: StrPath, pathname: StrPath) -> str: ... -def check_environ() -> None: ... -def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ... -def split_quoted(s: str) -> list[str]: ... -def execute( - func: Callable[[Unpack[_Ts]], Unused], - args: tuple[Unpack[_Ts]], - msg: str | None = None, - verbose: bool | Literal[0, 1] = 0, - dry_run: bool | Literal[0, 1] = 0, -) -> None: ... -def strtobool(val: str) -> Literal[0, 1]: ... -def byte_compile( - py_files: list[str], - optimize: int = 0, - force: bool | Literal[0, 1] = 0, - prefix: str | None = None, - base_dir: str | None = None, - verbose: bool | Literal[0, 1] = 1, - dry_run: bool | Literal[0, 1] = 0, - direct: bool | None = None, -) -> None: ... -def rfc822_escape(header: str) -> str: ... -def run_2to3( - files: Iterable[str], - fixer_names: Iterable[str] | None = None, - options: Mapping[str, Any] | None = None, - explicit: Unused = None, -) -> None: ... -def copydir_run_2to3( - src: StrPath, - dest: StrPath, - template: str | None = None, - fixer_names: Iterable[str] | None = None, - options: Mapping[str, Any] | None = None, - explicit: Container[str] | None = None, -) -> list[str]: ... - -class Mixin2to3: - fixer_names: Iterable[str] | None - options: Mapping[str, Any] | None - explicit: Container[str] | None - def run_2to3(self, files: Iterable[str]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/version.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/version.vpi deleted file mode 100644 index 47da65ef..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/distutils/version.vpi +++ /dev/null @@ -1,36 +0,0 @@ -from abc import abstractmethod -from re import Pattern -from typing_extensions import Self - -class Version: - def __eq__(self, other: object) -> bool: ... - def __lt__(self, other: Self | str) -> bool: ... - def __le__(self, other: Self | str) -> bool: ... - def __gt__(self, other: Self | str) -> bool: ... - def __ge__(self, other: Self | str) -> bool: ... - @abstractmethod - def __init__(self, vstring: str | None = None) -> None: ... - @abstractmethod - def parse(self, vstring: str) -> Self: ... - @abstractmethod - def __str__(self) -> str: ... - @abstractmethod - def _cmp(self, other: Self | str) -> bool: ... - -class StrictVersion(Version): - version_re: Pattern[str] - version: tuple[int, int, int] - prerelease: tuple[str, int] | None - def __init__(self, vstring: str | None = None) -> None: ... - def parse(self, vstring: str) -> Self: ... - def __str__(self) -> str: ... # noqa: Y029 - def _cmp(self, other: Self | str) -> bool: ... - -class LooseVersion(Version): - component_re: Pattern[str] - vstring: str - version: tuple[str | int, ...] - def __init__(self, vstring: str | None = None) -> None: ... - def parse(self, vstring: str) -> Self: ... - def __str__(self) -> str: ... # noqa: Y029 - def _cmp(self, other: Self | str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/doctest.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/doctest.vpi deleted file mode 100644 index 32c68e3f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/doctest.vpi +++ /dev/null @@ -1,262 +0,0 @@ -import sys -import types -import unittest -from _typeshed import ExcInfo -from collections.abc import Callable -from typing import Any, Final, NamedTuple, TypeAlias, type_check_only -from typing_extensions import Self - -__all__ = [ - "register_optionflag", - "DONT_ACCEPT_TRUE_FOR_1", - "DONT_ACCEPT_BLANKLINE", - "NORMALIZE_WHITESPACE", - "ELLIPSIS", - "SKIP", - "IGNORE_EXCEPTION_DETAIL", - "COMPARISON_FLAGS", - "REPORT_UDIFF", - "REPORT_CDIFF", - "REPORT_NDIFF", - "REPORT_ONLY_FIRST_FAILURE", - "REPORTING_FLAGS", - "FAIL_FAST", - "Example", - "DocTest", - "DocTestParser", - "DocTestFinder", - "DocTestRunner", - "OutputChecker", - "DocTestFailure", - "UnexpectedException", - "DebugRunner", - "testmod", - "testfile", - "run_docstring_examples", - "DocTestSuite", - "DocFileSuite", - "set_unittest_reportflags", - "script_from_examples", - "testsource", - "debug_src", - "debug", -] - -if sys.version_info >= (3, 13): - @type_check_only - class _TestResultsBase(NamedTuple): - failed: int - attempted: int - - class TestResults(_TestResultsBase): - def __new__(cls, failed: int, attempted: int, *, skipped: int = 0) -> Self: ... - skipped: int - -else: - class TestResults(NamedTuple): - failed: int - attempted: int - -OPTIONFLAGS_BY_NAME: Final[dict[str, int]] - -def register_optionflag(name: str) -> int: ... - -DONT_ACCEPT_TRUE_FOR_1: Final = 1 -DONT_ACCEPT_BLANKLINE: Final = 2 -NORMALIZE_WHITESPACE: Final = 4 -ELLIPSIS: Final = 8 -SKIP: Final = 16 -IGNORE_EXCEPTION_DETAIL: Final = 32 - -COMPARISON_FLAGS: Final = 63 - -REPORT_UDIFF: Final = 64 -REPORT_CDIFF: Final = 128 -REPORT_NDIFF: Final = 256 -REPORT_ONLY_FIRST_FAILURE: Final = 512 -FAIL_FAST: Final = 1024 - -REPORTING_FLAGS: Final = 1984 - -BLANKLINE_MARKER: Final = "" -ELLIPSIS_MARKER: Final = "..." - -class Example: - source: str - want: str - exc_msg: str | None - lineno: int - indent: int - options: dict[int, bool] - def __init__( - self, - source: str, - want: str, - exc_msg: str | None = None, - lineno: int = 0, - indent: int = 0, - options: dict[int, bool] | None = None, - ) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - -class DocTest: - examples: list[Example] - globs: dict[str, Any] - name: str - filename: str | None - lineno: int | None - docstring: str | None - def __init__( - self, - examples: list[Example], - globs: dict[str, Any], - name: str, - filename: str | None, - lineno: int | None, - docstring: str | None, - ) -> None: ... - def __hash__(self) -> int: ... - def __lt__(self, other: DocTest) -> bool: ... - def __eq__(self, other: object) -> bool: ... - -class DocTestParser: - def parse(self, string: str, name: str = "") -> list[str | Example]: ... - def get_doctest(self, string: str, globs: dict[str, Any], name: str, filename: str | None, lineno: int | None) -> DocTest: ... - def get_examples(self, string: str, name: str = "") -> list[Example]: ... - -class DocTestFinder: - def __init__( - self, verbose: bool = False, parser: DocTestParser = ..., recurse: bool = True, exclude_empty: bool = True - ) -> None: ... - def find( - self, - obj: object, - name: str | None = None, - module: None | bool | types.ModuleType = None, - globs: dict[str, Any] | None = None, - extraglobs: dict[str, Any] | None = None, - ) -> list[DocTest]: ... - -_Out: TypeAlias = Callable[[str], object] - -class DocTestRunner: - DIVIDER: str - optionflags: int - original_optionflags: int - tries: int - failures: int - if sys.version_info >= (3, 13): - skips: int - test: DocTest - def __init__(self, checker: OutputChecker | None = None, verbose: bool | None = None, optionflags: int = 0) -> None: ... - def report_start(self, out: _Out, test: DocTest, example: Example) -> None: ... - def report_success(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ... - def report_failure(self, out: _Out, test: DocTest, example: Example, got: str) -> None: ... - def report_unexpected_exception(self, out: _Out, test: DocTest, example: Example, exc_info: ExcInfo) -> None: ... - def run( - self, test: DocTest, compileflags: int | None = None, out: _Out | None = None, clear_globs: bool = True - ) -> TestResults: ... - def summarize(self, verbose: bool | None = None) -> TestResults: ... - def merge(self, other: DocTestRunner) -> None: ... - -class OutputChecker: - def check_output(self, want: str, got: str, optionflags: int) -> bool: ... - def output_difference(self, example: Example, got: str, optionflags: int) -> str: ... - -class DocTestFailure(Exception): - test: DocTest - example: Example - got: str - def __init__(self, test: DocTest, example: Example, got: str) -> None: ... - -class UnexpectedException(Exception): - test: DocTest - example: Example - exc_info: ExcInfo - def __init__(self, test: DocTest, example: Example, exc_info: ExcInfo) -> None: ... - -class DebugRunner(DocTestRunner): ... - -master: DocTestRunner | None - -def testmod( - m: types.ModuleType | None = None, - name: str | None = None, - globs: dict[str, Any] | None = None, - verbose: bool | None = None, - report: bool = True, - optionflags: int = 0, - extraglobs: dict[str, Any] | None = None, - raise_on_error: bool = False, - exclude_empty: bool = False, -) -> TestResults: ... -def testfile( - filename: str, - module_relative: bool = True, - name: str | None = None, - package: None | str | types.ModuleType = None, - globs: dict[str, Any] | None = None, - verbose: bool | None = None, - report: bool = True, - optionflags: int = 0, - extraglobs: dict[str, Any] | None = None, - raise_on_error: bool = False, - parser: DocTestParser = ..., - encoding: str | None = None, -) -> TestResults: ... -def run_docstring_examples( - f: object, - globs: dict[str, Any], - verbose: bool = False, - name: str = "NoName", - compileflags: int | None = None, - optionflags: int = 0, -) -> None: ... -def set_unittest_reportflags(flags: int) -> int: ... - -class DocTestCase(unittest.TestCase): - def __init__( - self, - test: DocTest, - optionflags: int = 0, - setUp: Callable[[DocTest], object] | None = None, - tearDown: Callable[[DocTest], object] | None = None, - checker: OutputChecker | None = None, - ) -> None: ... - def runTest(self) -> None: ... - def format_failure(self, err: str) -> str: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - -class SkipDocTestCase(DocTestCase): - def __init__(self, module: types.ModuleType) -> None: ... - def test_skip(self) -> None: ... - -class _DocTestSuite(unittest.TestSuite): ... - -def DocTestSuite( - module: None | str | types.ModuleType = None, - globs: dict[str, Any] | None = None, - extraglobs: dict[str, Any] | None = None, - test_finder: DocTestFinder | None = None, - **options: Any, -) -> _DocTestSuite: ... - -class DocFileCase(DocTestCase): ... - -def DocFileTest( - path: str, - module_relative: bool = True, - package: None | str | types.ModuleType = None, - globs: dict[str, Any] | None = None, - parser: DocTestParser = ..., - encoding: str | None = None, - **options: Any, -) -> DocFileCase: ... -def DocFileSuite(*paths: str, **kw: Any) -> _DocTestSuite: ... -def script_from_examples(s: str) -> str: ... -def testsource(module: None | str | types.ModuleType, name: str) -> str: ... -def debug_src(src: str, pm: bool = False, globs: dict[str, Any] | None = None) -> None: ... -def debug_script(src: str, pm: bool = False, globs: dict[str, Any] | None = None) -> None: ... -def debug(module: None | str | types.ModuleType, name: str, pm: bool = False) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/__init__.vpi deleted file mode 100644 index 2523a7b8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/__init__.vpi +++ /dev/null @@ -1,62 +0,0 @@ -from collections.abc import Callable -from email._policybase import _MessageT -from email.message import Message -from email.policy import Policy -from typing import IO, TypeAlias, overload - -# At runtime, listing submodules in __all__ without them being imported is -# valid, and causes them to be included in a star import. See #6523 - -__all__ = [ # noqa: F822 # Undefined names in __all__ - "base64mime", # viper: ignore[reportUnsupportedDunderAll] - "charset", # viper: ignore[reportUnsupportedDunderAll] - "encoders", # viper: ignore[reportUnsupportedDunderAll] - "errors", # viper: ignore[reportUnsupportedDunderAll] - "feedparser", # viper: ignore[reportUnsupportedDunderAll] - "generator", # viper: ignore[reportUnsupportedDunderAll] - "header", # viper: ignore[reportUnsupportedDunderAll] - "iterators", # viper: ignore[reportUnsupportedDunderAll] - "message", # viper: ignore[reportUnsupportedDunderAll] - "message_from_file", - "message_from_binary_file", - "message_from_string", - "message_from_bytes", - "mime", # viper: ignore[reportUnsupportedDunderAll] - "parser", # viper: ignore[reportUnsupportedDunderAll] - "quoprimime", # viper: ignore[reportUnsupportedDunderAll] - "utils", # viper: ignore[reportUnsupportedDunderAll] -] - -# Definitions imported by multiple submodules in typeshed -_ParamType: TypeAlias = str | tuple[str | None, str | None, str] # noqa: Y047 -_ParamsType: TypeAlias = str | None | tuple[str, str | None, str] # noqa: Y047 - -@overload -def message_from_string(s: str) -> Message: ... -@overload -def message_from_string(s: str, _class: Callable[[], _MessageT]) -> _MessageT: ... -@overload -def message_from_string(s: str, _class: Callable[[], _MessageT] = ..., *, policy: Policy[_MessageT]) -> _MessageT: ... - -@overload -def message_from_bytes(s: bytes | bytearray) -> Message: ... -@overload -def message_from_bytes(s: bytes | bytearray, _class: Callable[[], _MessageT]) -> _MessageT: ... -@overload -def message_from_bytes( - s: bytes | bytearray, _class: Callable[[], _MessageT] = ..., *, policy: Policy[_MessageT] -) -> _MessageT: ... - -@overload -def message_from_file(fp: IO[str]) -> Message: ... -@overload -def message_from_file(fp: IO[str], _class: Callable[[], _MessageT]) -> _MessageT: ... -@overload -def message_from_file(fp: IO[str], _class: Callable[[], _MessageT] = ..., *, policy: Policy[_MessageT]) -> _MessageT: ... - -@overload -def message_from_binary_file(fp: IO[bytes]) -> Message: ... -@overload -def message_from_binary_file(fp: IO[bytes], _class: Callable[[], _MessageT]) -> _MessageT: ... -@overload -def message_from_binary_file(fp: IO[bytes], _class: Callable[[], _MessageT] = ..., *, policy: Policy[_MessageT]) -> _MessageT: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/_header_value_parser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/_header_value_parser.vpi deleted file mode 100644 index e75e7ba1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/_header_value_parser.vpi +++ /dev/null @@ -1,414 +0,0 @@ -import sys -from collections.abc import Iterable, Iterator -from email.errors import HeaderParseError, MessageDefect -from email.policy import Policy -from re import Pattern -from typing import Any, Final -from typing_extensions import Self - -WSP: Final[set[str]] -CFWS_LEADER: Final[set[str]] -SPECIALS: Final[set[str]] -ATOM_ENDS: Final[set[str]] -DOT_ATOM_ENDS: Final[set[str]] -PHRASE_ENDS: Final[set[str]] -TSPECIALS: Final[set[str]] -TOKEN_ENDS: Final[set[str]] -ASPECIALS: Final[set[str]] -ATTRIBUTE_ENDS: Final[set[str]] -EXTENDED_ATTRIBUTE_ENDS: Final[set[str]] -# Added in Python 3.10.15, 3.11.10, 3.12.5 -NLSET: Final[set[str]] -# Added in Python 3.10.15, 3.11.10, 3.12.5 -SPECIALSNL: Final[set[str]] - -# Added in Python 3.10.17, 3.11.12, 3.12.9, 3.13.2 -def make_quoted_pairs(value: Any) -> str: ... -def quote_string(value: Any) -> str: ... - -# Added in Python 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3 -def make_parenthesis_pairs(value: Any) -> str: ... - -rfc2047_matcher: Final[Pattern[str]] - -class TokenList(list[TokenList | Terminal]): - token_type: str | None - syntactic_break: bool - ew_combine_allowed: bool - defects: list[MessageDefect] - def __init__(self, *args: Any, **kw: Any) -> None: ... - @property - def value(self) -> str: ... - @property - def all_defects(self) -> list[MessageDefect]: ... - def startswith_fws(self) -> bool: ... - @property - def as_ew_allowed(self) -> bool: ... - @property - def comments(self) -> list[str]: ... - def fold(self, *, policy: Policy) -> str: ... - def pprint(self, indent: str = "") -> None: ... - def ppstr(self, indent: str = "") -> str: ... - -class WhiteSpaceTokenList(TokenList): ... - -class UnstructuredTokenList(TokenList): - token_type: str - -class Phrase(TokenList): - token_type: str - -class Word(TokenList): - token_type: str - -class CFWSList(WhiteSpaceTokenList): - token_type: str - -class Atom(TokenList): - token_type: str - -class Token(TokenList): - token_type: str - encode_as_ew: bool - -class EncodedWord(TokenList): - token_type: str - cte: str | None - charset: str | None - lang: str | None - -class QuotedString(TokenList): - token_type: str - @property - def content(self) -> str: ... - @property - def quoted_value(self) -> str: ... - @property - def stripped_value(self) -> str: ... - -class BareQuotedString(QuotedString): - token_type: str - -class Comment(WhiteSpaceTokenList): - token_type: str - def quote(self, value: Any) -> str: ... - @property - def content(self) -> str: ... - -class AddressList(TokenList): - token_type: str - @property - def addresses(self) -> list[Address]: ... - @property - def mailboxes(self) -> list[Mailbox]: ... - @property - def all_mailboxes(self) -> list[Mailbox]: ... - -class Address(TokenList): - token_type: str - @property - def display_name(self) -> str: ... - @property - def mailboxes(self) -> list[Mailbox]: ... - @property - def all_mailboxes(self) -> list[Mailbox]: ... - -class MailboxList(TokenList): - token_type: str - @property - def mailboxes(self) -> list[Mailbox]: ... - @property - def all_mailboxes(self) -> list[Mailbox]: ... - -class GroupList(TokenList): - token_type: str - @property - def mailboxes(self) -> list[Mailbox]: ... - @property - def all_mailboxes(self) -> list[Mailbox]: ... - -class Group(TokenList): - token_type: str - @property - def mailboxes(self) -> list[Mailbox]: ... - @property - def all_mailboxes(self) -> list[Mailbox]: ... - @property - def display_name(self) -> str: ... - -class NameAddr(TokenList): - token_type: str - @property - def display_name(self) -> str: ... - @property - def local_part(self) -> str: ... - @property - def domain(self) -> str: ... - @property - def route(self) -> list[Domain] | None: ... - @property - def addr_spec(self) -> str: ... - -class AngleAddr(TokenList): - token_type: str - @property - def local_part(self) -> str: ... - @property - def domain(self) -> str: ... - @property - def route(self) -> list[Domain] | None: ... - @property - def addr_spec(self) -> str: ... - -class ObsRoute(TokenList): - token_type: str - @property - def domains(self) -> list[Domain]: ... - -class Mailbox(TokenList): - token_type: str - @property - def display_name(self) -> str: ... - @property - def local_part(self) -> str: ... - @property - def domain(self) -> str: ... - @property - def route(self) -> list[str]: ... - @property - def addr_spec(self) -> str: ... - -class InvalidMailbox(TokenList): - token_type: str - @property - def display_name(self) -> None: ... - @property - def local_part(self) -> None: ... - @property - def domain(self) -> None: ... - @property - def route(self) -> None: ... - @property - def addr_spec(self) -> None: ... - -class Domain(TokenList): - token_type: str - as_ew_allowed: bool - @property - def domain(self) -> str: ... - -class DotAtom(TokenList): - token_type: str - -class DotAtomText(TokenList): - token_type: str - as_ew_allowed: bool - -class NoFoldLiteral(TokenList): - token_type: str - as_ew_allowed: bool - -class AddrSpec(TokenList): - token_type: str - as_ew_allowed: bool - @property - def local_part(self) -> str: ... - @property - def domain(self) -> str: ... - @property - def addr_spec(self) -> str: ... - -class ObsLocalPart(TokenList): - token_type: str - as_ew_allowed: bool - -class DisplayName(Phrase): - token_type: str - @property - def display_name(self) -> str: ... - -class LocalPart(TokenList): - token_type: str - as_ew_allowed: bool - @property - def local_part(self) -> str: ... - -class DomainLiteral(TokenList): - token_type: str - as_ew_allowed: bool - @property - def domain(self) -> str: ... - @property - def ip(self) -> str: ... - -class MIMEVersion(TokenList): - token_type: str - major: int | None - minor: int | None - -class Parameter(TokenList): - token_type: str - sectioned: bool - extended: bool - charset: str - @property - def section_number(self) -> int: ... - @property - def param_value(self) -> str: ... - -class InvalidParameter(Parameter): - token_type: str - -class Attribute(TokenList): - token_type: str - @property - def stripped_value(self) -> str: ... - -class Section(TokenList): - token_type: str - number: int | None - -class Value(TokenList): - token_type: str - @property - def stripped_value(self) -> str: ... - -class MimeParameters(TokenList): - token_type: str - syntactic_break: bool - @property - def params(self) -> Iterator[tuple[str, str]]: ... - -class ParameterizedHeaderValue(TokenList): - syntactic_break: bool - @property - def params(self) -> Iterable[tuple[str, str]]: ... - -class ContentType(ParameterizedHeaderValue): - token_type: str - as_ew_allowed: bool - maintype: str - subtype: str - -class ContentDisposition(ParameterizedHeaderValue): - token_type: str - as_ew_allowed: bool - content_disposition: Any - -class ContentTransferEncoding(TokenList): - token_type: str - as_ew_allowed: bool - cte: str - -class HeaderLabel(TokenList): - token_type: str - as_ew_allowed: bool - -class MsgID(TokenList): - token_type: str - as_ew_allowed: bool - def fold(self, policy: Policy) -> str: ... - -class MessageID(MsgID): - token_type: str - -class InvalidMessageID(MessageID): - token_type: str - -if sys.version_info >= (3, 13): - # Added in Python 3.13.12, 3.14.3 - class MessageIDList(TokenList): - token_type: str - @property - def message_ids(self) -> list[MsgID | Terminal]: ... - -class Header(TokenList): - token_type: str - -class Terminal(str): - as_ew_allowed: bool - ew_combine_allowed: bool - syntactic_break: bool - token_type: str - defects: list[MessageDefect] - def __new__(cls, value: str, token_type: str) -> Self: ... - def pprint(self) -> None: ... - @property - def all_defects(self) -> list[MessageDefect]: ... - def pop_trailing_ws(self) -> None: ... - @property - def comments(self) -> list[str]: ... - def __getnewargs__(self) -> tuple[str, str]: ... # type: ignore[override] - -class WhiteSpaceTerminal(Terminal): - @property - def value(self) -> str: ... - def startswith_fws(self) -> bool: ... - -class ValueTerminal(Terminal): - @property - def value(self) -> ValueTerminal: ... - def startswith_fws(self) -> bool: ... - -class EWWhiteSpaceTerminal(WhiteSpaceTerminal): ... -class _InvalidEwError(HeaderParseError): ... - -DOT: Final[ValueTerminal] -ListSeparator: Final[ValueTerminal] -RouteComponentMarker: Final[ValueTerminal] - -def get_fws(value: str) -> tuple[WhiteSpaceTerminal, str]: ... -def get_encoded_word(value: str, terminal_type: str = "vtext") -> tuple[EncodedWord, str]: ... -def get_unstructured(value: str) -> UnstructuredTokenList: ... -def get_qp_ctext(value: str) -> tuple[WhiteSpaceTerminal, str]: ... -def get_qcontent(value: str) -> tuple[ValueTerminal, str]: ... -def get_atext(value: str) -> tuple[ValueTerminal, str]: ... -def get_bare_quoted_string(value: str) -> tuple[BareQuotedString, str]: ... -def get_comment(value: str) -> tuple[Comment, str]: ... -def get_cfws(value: str) -> tuple[CFWSList, str]: ... -def get_quoted_string(value: str) -> tuple[QuotedString, str]: ... -def get_atom(value: str) -> tuple[Atom, str]: ... -def get_dot_atom_text(value: str) -> tuple[DotAtomText, str]: ... -def get_dot_atom(value: str) -> tuple[DotAtom, str]: ... -def get_word(value: str) -> tuple[Any, str]: ... -def get_phrase(value: str) -> tuple[Phrase, str]: ... -def get_local_part(value: str) -> tuple[LocalPart, str]: ... -def get_obs_local_part(value: str) -> tuple[ObsLocalPart, str]: ... -def get_dtext(value: str) -> tuple[ValueTerminal, str]: ... -def get_domain_literal(value: str) -> tuple[DomainLiteral, str]: ... -def get_domain(value: str) -> tuple[Domain, str]: ... -def get_addr_spec(value: str) -> tuple[AddrSpec, str]: ... -def get_obs_route(value: str) -> tuple[ObsRoute, str]: ... -def get_angle_addr(value: str) -> tuple[AngleAddr, str]: ... -def get_display_name(value: str) -> tuple[DisplayName, str]: ... -def get_name_addr(value: str) -> tuple[NameAddr, str]: ... -def get_mailbox(value: str) -> tuple[Mailbox, str]: ... -def get_invalid_mailbox(value: str, endchars: str) -> tuple[InvalidMailbox, str]: ... -def get_mailbox_list(value: str) -> tuple[MailboxList, str]: ... -def get_group_list(value: str) -> tuple[GroupList, str]: ... -def get_group(value: str) -> tuple[Group, str]: ... -def get_address(value: str) -> tuple[Address, str]: ... -def get_address_list(value: str) -> tuple[AddressList, str]: ... -def get_no_fold_literal(value: str) -> tuple[NoFoldLiteral, str]: ... -def get_msg_id(value: str) -> tuple[MsgID, str]: ... -def parse_message_id(value: str) -> MessageID: ... - -if sys.version_info >= (3, 13): - # Added in Python 3.13.12, 3.14.3 - def parse_message_ids(value: str) -> MessageIDList: ... - -def parse_mime_version(value: str) -> MIMEVersion: ... -def get_invalid_parameter(value: str) -> tuple[InvalidParameter, str]: ... -def get_ttext(value: str) -> tuple[ValueTerminal, str]: ... -def get_token(value: str) -> tuple[Token, str]: ... -def get_attrtext(value: str) -> tuple[ValueTerminal, str]: ... -def get_attribute(value: str) -> tuple[Attribute, str]: ... -def get_extended_attrtext(value: str) -> tuple[ValueTerminal, str]: ... -def get_extended_attribute(value: str) -> tuple[Attribute, str]: ... -def get_section(value: str) -> tuple[Section, str]: ... -def get_value(value: str) -> tuple[Value, str]: ... -def get_parameter(value: str) -> tuple[Parameter, str]: ... -def parse_mime_parameters(value: str) -> MimeParameters: ... -def parse_content_type_header(value: str) -> ContentType: ... -def parse_content_disposition_header(value: str) -> ContentDisposition: ... -def parse_content_transfer_encoding_header(value: str) -> ContentTransferEncoding: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/_policybase.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/_policybase.vpi deleted file mode 100644 index 0fb890d4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/_policybase.vpi +++ /dev/null @@ -1,80 +0,0 @@ -from abc import ABCMeta, abstractmethod -from email.errors import MessageDefect -from email.header import Header -from email.message import Message -from typing import Any, Generic, Protocol, TypeVar, type_check_only -from typing_extensions import Self - -__all__ = ["Policy", "Compat32", "compat32"] - -_MessageT = TypeVar("_MessageT", bound=Message[Any, Any], default=Message[str, str]) -_MessageT_co = TypeVar("_MessageT_co", covariant=True, bound=Message[Any, Any], default=Message[str, str]) - -@type_check_only -class _MessageFactory(Protocol[_MessageT]): - def __call__(self, policy: Policy[_MessageT]) -> _MessageT: ... - -# Policy below is the only known direct subclass of _PolicyBase. We therefore -# assume that the __init__ arguments and attributes of _PolicyBase are -# the same as those of Policy. -class _PolicyBase(Generic[_MessageT_co]): - max_line_length: int | None - linesep: str - cte_type: str - raise_on_defect: bool - mangle_from_: bool - message_factory: _MessageFactory[_MessageT_co] | None - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool - - def __init__( - self, - *, - max_line_length: int | None = 78, - linesep: str = "\n", - cte_type: str = "8bit", - raise_on_defect: bool = False, - mangle_from_: bool = ..., # default depends on sub-class - message_factory: _MessageFactory[_MessageT_co] | None = None, - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool = True, - ) -> None: ... - def clone( - self, - *, - max_line_length: int | None = ..., - linesep: str = ..., - cte_type: str = ..., - raise_on_defect: bool = ..., - mangle_from_: bool = ..., - message_factory: _MessageFactory[_MessageT_co] | None = ..., - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool = ..., - ) -> Self: ... - def __add__(self, other: Policy) -> Self: ... - -class Policy(_PolicyBase[_MessageT_co], metaclass=ABCMeta): - # Every Message object has a `defects` attribute, so the following - # methods will work for any Message object. - def handle_defect(self, obj: Message[Any, Any], defect: MessageDefect) -> None: ... - def register_defect(self, obj: Message[Any, Any], defect: MessageDefect) -> None: ... - def header_max_count(self, name: str) -> int | None: ... - @abstractmethod - def header_source_parse(self, sourcelines: list[str]) -> tuple[str, str]: ... - @abstractmethod - def header_store_parse(self, name: str, value: str) -> tuple[str, str]: ... - @abstractmethod - def header_fetch_parse(self, name: str, value: str) -> str: ... - @abstractmethod - def fold(self, name: str, value: str) -> str: ... - @abstractmethod - def fold_binary(self, name: str, value: str) -> bytes: ... - -class Compat32(Policy[_MessageT_co]): - def header_source_parse(self, sourcelines: list[str]) -> tuple[str, str]: ... - def header_store_parse(self, name: str, value: str) -> tuple[str, str]: ... - def header_fetch_parse(self, name: str, value: str) -> str | Header: ... # type: ignore[override] - def fold(self, name: str, value: str) -> str: ... - def fold_binary(self, name: str, value: str) -> bytes: ... - -compat32: Compat32[Message[str, str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/base64mime.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/base64mime.vpi deleted file mode 100644 index 563cd7f6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/base64mime.vpi +++ /dev/null @@ -1,13 +0,0 @@ -__all__ = ["body_decode", "body_encode", "decode", "decodestring", "header_encode", "header_length"] - -from _typeshed import ReadableBuffer - -def header_length(bytearray: str | bytes | bytearray) -> int: ... -def header_encode(header_bytes: str | ReadableBuffer, charset: str = "iso-8859-1") -> str: ... - -# First argument should be a buffer that supports slicing and len(). -def body_encode(s: bytes | bytearray, maxlinelen: int = 76, eol: str = "\n") -> str: ... -def decode(string: str | ReadableBuffer) -> bytes: ... - -body_decode = decode -decodestring = decode diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/charset.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/charset.vpi deleted file mode 100644 index 353cdeb0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/charset.vpi +++ /dev/null @@ -1,44 +0,0 @@ -from collections.abc import Callable, Iterator -from email.message import Message -from typing import ClassVar, Final, overload - -__all__ = ["Charset", "add_alias", "add_charset", "add_codec"] - -QP: Final = 1 # undocumented -BASE64: Final = 2 # undocumented -SHORTEST: Final = 3 # undocumented -RFC2047_CHROME_LEN: Final = 7 # undocumented -DEFAULT_CHARSET: Final = "us-ascii" # undocumented -UNKNOWN8BIT: Final = "unknown-8bit" # undocumented -EMPTYSTRING: Final = "" # undocumented -CHARSETS: Final[dict[str, tuple[int | None, int | None, str | None]]] -ALIASES: Final[dict[str, str]] -CODEC_MAP: Final[dict[str, str | None]] # undocumented - -class Charset: - input_charset: str - header_encoding: int - body_encoding: int - output_charset: str | None - input_codec: str | None - output_codec: str | None - def __init__(self, input_charset: str = "us-ascii") -> None: ... - def get_body_encoding(self) -> str | Callable[[Message], None]: ... - def get_output_charset(self) -> str | None: ... - def header_encode(self, string: str) -> str: ... - def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> list[str | None]: ... - - @overload - def body_encode(self, string: None) -> None: ... - @overload - def body_encode(self, string: str | bytes) -> str: ... - - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... - def __ne__(self, value: object, /) -> bool: ... - -def add_charset( - charset: str, header_enc: int | None = None, body_enc: int | None = None, output_charset: str | None = None -) -> None: ... -def add_alias(alias: str, canonical: str) -> None: ... -def add_codec(charset: str, codecname: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/contentmanager.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/contentmanager.vpi deleted file mode 100644 index 3214f1a4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/contentmanager.vpi +++ /dev/null @@ -1,11 +0,0 @@ -from collections.abc import Callable -from email.message import Message -from typing import Any - -class ContentManager: - def get_content(self, msg: Message, *args: Any, **kw: Any) -> Any: ... - def set_content(self, msg: Message, obj: Any, *args: Any, **kw: Any) -> Any: ... - def add_get_handler(self, key: str, handler: Callable[..., Any]) -> None: ... - def add_set_handler(self, typekey: type, handler: Callable[..., Any]) -> None: ... - -raw_data_manager: ContentManager diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/encoders.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/encoders.vpi deleted file mode 100644 index 55223bdc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/encoders.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from email.message import Message - -__all__ = ["encode_7or8bit", "encode_base64", "encode_noop", "encode_quopri"] - -def encode_base64(msg: Message) -> None: ... -def encode_quopri(msg: Message) -> None: ... -def encode_7or8bit(msg: Message) -> None: ... -def encode_noop(msg: Message) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/errors.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/errors.vpi deleted file mode 100644 index 4da60250..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/errors.vpi +++ /dev/null @@ -1,38 +0,0 @@ -class MessageError(Exception): ... -class MessageParseError(MessageError): ... -class HeaderParseError(MessageParseError): ... -class BoundaryError(MessageParseError): ... -class MultipartConversionError(MessageError, TypeError): ... -class CharsetError(MessageError): ... - -# Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 -class HeaderWriteError(MessageError): ... - -class MessageDefect(ValueError): - def __init__(self, line: str | None = None) -> None: ... - -class NoBoundaryInMultipartDefect(MessageDefect): ... -class StartBoundaryNotFoundDefect(MessageDefect): ... -class FirstHeaderLineIsContinuationDefect(MessageDefect): ... -class MisplacedEnvelopeHeaderDefect(MessageDefect): ... -class MultipartInvariantViolationDefect(MessageDefect): ... -class InvalidMultipartContentTransferEncodingDefect(MessageDefect): ... -class UndecodableBytesDefect(MessageDefect): ... -class InvalidBase64PaddingDefect(MessageDefect): ... -class InvalidBase64CharactersDefect(MessageDefect): ... -class InvalidBase64LengthDefect(MessageDefect): ... -class CloseBoundaryNotFoundDefect(MessageDefect): ... -class MissingHeaderBodySeparatorDefect(MessageDefect): ... - -MalformedHeaderDefect = MissingHeaderBodySeparatorDefect - -class HeaderDefect(MessageDefect): ... -class InvalidHeaderDefect(HeaderDefect): ... -class HeaderMissingRequiredValue(HeaderDefect): ... - -class NonPrintableDefect(HeaderDefect): - def __init__(self, non_printables: str | None) -> None: ... - -class ObsoleteHeaderDefect(HeaderDefect): ... -class NonASCIILocalPartDefect(HeaderDefect): ... -class InvalidDateDefect(HeaderDefect): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/feedparser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/feedparser.vpi deleted file mode 100644 index ec92eef6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/feedparser.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from collections.abc import Callable -from email._policybase import _MessageT -from email.message import Message -from email.policy import Policy -from typing import Generic, overload - -__all__ = ["FeedParser", "BytesFeedParser"] - -class FeedParser(Generic[_MessageT]): - @overload - def __init__(self: FeedParser[Message], _factory: None = None, *, policy: Policy[Message] = ...) -> None: ... - @overload - def __init__(self, _factory: Callable[[], _MessageT], *, policy: Policy[_MessageT] = ...) -> None: ... - - def feed(self, data: str) -> None: ... - def close(self) -> _MessageT: ... - -class BytesFeedParser(FeedParser[_MessageT]): - @overload - def __init__(self: BytesFeedParser[Message], _factory: None = None, *, policy: Policy[Message] = ...) -> None: ... - @overload - def __init__(self, _factory: Callable[[], _MessageT], *, policy: Policy[_MessageT] = ...) -> None: ... - - def feed(self, data: bytes | bytearray) -> None: ... # type: ignore[override] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/generator.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/generator.vpi deleted file mode 100644 index c2a9bb09..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/generator.vpi +++ /dev/null @@ -1,79 +0,0 @@ -from _typeshed import SupportsWrite -from email.message import Message -from email.policy import Policy -from typing import Any, Generic, TypeVar, overload -from typing_extensions import Self - -__all__ = ["Generator", "DecodedGenerator", "BytesGenerator"] - -# By default, generators do not have a message policy. -_MessageT = TypeVar("_MessageT", bound=Message[Any, Any], default=Any) - -class Generator(Generic[_MessageT]): - maxheaderlen: int | None - policy: Policy[_MessageT] | None - - @overload - def __init__( - self: Generator[Any], # The Policy of the message is used. - outfp: SupportsWrite[str], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - *, - policy: None = None, - ) -> None: ... - @overload - def __init__( - self, - outfp: SupportsWrite[str], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - *, - policy: Policy[_MessageT], - ) -> None: ... - - def write(self, s: str) -> None: ... - def flatten(self, msg: _MessageT, unixfrom: bool = False, linesep: str | None = None) -> None: ... - def clone(self, fp: SupportsWrite[str]) -> Self: ... - -class BytesGenerator(Generator[_MessageT]): - @overload - def __init__( - self: BytesGenerator[Any], # The Policy of the message is used. - outfp: SupportsWrite[bytes], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - *, - policy: None = None, - ) -> None: ... - @overload - def __init__( - self, - outfp: SupportsWrite[bytes], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - *, - policy: Policy[_MessageT], - ) -> None: ... - -class DecodedGenerator(Generator[_MessageT]): - @overload - def __init__( - self: DecodedGenerator[Any], # The Policy of the message is used. - outfp: SupportsWrite[str], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - fmt: str | None = None, - *, - policy: None = None, - ) -> None: ... - @overload - def __init__( - self, - outfp: SupportsWrite[str], - mangle_from_: bool | None = None, - maxheaderlen: int | None = None, - fmt: str | None = None, - *, - policy: Policy[_MessageT], - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/header.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/header.vpi deleted file mode 100644 index a26bbb51..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/header.vpi +++ /dev/null @@ -1,32 +0,0 @@ -from collections.abc import Iterable -from email.charset import Charset -from typing import Any, ClassVar - -__all__ = ["Header", "decode_header", "make_header"] - -class Header: - def __init__( - self, - s: bytes | bytearray | str | None = None, - charset: Charset | str | None = None, - maxlinelen: int | None = None, - header_name: str | None = None, - continuation_ws: str = " ", - errors: str = "strict", - ) -> None: ... - def append(self, s: bytes | bytearray | str, charset: Charset | str | None = None, errors: str = "strict") -> None: ... - def encode(self, splitchars: str = ";, \t", maxlinelen: int | None = None, linesep: str = "\n") -> str: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... - def __ne__(self, value: object, /) -> bool: ... - -# decode_header() either returns list[tuple[str, None]] if the header -# contains no encoded parts, or list[tuple[bytes, str | None]] if the header -# contains at least one encoded part. -def decode_header(header: Header | str) -> list[tuple[Any, Any | None]]: ... -def make_header( - decoded_seq: Iterable[tuple[bytes | bytearray | str, str | None]], - maxlinelen: int | None = None, - header_name: str | None = None, - continuation_ws: str = " ", -) -> Header: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/headerregistry.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/headerregistry.vpi deleted file mode 100644 index 8033f0ab..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/headerregistry.vpi +++ /dev/null @@ -1,193 +0,0 @@ -import sys -import types -from collections.abc import Iterable, Mapping -from datetime import datetime as _datetime -from email._header_value_parser import ( - AddressList, - ContentDisposition, - ContentTransferEncoding, - ContentType, - MessageID, - MIMEVersion, - TokenList, - UnstructuredTokenList, -) -from email.errors import MessageDefect -from email.policy import Policy -from typing import Any, ClassVar, Literal, Protocol, type_check_only -from typing_extensions import Self - -class BaseHeader(str): - # max_count is actually more of an abstract ClassVar (not defined on the base class, but expected to be defined in subclasses) - max_count: ClassVar[Literal[1] | None] - @property - def name(self) -> str: ... - @property - def defects(self) -> tuple[MessageDefect, ...]: ... - def __new__(cls, name: str, value: Any) -> Self: ... - def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect]) -> None: ... - def fold(self, *, policy: Policy) -> str: ... - -class UnstructuredHeader: - max_count: ClassVar[Literal[1] | None] - @staticmethod - def value_parser(value: str) -> UnstructuredTokenList: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - -class UniqueUnstructuredHeader(UnstructuredHeader): - max_count: ClassVar[Literal[1]] - -class DateHeader: - max_count: ClassVar[Literal[1] | None] - def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect], datetime: _datetime) -> None: ... - @property - def datetime(self) -> _datetime | None: ... - @staticmethod - def value_parser(value: str) -> UnstructuredTokenList: ... - @classmethod - def parse(cls, value: str | _datetime, kwds: dict[str, Any]) -> None: ... - -class UniqueDateHeader(DateHeader): - max_count: ClassVar[Literal[1]] - -class AddressHeader: - max_count: ClassVar[Literal[1] | None] - def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect], groups: Iterable[Group]) -> None: ... - @property - def groups(self) -> tuple[Group, ...]: ... - @property - def addresses(self) -> tuple[Address, ...]: ... - @staticmethod - def value_parser(value: str) -> AddressList: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - -class UniqueAddressHeader(AddressHeader): - max_count: ClassVar[Literal[1]] - -class SingleAddressHeader(AddressHeader): - @property - def address(self) -> Address: ... - -class UniqueSingleAddressHeader(SingleAddressHeader): - max_count: ClassVar[Literal[1]] - -class MIMEVersionHeader: - max_count: ClassVar[Literal[1]] - def init( - self, - name: str, - *, - parse_tree: TokenList, - defects: Iterable[MessageDefect], - version: str | None, - major: int | None, - minor: int | None, - ) -> None: ... - @property - def version(self) -> str | None: ... - @property - def major(self) -> int | None: ... - @property - def minor(self) -> int | None: ... - @staticmethod - def value_parser(value: str) -> MIMEVersion: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - -class ParameterizedMIMEHeader: - max_count: ClassVar[Literal[1]] - def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect], params: Mapping[str, Any]) -> None: ... - @property - def params(self) -> types.MappingProxyType[str, Any]: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - -class ContentTypeHeader(ParameterizedMIMEHeader): - @property - def content_type(self) -> str: ... - @property - def maintype(self) -> str: ... - @property - def subtype(self) -> str: ... - @staticmethod - def value_parser(value: str) -> ContentType: ... - -class ContentDispositionHeader(ParameterizedMIMEHeader): - # init is redefined but has the same signature as parent class, so is omitted from the stub - @property - def content_disposition(self) -> str | None: ... - @staticmethod - def value_parser(value: str) -> ContentDisposition: ... - -class ContentTransferEncodingHeader: - max_count: ClassVar[Literal[1]] - def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect]) -> None: ... - @property - def cte(self) -> str: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - @staticmethod - def value_parser(value: str) -> ContentTransferEncoding: ... - -class MessageIDHeader: - max_count: ClassVar[Literal[1]] - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - @staticmethod - def value_parser(value: str) -> MessageID: ... - -if sys.version_info >= (3, 13): - from email._header_value_parser import MessageIDList - - # Added in Python 3.13.12, 3.14.3 - class ReferencesHeader: - max_count: ClassVar[Literal[1]] - @classmethod - def parse(cls, value: str, kwds: dict[str, Any]) -> None: ... - @staticmethod - def value_parser(value: str) -> MessageIDList: ... - -@type_check_only -class _HeaderParser(Protocol): - max_count: ClassVar[Literal[1] | None] - @staticmethod - def value_parser(value: str, /) -> TokenList: ... - @classmethod - def parse(cls, value: str, kwds: dict[str, Any], /) -> None: ... - -class HeaderRegistry: - registry: dict[str, type[_HeaderParser]] - base_class: type[BaseHeader] - default_class: type[_HeaderParser] - def __init__( - self, base_class: type[BaseHeader] = ..., default_class: type[_HeaderParser] = ..., use_default_map: bool = True - ) -> None: ... - def map_to_type(self, name: str, cls: type[BaseHeader]) -> None: ... - def __getitem__(self, name: str) -> type[BaseHeader]: ... - def __call__(self, name: str, value: Any) -> BaseHeader: ... - -class Address: - @property - def display_name(self) -> str: ... - @property - def username(self) -> str: ... - @property - def domain(self) -> str: ... - @property - def addr_spec(self) -> str: ... - def __init__( - self, display_name: str = "", username: str | None = "", domain: str | None = "", addr_spec: str | None = None - ) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... - -class Group: - @property - def display_name(self) -> str | None: ... - @property - def addresses(self) -> tuple[Address, ...]: ... - def __init__(self, display_name: str | None = None, addresses: Iterable[Address] | None = None) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/iterators.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/iterators.vpi deleted file mode 100644 index b9a8de83..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/iterators.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from _typeshed import SupportsWrite -from collections.abc import Iterator -from email.message import Message -from typing import TypeVar - -_T = TypeVar("_T", bound=Message) - -__all__ = ["body_line_iterator", "typed_subpart_iterator", "walk"] - -def body_line_iterator(msg: Message, decode: bool = False) -> Iterator[str]: ... -def typed_subpart_iterator(msg: _T, maintype: str = "text", subtype: str | None = None) -> Iterator[_T]: ... -def walk(self: Message) -> Iterator[Message]: ... - -# We include the seemingly private function because it is documented in the stdlib documentation. -def _structure(msg: Message, fp: SupportsWrite[str] | None = None, level: int = 0, include_default: bool = False) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/message.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/message.vpi deleted file mode 100644 index 784c2cac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/message.vpi +++ /dev/null @@ -1,191 +0,0 @@ -from _typeshed import MaybeNone -from collections.abc import Generator, Iterator, Sequence -from email import _ParamsType, _ParamType -from email.charset import Charset -from email.contentmanager import ContentManager -from email.errors import MessageDefect -from email.policy import Policy -from typing import Any, Generic, Literal, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self - -__all__ = ["Message", "EmailMessage"] - -_T = TypeVar("_T") -# Type returned by Policy.header_fetch_parse, often str or Header. -_HeaderT_co = TypeVar("_HeaderT_co", covariant=True, default=str) -_HeaderParamT_contra = TypeVar("_HeaderParamT_contra", contravariant=True, default=str) -# Represents headers constructed by HeaderRegistry. Those are sub-classes -# of BaseHeader and another header type. -_HeaderRegistryT_co = TypeVar("_HeaderRegistryT_co", covariant=True, default=Any) -_HeaderRegistryParamT_contra = TypeVar("_HeaderRegistryParamT_contra", contravariant=True, default=Any) - -_PayloadType: TypeAlias = Message | str -_EncodedPayloadType: TypeAlias = Message | bytes -_MultipartPayloadType: TypeAlias = list[_PayloadType] -_CharsetType: TypeAlias = Charset | str | None - -@type_check_only -class _SupportsEncodeToPayload(Protocol): - def encode(self, encoding: str, /) -> _PayloadType | _MultipartPayloadType | _SupportsDecodeToPayload: ... - -@type_check_only -class _SupportsDecodeToPayload(Protocol): - def decode(self, encoding: str, errors: str, /) -> _PayloadType | _MultipartPayloadType: ... - -class Message(Generic[_HeaderT_co, _HeaderParamT_contra]): - # The policy attributes and arguments in this class and its subclasses - # would ideally use Policy[Self], but this is not possible. - policy: Policy[Any] # undocumented - preamble: str | None - epilogue: str | None - defects: list[MessageDefect] - def __init__(self, policy: Policy[Any] = ...) -> None: ... - def is_multipart(self) -> bool: ... - def set_unixfrom(self, unixfrom: str) -> None: ... - def get_unixfrom(self) -> str | None: ... - def attach(self, payload: _PayloadType) -> None: ... - - # `i: int` without a multipart payload results in an error - # `| MaybeNone` acts like `| Any`: can be None for cleared or unset payload, but annoying to check - @overload # multipart - def get_payload(self, i: int, decode: Literal[True]) -> None: ... - @overload # multipart - def get_payload(self, i: int, decode: Literal[False] = False) -> _PayloadType | MaybeNone: ... - @overload # either - def get_payload(self, i: None = None, decode: Literal[False] = False) -> _PayloadType | _MultipartPayloadType | MaybeNone: ... - @overload # not multipart - def get_payload(self, i: None = None, *, decode: Literal[True]) -> _EncodedPayloadType | MaybeNone: ... - @overload # not multipart, IDEM but w/o kwarg - def get_payload(self, i: None, decode: Literal[True]) -> _EncodedPayloadType | MaybeNone: ... - - # If `charset=None` and payload supports both `encode` AND `decode`, - # then an invalid payload could be passed, but this is unlikely - # Not[_SupportsEncodeToPayload] - @overload - def set_payload( - self, payload: _SupportsDecodeToPayload | _PayloadType | _MultipartPayloadType, charset: None = None - ) -> None: ... - @overload - def set_payload( - self, - payload: _SupportsEncodeToPayload | _SupportsDecodeToPayload | _PayloadType | _MultipartPayloadType, - charset: Charset | str, - ) -> None: ... - - def set_charset(self, charset: _CharsetType) -> None: ... - def get_charset(self) -> _CharsetType: ... - def __len__(self) -> int: ... - def __contains__(self, name: str) -> bool: ... - def __iter__(self) -> Iterator[str]: ... - # Same as `get` with `failobj=None`, but with the expectation that it won't return None in most scenarios - # This is important for protocols using __getitem__, like SupportsKeysAndGetItem - # Morally, the return type should be `AnyOf[_HeaderType, None]`, - # so using "the Any trick" instead. - def __getitem__(self, name: str) -> _HeaderT_co | MaybeNone: ... - def __setitem__(self, name: str, val: _HeaderParamT_contra) -> None: ... - def __delitem__(self, name: str) -> None: ... - def keys(self) -> list[str]: ... - def values(self) -> list[_HeaderT_co]: ... - def items(self) -> list[tuple[str, _HeaderT_co]]: ... - - @overload - def get(self, name: str, failobj: None = None) -> _HeaderT_co | None: ... - @overload - def get(self, name: str, failobj: _T) -> _HeaderT_co | _T: ... - - @overload - def get_all(self, name: str, failobj: None = None) -> list[_HeaderT_co] | None: ... - @overload - def get_all(self, name: str, failobj: _T) -> list[_HeaderT_co] | _T: ... - - def add_header(self, _name: str, _value: str, **_params: _ParamsType) -> None: ... - def replace_header(self, _name: str, _value: _HeaderParamT_contra) -> None: ... - def get_content_type(self) -> str: ... - def get_content_maintype(self) -> str: ... - def get_content_subtype(self) -> str: ... - def get_default_type(self) -> str: ... - def set_default_type(self, ctype: str) -> None: ... - - @overload - def get_params( - self, failobj: None = None, header: str = "content-type", unquote: bool = True - ) -> list[tuple[str, str]] | None: ... - @overload - def get_params(self, failobj: _T, header: str = "content-type", unquote: bool = True) -> list[tuple[str, str]] | _T: ... - - @overload - def get_param( - self, param: str, failobj: None = None, header: str = "content-type", unquote: bool = True - ) -> _ParamType | None: ... - @overload - def get_param(self, param: str, failobj: _T, header: str = "content-type", unquote: bool = True) -> _ParamType | _T: ... - - def del_param(self, param: str, header: str = "content-type", requote: bool = True) -> None: ... - def set_type(self, type: str, header: str = "Content-Type", requote: bool = True) -> None: ... - - @overload - def get_filename(self, failobj: None = None) -> str | None: ... - @overload - def get_filename(self, failobj: _T) -> str | _T: ... - - @overload - def get_boundary(self, failobj: None = None) -> str | None: ... - @overload - def get_boundary(self, failobj: _T) -> str | _T: ... - - def set_boundary(self, boundary: str) -> None: ... - - @overload - def get_content_charset(self) -> str | None: ... - @overload - def get_content_charset(self, failobj: _T) -> str | _T: ... - - @overload - def get_charsets(self, failobj: None = None) -> list[str | None]: ... - @overload - def get_charsets(self, failobj: _T) -> list[str | _T]: ... - - def walk(self) -> Generator[Self]: ... - def get_content_disposition(self) -> str | None: ... - def as_string(self, unixfrom: bool = False, maxheaderlen: int = 0, policy: Policy[Any] | None = None) -> str: ... - def as_bytes(self, unixfrom: bool = False, policy: Policy[Any] | None = None) -> bytes: ... - def __bytes__(self) -> bytes: ... - def set_param( - self, - param: str, - value: str, - header: str = "Content-Type", - requote: bool = True, - charset: str | None = None, - language: str = "", - replace: bool = False, - ) -> None: ... - # The following two methods are undocumented, but a source code comment states that they are public API - def set_raw(self, name: str, value: _HeaderParamT_contra) -> None: ... - def raw_items(self) -> Iterator[tuple[str, _HeaderT_co]]: ... - -class MIMEPart(Message[_HeaderRegistryT_co, _HeaderRegistryParamT_contra]): - def __init__(self, policy: Policy[Any] | None = None) -> None: ... - def get_body( - self, preferencelist: Sequence[str] = ("related", "html", "plain") - ) -> MIMEPart[_HeaderRegistryT_co, _HeaderRegistryParamT_contra] | None: ... - def attach(self, payload: Self) -> None: ... # type: ignore[override] - # The attachments are created via type(self) in the attach method. It's theoretically - # possible to sneak other attachment types into a MIMEPart instance, but could cause - # cause unforseen consequences. - def iter_attachments(self) -> Iterator[Self]: ... - def iter_parts(self) -> Iterator[MIMEPart[_HeaderRegistryT_co, _HeaderRegistryParamT_contra]]: ... - def get_content(self, *args: Any, content_manager: ContentManager | None = None, **kw: Any) -> Any: ... - def set_content(self, *args: Any, content_manager: ContentManager | None = None, **kw: Any) -> None: ... - def make_related(self, boundary: str | None = None) -> None: ... - def make_alternative(self, boundary: str | None = None) -> None: ... - def make_mixed(self, boundary: str | None = None) -> None: ... - def add_related(self, *args: Any, content_manager: ContentManager | None = ..., **kw: Any) -> None: ... - def add_alternative(self, *args: Any, content_manager: ContentManager | None = ..., **kw: Any) -> None: ... - def add_attachment(self, *args: Any, content_manager: ContentManager | None = ..., **kw: Any) -> None: ... - def clear(self) -> None: ... - def clear_content(self) -> None: ... - def as_string(self, unixfrom: bool = False, maxheaderlen: int | None = None, policy: Policy[Any] | None = None) -> str: ... - def is_attachment(self) -> bool: ... - -class EmailMessage(MIMEPart[_HeaderRegistryT_co, _HeaderRegistryParamT_contra]): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/application.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/application.vpi deleted file mode 100644 index a7ab9dc7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/application.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from collections.abc import Callable -from email import _ParamsType -from email.mime.nonmultipart import MIMENonMultipart -from email.policy import Policy - -__all__ = ["MIMEApplication"] - -class MIMEApplication(MIMENonMultipart): - def __init__( - self, - _data: str | bytes | bytearray, - _subtype: str = "octet-stream", - _encoder: Callable[[MIMEApplication], object] = ..., - *, - policy: Policy | None = None, - **_params: _ParamsType, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/audio.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/audio.vpi deleted file mode 100644 index 090dfb96..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/audio.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from collections.abc import Callable -from email import _ParamsType -from email.mime.nonmultipart import MIMENonMultipart -from email.policy import Policy - -__all__ = ["MIMEAudio"] - -class MIMEAudio(MIMENonMultipart): - def __init__( - self, - _audiodata: str | bytes | bytearray, - _subtype: str | None = None, - _encoder: Callable[[MIMEAudio], object] = ..., - *, - policy: Policy | None = None, - **_params: _ParamsType, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/base.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/base.vpi deleted file mode 100644 index b733709f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/base.vpi +++ /dev/null @@ -1,8 +0,0 @@ -import email.message -from email import _ParamsType -from email.policy import Policy - -__all__ = ["MIMEBase"] - -class MIMEBase(email.message.Message): - def __init__(self, _maintype: str, _subtype: str, *, policy: Policy | None = None, **_params: _ParamsType) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/image.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/image.vpi deleted file mode 100644 index b47afa6c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/image.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from collections.abc import Callable -from email import _ParamsType -from email.mime.nonmultipart import MIMENonMultipart -from email.policy import Policy - -__all__ = ["MIMEImage"] - -class MIMEImage(MIMENonMultipart): - def __init__( - self, - _imagedata: str | bytes | bytearray, - _subtype: str | None = None, - _encoder: Callable[[MIMEImage], object] = ..., - *, - policy: Policy | None = None, - **_params: _ParamsType, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/message.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/message.vpi deleted file mode 100644 index a1e370e2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/message.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from email._policybase import _MessageT -from email.mime.nonmultipart import MIMENonMultipart -from email.policy import Policy - -__all__ = ["MIMEMessage"] - -class MIMEMessage(MIMENonMultipart): - def __init__(self, _msg: _MessageT, _subtype: str = "rfc822", *, policy: Policy[_MessageT] | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/multipart.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/multipart.vpi deleted file mode 100644 index fb9599ed..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/multipart.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from collections.abc import Sequence -from email import _ParamsType -from email._policybase import _MessageT -from email.mime.base import MIMEBase -from email.policy import Policy - -__all__ = ["MIMEMultipart"] - -class MIMEMultipart(MIMEBase): - def __init__( - self, - _subtype: str = "mixed", - boundary: str | None = None, - _subparts: Sequence[_MessageT] | None = None, - *, - policy: Policy[_MessageT] | None = None, - **_params: _ParamsType, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/nonmultipart.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/nonmultipart.vpi deleted file mode 100644 index 5497d89b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/nonmultipart.vpi +++ /dev/null @@ -1,5 +0,0 @@ -from email.mime.base import MIMEBase - -__all__ = ["MIMENonMultipart"] - -class MIMENonMultipart(MIMEBase): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/text.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/text.vpi deleted file mode 100644 index edfa67a0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/mime/text.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from email._policybase import Policy -from email.mime.nonmultipart import MIMENonMultipart - -__all__ = ["MIMEText"] - -class MIMEText(MIMENonMultipart): - def __init__( - self, _text: str, _subtype: str = "plain", _charset: str | None = None, *, policy: Policy | None = None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/parser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/parser.vpi deleted file mode 100644 index f1b418ee..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/parser.vpi +++ /dev/null @@ -1,42 +0,0 @@ -from _typeshed import SupportsRead -from collections.abc import Callable -from email._policybase import _MessageT -from email.feedparser import BytesFeedParser as BytesFeedParser, FeedParser as FeedParser -from email.message import Message -from email.policy import Policy -from io import _WrappedBuffer -from typing import Generic, overload - -__all__ = ["Parser", "HeaderParser", "BytesParser", "BytesHeaderParser", "FeedParser", "BytesFeedParser"] - -class Parser(Generic[_MessageT]): - @overload - def __init__(self: Parser[Message[str, str]], _class: None = None) -> None: ... - @overload - def __init__(self, _class: None = None, *, policy: Policy[_MessageT]) -> None: ... - @overload - def __init__(self, _class: Callable[[], _MessageT] | None, *, policy: Policy[_MessageT] = ...) -> None: ... - - def parse(self, fp: SupportsRead[str], headersonly: bool = False) -> _MessageT: ... - def parsestr(self, text: str, headersonly: bool = False) -> _MessageT: ... - -class HeaderParser(Parser[_MessageT]): - def parse(self, fp: SupportsRead[str], headersonly: bool = True) -> _MessageT: ... - def parsestr(self, text: str, headersonly: bool = True) -> _MessageT: ... - -class BytesParser(Generic[_MessageT]): - parser: Parser[_MessageT] - - @overload - def __init__(self: BytesParser[Message[str, str]], _class: None = None) -> None: ... - @overload - def __init__(self, _class: None = None, *, policy: Policy[_MessageT]) -> None: ... - @overload - def __init__(self, _class: Callable[[], _MessageT], *, policy: Policy[_MessageT] = ...) -> None: ... - - def parse(self, fp: _WrappedBuffer, headersonly: bool = False) -> _MessageT: ... - def parsebytes(self, text: bytes | bytearray, headersonly: bool = False) -> _MessageT: ... - -class BytesHeaderParser(BytesParser[_MessageT]): - def parse(self, fp: _WrappedBuffer, headersonly: bool = True) -> _MessageT: ... - def parsebytes(self, text: bytes | bytearray, headersonly: bool = True) -> _MessageT: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/policy.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/policy.vpi deleted file mode 100644 index 6b719f3c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/policy.vpi +++ /dev/null @@ -1,77 +0,0 @@ -from collections.abc import Callable -from email._policybase import Compat32 as Compat32, Policy as Policy, _MessageFactory, _MessageT, compat32 as compat32 -from email.contentmanager import ContentManager -from email.message import EmailMessage -from typing import Any, overload -from typing_extensions import Self - -__all__ = ["Compat32", "compat32", "Policy", "EmailPolicy", "default", "strict", "SMTP", "HTTP"] - -class EmailPolicy(Policy[_MessageT]): - utf8: bool - refold_source: str - header_factory: Callable[[str, Any], Any] - content_manager: ContentManager - - @overload - def __init__( - self: EmailPolicy[EmailMessage], - *, - max_line_length: int | None = ..., - linesep: str = ..., - cte_type: str = ..., - raise_on_defect: bool = ..., - mangle_from_: bool = ..., - message_factory: None = None, - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool = ..., - utf8: bool = ..., - refold_source: str = ..., - header_factory: Callable[[str, str], str] = ..., - content_manager: ContentManager = ..., - ) -> None: ... - @overload - def __init__( - self, - *, - max_line_length: int | None = ..., - linesep: str = ..., - cte_type: str = ..., - raise_on_defect: bool = ..., - mangle_from_: bool = ..., - message_factory: _MessageFactory[_MessageT] | None = ..., - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool = ..., - utf8: bool = ..., - refold_source: str = ..., - header_factory: Callable[[str, str], str] = ..., - content_manager: ContentManager = ..., - ) -> None: ... - - def header_source_parse(self, sourcelines: list[str]) -> tuple[str, str]: ... - def header_store_parse(self, name: str, value: Any) -> tuple[str, Any]: ... - def header_fetch_parse(self, name: str, value: str) -> Any: ... - def fold(self, name: str, value: str) -> Any: ... - def fold_binary(self, name: str, value: str) -> bytes: ... - def clone( - self, - *, - max_line_length: int | None = ..., - linesep: str = ..., - cte_type: str = ..., - raise_on_defect: bool = ..., - mangle_from_: bool = ..., - message_factory: _MessageFactory[_MessageT] | None = ..., - # Added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 - verify_generated_headers: bool = ..., - utf8: bool = ..., - refold_source: str = ..., - header_factory: Callable[[str, str], str] = ..., - content_manager: ContentManager = ..., - ) -> Self: ... - -default: EmailPolicy[EmailMessage] -SMTP: EmailPolicy[EmailMessage] -SMTPUTF8: EmailPolicy[EmailMessage] -HTTP: EmailPolicy[EmailMessage] -strict: EmailPolicy[EmailMessage] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/quoprimime.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/quoprimime.vpi deleted file mode 100644 index 87d08eec..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/quoprimime.vpi +++ /dev/null @@ -1,28 +0,0 @@ -from collections.abc import Iterable - -__all__ = [ - "body_decode", - "body_encode", - "body_length", - "decode", - "decodestring", - "header_decode", - "header_encode", - "header_length", - "quote", - "unquote", -] - -def header_check(octet: int) -> bool: ... -def body_check(octet: int) -> bool: ... -def header_length(bytearray: Iterable[int]) -> int: ... -def body_length(bytearray: Iterable[int]) -> int: ... -def unquote(s: str | bytes | bytearray) -> str: ... -def quote(c: str | bytes | bytearray) -> str: ... -def header_encode(header_bytes: bytes | bytearray, charset: str = "iso-8859-1") -> str: ... -def body_encode(body: str, maxlinelen: int = 76, eol: str = "\n") -> str: ... -def decode(encoded: str, eol: str = "\n") -> str: ... -def header_decode(s: str) -> str: ... - -body_decode = decode -decodestring = decode diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/email/utils.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/email/utils.vpi deleted file mode 100644 index 6b47950a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/email/utils.vpi +++ /dev/null @@ -1,72 +0,0 @@ -import datetime -import sys -from _typeshed import Unused -from collections.abc import Iterable -from email import _ParamType -from email.charset import Charset -from typing import TypeAlias, overload -from typing_extensions import deprecated - -__all__ = [ - "collapse_rfc2231_value", - "decode_params", - "decode_rfc2231", - "encode_rfc2231", - "formataddr", - "formatdate", - "format_datetime", - "getaddresses", - "make_msgid", - "mktime_tz", - "parseaddr", - "parsedate", - "parsedate_tz", - "parsedate_to_datetime", - "unquote", -] - -_PDTZ: TypeAlias = tuple[int, int, int, int, int, int, int, int, int, int | None] - -def quote(str: str) -> str: ... -def unquote(str: str) -> str: ... - -# `strict` parameter added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 -def parseaddr(addr: str | list[str], *, strict: bool = True) -> tuple[str, str]: ... -def formataddr(pair: tuple[str | None, str], charset: str | Charset = "utf-8") -> str: ... - -# `strict` parameter added in Python 3.9.20, 3.10.15, 3.11.10, 3.12.5 -def getaddresses(fieldvalues: Iterable[str], *, strict: bool = True) -> list[tuple[str, str]]: ... - -@overload -def parsedate(data: None) -> None: ... -@overload -def parsedate(data: str) -> tuple[int, int, int, int, int, int, int, int, int] | None: ... - -@overload -def parsedate_tz(data: None) -> None: ... -@overload -def parsedate_tz(data: str) -> _PDTZ | None: ... - -def parsedate_to_datetime(data: str) -> datetime.datetime: ... -def mktime_tz(data: _PDTZ) -> int: ... -def formatdate(timeval: float | None = None, localtime: bool = False, usegmt: bool = False) -> str: ... -def format_datetime(dt: datetime.datetime, usegmt: bool = False) -> str: ... - -if sys.version_info >= (3, 14): - def localtime(dt: datetime.datetime | None = None) -> datetime.datetime: ... - -elif sys.version_info >= (3, 12): - @overload - def localtime(dt: datetime.datetime | None = None) -> datetime.datetime: ... - @overload - @deprecated("The `isdst` parameter does nothing and will be removed in Python 3.14.") - def localtime(dt: datetime.datetime | None = None, isdst: Unused = None) -> datetime.datetime: ... - -else: - def localtime(dt: datetime.datetime | None = None, isdst: int = -1) -> datetime.datetime: ... - -def make_msgid(idstring: str | None = None, domain: str | None = None) -> str: ... -def decode_rfc2231(s: str) -> tuple[str | None, str | None, str]: ... # May return list[str]. See issue #10431 for details. -def encode_rfc2231(s: str, charset: str | None = None, language: str | None = None) -> str: ... -def collapse_rfc2231_value(value: _ParamType, errors: str = "replace", fallback_charset: str = "us-ascii") -> str: ... -def decode_params(params: list[tuple[str, str]]) -> list[tuple[str, _ParamType]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/__init__.vpi deleted file mode 100644 index e03758ce..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/__init__.vpi +++ /dev/null @@ -1,15 +0,0 @@ -import sys -from codecs import CodecInfo - -from . import aliases as aliases - -class CodecRegistryError(LookupError, SystemError): ... - -def normalize_encoding(encoding: str | bytes) -> str: ... -def search_function(encoding: str) -> CodecInfo | None: ... - -if sys.version_info >= (3, 14) and sys.platform == "win32": - def win32_code_page_search_function(encoding: str) -> CodecInfo | None: ... - -# Needed for submodules -def __getattr__(name: str): ... # incomplete module diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/aliases.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/aliases.vpi deleted file mode 100644 index 079af85d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/aliases.vpi +++ /dev/null @@ -1 +0,0 @@ -aliases: dict[str, str] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ascii.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ascii.vpi deleted file mode 100644 index a85585af..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ascii.vpi +++ /dev/null @@ -1,30 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - # At runtime, this is codecs.ascii_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - # At runtime, this is codecs.ascii_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -# Note: encode being a decode function and decode being an encode function is accurate to runtime. -class StreamConverter(StreamWriter, StreamReader): # type: ignore[misc] # incompatible methods in base classes - # At runtime, this is codecs.ascii_decode - @staticmethod - def encode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... # type: ignore[override] - # At runtime, this is codecs.ascii_encode - @staticmethod - def decode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... # type: ignore[override] - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/base64_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/base64_codec.vpi deleted file mode 100644 index 0c4f1cb1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/base64_codec.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def base64_encode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... -def base64_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5hkscs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5hkscs.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/big5hkscs.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/bz2_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/bz2_codec.vpi deleted file mode 100644 index 468346a9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/bz2_codec.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def bz2_encode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... -def bz2_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/charmap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/charmap.vpi deleted file mode 100644 index a971a158..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/charmap.vpi +++ /dev/null @@ -1,33 +0,0 @@ -import codecs -from _codecs import _CharMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - # At runtime, this is codecs.charmap_encode - @staticmethod - def encode(str: str, errors: str | None = None, mapping: _CharMap | None = None, /) -> tuple[bytes, int]: ... - # At runtime, this is codecs.charmap_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, mapping: _CharMap | None = None, /) -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - mapping: _CharMap | None - def __init__(self, errors: str = "strict", mapping: _CharMap | None = None) -> None: ... - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - mapping: _CharMap | None - def __init__(self, errors: str = "strict", mapping: _CharMap | None = None) -> None: ... - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): - mapping: _CharMap | None - def __init__(self, stream: codecs._WritableStream, errors: str = "strict", mapping: _CharMap | None = None) -> None: ... - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class StreamReader(Codec, codecs.StreamReader): - mapping: _CharMap | None - def __init__(self, stream: codecs._ReadableStream, errors: str = "strict", mapping: _CharMap | None = None) -> None: ... - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... # type: ignore[override] - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp037.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp037.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp037.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1006.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1006.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1006.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1026.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1026.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1026.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1125.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1125.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1125.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1140.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1140.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1140.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1250.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1250.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1250.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1251.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1251.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1251.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1252.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1252.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1252.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1253.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1253.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1253.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1254.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1254.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1254.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1255.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1255.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1255.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1256.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1256.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1256.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1257.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1257.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1257.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1258.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1258.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp1258.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp273.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp273.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp273.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp424.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp424.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp424.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp437.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp437.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp437.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp500.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp500.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp500.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp720.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp720.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp720.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp737.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp737.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp737.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp775.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp775.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp775.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp850.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp850.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp850.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp852.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp852.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp852.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp855.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp855.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp855.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp856.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp856.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp856.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp857.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp857.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp857.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp858.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp858.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp858.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp860.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp860.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp860.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp861.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp861.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp861.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp862.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp862.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp862.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp863.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp863.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp863.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp864.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp864.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp864.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp865.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp865.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp865.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp866.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp866.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp866.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp869.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp869.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp869.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp874.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp874.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp874.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp875.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp875.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp875.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp932.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp932.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp932.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp949.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp949.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp949.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp950.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp950.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/cp950.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jis_2004.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jis_2004.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jis_2004.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jisx0213.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jisx0213.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jisx0213.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jp.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_jp.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_kr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_kr.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/euc_kr.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb18030.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb18030.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb18030.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb2312.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb2312.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gb2312.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gbk.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gbk.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/gbk.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hex_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hex_codec.vpi deleted file mode 100644 index 3fd4fe38..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hex_codec.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def hex_encode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... -def hex_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hp_roman8.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hp_roman8.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hp_roman8.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hz.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hz.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/hz.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/idna.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/idna.vpi deleted file mode 100644 index 3e2c8baf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/idna.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -import re -from _typeshed import ReadableBuffer - -dots: re.Pattern[str] -ace_prefix: bytes -sace_prefix: str - -def nameprep(label: str) -> str: ... -def ToASCII(label: str) -> bytes: ... -def ToUnicode(label: bytes | str) -> str: ... - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: ReadableBuffer | str, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.BufferedIncrementalEncoder): - def _buffer_encode(self, input: str, errors: str, final: bool) -> tuple[bytes, int]: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input: ReadableBuffer | str, errors: str, final: bool) -> tuple[str, int]: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_1.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_1.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_1.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_2004.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_3.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_3.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_3.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_jp_ext.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_kr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_kr.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso2022_kr.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_1.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_1.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_1.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_10.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_10.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_10.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_11.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_11.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_11.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_13.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_13.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_13.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_14.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_14.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_14.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_15.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_15.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_15.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_16.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_16.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_16.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_2.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_2.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_3.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_3.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_3.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_4.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_4.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_4.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_5.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_5.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_5.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_6.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_6.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_6.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_7.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_7.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_7.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_8.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_8.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_8.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_9.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_9.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/iso8859_9.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/johab.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/johab.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/johab.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_r.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_r.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_r.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_t.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_t.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_t.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_u.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_u.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/koi8_u.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/kz1048.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/kz1048.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/kz1048.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/latin_1.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/latin_1.vpi deleted file mode 100644 index 3b06773e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/latin_1.vpi +++ /dev/null @@ -1,30 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - # At runtime, this is codecs.latin_1_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - # At runtime, this is codecs.latin_1_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -# Note: encode being a decode function and decode being an encode function is accurate to runtime. -class StreamConverter(StreamWriter, StreamReader): # type: ignore[misc] # incompatible methods in base classes - # At runtime, this is codecs.latin_1_decode - @staticmethod - def encode(data: ReadableBuffer, errors: str | None = None, /) -> tuple[str, int]: ... # type: ignore[override] - # At runtime, this is codecs.latin_1_encode - @staticmethod - def decode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... # type: ignore[override] - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_arabic.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_arabic.vpi deleted file mode 100644 index 42781b48..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_arabic.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_map: dict[int, int | None] -decoding_table: str -encoding_map: dict[int, int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_croatian.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_croatian.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_croatian.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_cyrillic.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_cyrillic.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_cyrillic.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_farsi.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_farsi.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_farsi.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_greek.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_greek.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_greek.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_iceland.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_iceland.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_iceland.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_latin2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_latin2.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_latin2.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_roman.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_roman.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_roman.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_romanian.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_romanian.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_romanian.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_turkish.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_turkish.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mac_turkish.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mbcs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mbcs.vpi deleted file mode 100644 index 2c2917d6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/mbcs.vpi +++ /dev/null @@ -1,28 +0,0 @@ -import codecs -import sys -from _typeshed import ReadableBuffer - -if sys.platform == "win32": - encode = codecs.mbcs_encode - - def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - - class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - - class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.mbcs_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - - class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.mbcs_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - - class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.mbcs_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - - def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/oem.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/oem.vpi deleted file mode 100644 index 376c12c4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/oem.vpi +++ /dev/null @@ -1,28 +0,0 @@ -import codecs -import sys -from _typeshed import ReadableBuffer - -if sys.platform == "win32": - encode = codecs.oem_encode - - def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - - class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - - class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.oem_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - - class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.oem_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - - class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.oem_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - - def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/palmos.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/palmos.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/palmos.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ptcp154.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ptcp154.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/ptcp154.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/punycode.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/punycode.vpi deleted file mode 100644 index eb99e667..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/punycode.vpi +++ /dev/null @@ -1,33 +0,0 @@ -import codecs -from typing import Literal - -def segregate(str: str) -> tuple[bytes, list[int]]: ... -def selective_len(str: str, max: int) -> int: ... -def selective_find(str: str, char: str, index: int, pos: int) -> tuple[int, int]: ... -def insertion_unsort(str: str, extended: list[int]) -> list[int]: ... -def T(j: int, bias: int) -> int: ... - -digits: Literal[b"abcdefghijklmnopqrstuvwxyz0123456789"] - -def generate_generalized_integer(N: int, bias: int) -> bytes: ... -def adapt(delta: int, first: bool, numchars: int) -> int: ... -def generate_integers(baselen: int, deltas: list[int]) -> bytes: ... -def punycode_encode(text: str) -> bytes: ... -def decode_generalized_number(extended: bytes, extpos: int, bias: int, errors: str) -> tuple[int, int | None]: ... -def insertion_sort(base: str, extended: bytes, errors: str) -> str: ... -def punycode_decode(text: memoryview | bytes | bytearray | str, errors: str) -> str: ... - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: memoryview | bytes | bytearray | str, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: memoryview | bytes | bytearray | str, final: bool = False) -> str: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/quopri_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/quopri_codec.vpi deleted file mode 100644 index e9deadd8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/quopri_codec.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def quopri_encode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... -def quopri_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/raw_unicode_escape.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/raw_unicode_escape.vpi deleted file mode 100644 index 28877394..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/raw_unicode_escape.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - # At runtime, this is codecs.raw_unicode_escape_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - # At runtime, this is codecs.raw_unicode_escape_decode - @staticmethod - def decode(data: str | ReadableBuffer, errors: str | None = None, final: bool = True, /) -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input: str | ReadableBuffer, errors: str | None, final: bool) -> tuple[str, int]: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... - -class StreamReader(Codec, codecs.StreamReader): - def decode(self, input: str | ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... # type: ignore[override] - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/rot_13.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/rot_13.vpi deleted file mode 100644 index 8d71bc95..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/rot_13.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import codecs -from _typeshed import SupportsRead, SupportsWrite - -# This codec is string to string. - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[str, int]: ... # type: ignore[override] - def decode(self, input: str, errors: str = "strict") -> tuple[str, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> str: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: str, final: bool = False) -> str: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -rot13_map: dict[int, int] - -def rot13(infile: SupportsRead[str], outfile: SupportsWrite[str]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis_2004.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis_2004.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jis_2004.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jisx0213.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jisx0213.vpi deleted file mode 100644 index 4c83708c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/shift_jisx0213.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import _multibytecodec as mbc -import codecs -from typing import ClassVar - -codec: mbc._MultibyteCodec - -class Codec(codecs.Codec): - encode = codec.encode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - decode = codec.decode # type: ignore[assignment] # viper: ignore[reportAssignmentType] - -class IncrementalEncoder(mbc.MultibyteIncrementalEncoder, codecs.IncrementalEncoder): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class IncrementalDecoder(mbc.MultibyteIncrementalDecoder, codecs.IncrementalDecoder): - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamReader(Codec, mbc.MultibyteStreamReader, codecs.StreamReader): # type: ignore[misc] - codec: ClassVar[mbc._MultibyteCodec] = ... - -class StreamWriter(Codec, mbc.MultibyteStreamWriter, codecs.StreamWriter): - codec: ClassVar[mbc._MultibyteCodec] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/tis_620.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/tis_620.vpi deleted file mode 100644 index f6219566..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/tis_620.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import codecs -from _codecs import _EncodingMap -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... - -decoding_table: str -encoding_table: _EncodingMap diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/undefined.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/undefined.vpi deleted file mode 100644 index 4775dac7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/undefined.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -# These return types are just to match the base types. In reality, these always -# raise an error. - -class Codec(codecs.Codec): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> str: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... -class StreamReader(Codec, codecs.StreamReader): ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/unicode_escape.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/unicode_escape.vpi deleted file mode 100644 index ceaa39a3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/unicode_escape.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class Codec(codecs.Codec): - # At runtime, this is codecs.unicode_escape_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - # At runtime, this is codecs.unicode_escape_decode - @staticmethod - def decode(data: str | ReadableBuffer, errors: str | None = None, final: bool = True, /) -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input: str | ReadableBuffer, errors: str | None, final: bool) -> tuple[str, int]: ... - -class StreamWriter(Codec, codecs.StreamWriter): ... - -class StreamReader(Codec, codecs.StreamReader): - def decode(self, input: str | ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... # type: ignore[override] - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16.vpi deleted file mode 100644 index 3b712cde..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_16_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input: ReadableBuffer, errors: str, final: bool) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_be.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_be.vpi deleted file mode 100644 index cc7d1534..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_be.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_16_be_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_16_be_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_16_be_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_16_be_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_le.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_le.vpi deleted file mode 100644 index ba103eb0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_16_le.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_16_le_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_16_le_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_16_le_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_16_le_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32.vpi deleted file mode 100644 index c925be71..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_32_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def _buffer_decode(self, input: ReadableBuffer, errors: str, final: bool) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_be.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_be.vpi deleted file mode 100644 index 9d28f519..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_be.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_32_be_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_32_be_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_32_be_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_32_be_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_le.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_le.vpi deleted file mode 100644 index 5be14a91..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_32_le.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_32_le_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_32_le_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_32_le_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_32_le_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_7.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_7.vpi deleted file mode 100644 index dc1162f3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_7.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_7_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_7_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_7_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_7_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8.vpi deleted file mode 100644 index 918712d8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -encode = codecs.utf_8_encode - -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: str, final: bool = False) -> bytes: ... - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - # At runtime, this is codecs.utf_8_decode - @staticmethod - def _buffer_decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - # At runtime, this is codecs.utf_8_encode - @staticmethod - def encode(str: str, errors: str | None = None, /) -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - # At runtime, this is codecs.utf_8_decode - @staticmethod - def decode(data: ReadableBuffer, errors: str | None = None, final: bool = False, /) -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8_sig.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8_sig.vpi deleted file mode 100644 index af69217d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/utf_8_sig.vpi +++ /dev/null @@ -1,22 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer - -class IncrementalEncoder(codecs.IncrementalEncoder): - def __init__(self, errors: str = "strict") -> None: ... - def encode(self, input: str, final: bool = False) -> bytes: ... - def getstate(self) -> int: ... - def setstate(self, state: int) -> None: ... # type: ignore[override] - -class IncrementalDecoder(codecs.BufferedIncrementalDecoder): - def __init__(self, errors: str = "strict") -> None: ... - def _buffer_decode(self, input: ReadableBuffer, errors: str | None, final: bool) -> tuple[str, int]: ... - -class StreamWriter(codecs.StreamWriter): - def encode(self, input: str, errors: str | None = "strict") -> tuple[bytes, int]: ... - -class StreamReader(codecs.StreamReader): - def decode(self, input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... - -def getregentry() -> codecs.CodecInfo: ... -def encode(input: str, errors: str | None = "strict") -> tuple[bytes, int]: ... -def decode(input: ReadableBuffer, errors: str | None = "strict") -> tuple[str, int]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/uu_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/uu_codec.vpi deleted file mode 100644 index e32ba8ac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/uu_codec.vpi +++ /dev/null @@ -1,28 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def uu_encode( - input: ReadableBuffer, errors: str = "strict", filename: str = "", mode: int = 0o666 -) -> tuple[bytes, int]: ... -def uu_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/zlib_codec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/zlib_codec.vpi deleted file mode 100644 index 0f13d0e8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/encodings/zlib_codec.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import codecs -from _typeshed import ReadableBuffer -from typing import ClassVar - -# This codec is bytes to bytes. - -def zlib_encode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... -def zlib_decode(input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... - -class Codec(codecs.Codec): - def encode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - def decode(self, input: ReadableBuffer, errors: str = "strict") -> tuple[bytes, int]: ... # type: ignore[override] - -class IncrementalEncoder(codecs.IncrementalEncoder): - def encode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class IncrementalDecoder(codecs.IncrementalDecoder): - def decode(self, input: ReadableBuffer, final: bool = False) -> bytes: ... # type: ignore[override] - -class StreamWriter(Codec, codecs.StreamWriter): - charbuffertype: ClassVar[type] = ... - -class StreamReader(Codec, codecs.StreamReader): - charbuffertype: ClassVar[type] = ... - -def getregentry() -> codecs.CodecInfo: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ensurepip/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ensurepip/__init__.vpi deleted file mode 100644 index 332fb184..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ensurepip/__init__.vpi +++ /dev/null @@ -1,12 +0,0 @@ -__all__ = ["version", "bootstrap"] - -def version() -> str: ... -def bootstrap( - *, - root: str | None = None, - upgrade: bool = False, - user: bool = False, - altinstall: bool = False, - default_pip: bool = False, - verbosity: int = 0, -) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/errno.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/errno.vpi deleted file mode 100644 index e025e1fd..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/errno.vpi +++ /dev/null @@ -1,227 +0,0 @@ -import sys -from collections.abc import Mapping -from typing import Final - -errorcode: Mapping[int, str] - -EPERM: Final[int] -ENOENT: Final[int] -ESRCH: Final[int] -EINTR: Final[int] -EIO: Final[int] -ENXIO: Final[int] -E2BIG: Final[int] -ENOEXEC: Final[int] -EBADF: Final[int] -ECHILD: Final[int] -EAGAIN: Final[int] -ENOMEM: Final[int] -EACCES: Final[int] -EFAULT: Final[int] -EBUSY: Final[int] -EEXIST: Final[int] -EXDEV: Final[int] -ENODEV: Final[int] -ENOTDIR: Final[int] -EISDIR: Final[int] -EINVAL: Final[int] -ENFILE: Final[int] -EMFILE: Final[int] -ENOTTY: Final[int] -ETXTBSY: Final[int] -EFBIG: Final[int] -ENOSPC: Final[int] -ESPIPE: Final[int] -EROFS: Final[int] -EMLINK: Final[int] -EPIPE: Final[int] -EDOM: Final[int] -ERANGE: Final[int] -EDEADLK: Final[int] -ENAMETOOLONG: Final[int] -ENOLCK: Final[int] -ENOSYS: Final[int] -ENOTEMPTY: Final[int] -ELOOP: Final[int] -EWOULDBLOCK: Final[int] -ENOMSG: Final[int] -EIDRM: Final[int] -ENOSTR: Final[int] -ENODATA: Final[int] -ETIME: Final[int] -ENOSR: Final[int] -EREMOTE: Final[int] -ENOLINK: Final[int] -EPROTO: Final[int] -EBADMSG: Final[int] -EOVERFLOW: Final[int] -EILSEQ: Final[int] -EUSERS: Final[int] -ENOTSOCK: Final[int] -EDESTADDRREQ: Final[int] -EMSGSIZE: Final[int] -EPROTOTYPE: Final[int] -ENOPROTOOPT: Final[int] -EPROTONOSUPPORT: Final[int] -ESOCKTNOSUPPORT: Final[int] -ENOTSUP: Final[int] -EOPNOTSUPP: Final[int] -EPFNOSUPPORT: Final[int] -EAFNOSUPPORT: Final[int] -EADDRINUSE: Final[int] -EADDRNOTAVAIL: Final[int] -ENETDOWN: Final[int] -ENETUNREACH: Final[int] -ENETRESET: Final[int] -ECONNABORTED: Final[int] -ECONNRESET: Final[int] -ENOBUFS: Final[int] -EISCONN: Final[int] -ENOTCONN: Final[int] -ESHUTDOWN: Final[int] -ETOOMANYREFS: Final[int] -ETIMEDOUT: Final[int] -ECONNREFUSED: Final[int] -EHOSTDOWN: Final[int] -EHOSTUNREACH: Final[int] -EALREADY: Final[int] -EINPROGRESS: Final[int] -ESTALE: Final[int] -EDQUOT: Final[int] -ECANCELED: Final[int] # undocumented -ENOTRECOVERABLE: Final[int] # undocumented -EOWNERDEAD: Final[int] # undocumented - -if sys.platform == "sunos5" or sys.platform == "solaris": # noqa: Y008 - ELOCKUNMAPPED: Final[int] - ENOTACTIVE: Final[int] - -if sys.platform != "win32": - ENOTBLK: Final[int] - EMULTIHOP: Final[int] - -if sys.platform == "darwin": - # All of the below are undocumented - EAUTH: Final[int] - EBADARCH: Final[int] - EBADEXEC: Final[int] - EBADMACHO: Final[int] - EBADRPC: Final[int] - EDEVERR: Final[int] - EFTYPE: Final[int] - ENEEDAUTH: Final[int] - ENOATTR: Final[int] - ENOPOLICY: Final[int] - EPROCLIM: Final[int] - EPROCUNAVAIL: Final[int] - EPROGMISMATCH: Final[int] - EPROGUNAVAIL: Final[int] - EPWROFF: Final[int] - ERPCMISMATCH: Final[int] - ESHLIBVERS: Final[int] - if sys.version_info >= (3, 11): - EQFULL: Final[int] - ENOTCAPABLE: Final[int] # available starting with 3.11.1 - -if sys.platform != "darwin": - EDEADLOCK: Final[int] - -if sys.platform != "win32" and sys.platform != "darwin": - ECHRNG: Final[int] - EL2NSYNC: Final[int] - EL3HLT: Final[int] - EL3RST: Final[int] - ELNRNG: Final[int] - EUNATCH: Final[int] - ENOCSI: Final[int] - EL2HLT: Final[int] - EBADE: Final[int] - EBADR: Final[int] - EXFULL: Final[int] - ENOANO: Final[int] - EBADRQC: Final[int] - EBADSLT: Final[int] - EBFONT: Final[int] - ENONET: Final[int] - ENOPKG: Final[int] - EADV: Final[int] - ESRMNT: Final[int] - ECOMM: Final[int] - EDOTDOT: Final[int] - ENOTUNIQ: Final[int] - EBADFD: Final[int] - EREMCHG: Final[int] - ELIBACC: Final[int] - ELIBBAD: Final[int] - ELIBSCN: Final[int] - ELIBMAX: Final[int] - ELIBEXEC: Final[int] - ERESTART: Final[int] - ESTRPIPE: Final[int] - EUCLEAN: Final[int] - ENOTNAM: Final[int] - ENAVAIL: Final[int] - EISNAM: Final[int] - EREMOTEIO: Final[int] - # All of the below are undocumented - EKEYEXPIRED: Final[int] - EKEYREJECTED: Final[int] - EKEYREVOKED: Final[int] - EMEDIUMTYPE: Final[int] - ENOKEY: Final[int] - ENOMEDIUM: Final[int] - ERFKILL: Final[int] - - if sys.version_info >= (3, 14): - EHWPOISON: Final[int] - -if sys.platform == "win32": - # All of these are undocumented - WSABASEERR: Final[int] - WSAEACCES: Final[int] - WSAEADDRINUSE: Final[int] - WSAEADDRNOTAVAIL: Final[int] - WSAEAFNOSUPPORT: Final[int] - WSAEALREADY: Final[int] - WSAEBADF: Final[int] - WSAECONNABORTED: Final[int] - WSAECONNREFUSED: Final[int] - WSAECONNRESET: Final[int] - WSAEDESTADDRREQ: Final[int] - WSAEDISCON: Final[int] - WSAEDQUOT: Final[int] - WSAEFAULT: Final[int] - WSAEHOSTDOWN: Final[int] - WSAEHOSTUNREACH: Final[int] - WSAEINPROGRESS: Final[int] - WSAEINTR: Final[int] - WSAEINVAL: Final[int] - WSAEISCONN: Final[int] - WSAELOOP: Final[int] - WSAEMFILE: Final[int] - WSAEMSGSIZE: Final[int] - WSAENAMETOOLONG: Final[int] - WSAENETDOWN: Final[int] - WSAENETRESET: Final[int] - WSAENETUNREACH: Final[int] - WSAENOBUFS: Final[int] - WSAENOPROTOOPT: Final[int] - WSAENOTCONN: Final[int] - WSAENOTEMPTY: Final[int] - WSAENOTSOCK: Final[int] - WSAEOPNOTSUPP: Final[int] - WSAEPFNOSUPPORT: Final[int] - WSAEPROCLIM: Final[int] - WSAEPROTONOSUPPORT: Final[int] - WSAEPROTOTYPE: Final[int] - WSAEREMOTE: Final[int] - WSAESHUTDOWN: Final[int] - WSAESOCKTNOSUPPORT: Final[int] - WSAESTALE: Final[int] - WSAETIMEDOUT: Final[int] - WSAETOOMANYREFS: Final[int] - WSAEUSERS: Final[int] - WSAEWOULDBLOCK: Final[int] - WSANOTINITIALISED: Final[int] - WSASYSNOTREADY: Final[int] - WSAVERNOTSUPPORTED: Final[int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/faulthandler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/faulthandler.vpi deleted file mode 100644 index 6999933c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/faulthandler.vpi +++ /dev/null @@ -1,61 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike - -def cancel_dump_traceback_later() -> None: ... -def disable() -> None: ... - -if sys.version_info >= (3, 15): - def dump_traceback( - file: FileDescriptorLike = sys.stderr, all_threads: bool = True, *, max_threads: int | None = None - ) -> None: ... - -else: - def dump_traceback(file: FileDescriptorLike = sys.stderr, all_threads: bool = True) -> None: ... - -if sys.version_info >= (3, 14): - def dump_c_stack(file: FileDescriptorLike = sys.stderr) -> None: ... - -if sys.version_info >= (3, 15): - def dump_traceback_later( - timeout: float, - repeat: bool = False, - file: FileDescriptorLike = sys.stderr, - exit: bool = False, - *, - max_threads: int | None = None, - ) -> None: ... - -else: - def dump_traceback_later( - timeout: float, repeat: bool = False, file: FileDescriptorLike = sys.stderr, exit: bool = False - ) -> None: ... - -if sys.version_info >= (3, 15): - def enable( - file: FileDescriptorLike = sys.stderr, all_threads: bool = True, c_stack: bool = True, *, max_threads: int | None = None - ) -> None: ... - -elif sys.version_info >= (3, 14): - def enable(file: FileDescriptorLike = sys.stderr, all_threads: bool = True, c_stack: bool = True) -> None: ... - -else: - def enable(file: FileDescriptorLike = sys.stderr, all_threads: bool = True) -> None: ... - -def is_enabled() -> bool: ... - -if sys.platform != "win32": - if sys.version_info >= (3, 15): - def register( - signum: int, - file: FileDescriptorLike = sys.stderr, - all_threads: bool = True, - chain: bool = False, - *, - max_threads: int | None = None, - ) -> None: ... - else: - def register( - signum: int, file: FileDescriptorLike = sys.stderr, all_threads: bool = True, chain: bool = False - ) -> None: ... - - def unregister(signum: int, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/fcntl.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/fcntl.vpi deleted file mode 100644 index c17f31c4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/fcntl.vpi +++ /dev/null @@ -1,157 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike, ReadOnlyBuffer, WriteableBuffer -from typing import Any, Final, Literal, overload -from typing_extensions import Buffer - -if sys.platform != "win32": - FASYNC: Final[int] - FD_CLOEXEC: Final[int] - F_DUPFD: Final[int] - F_DUPFD_CLOEXEC: Final[int] - F_GETFD: Final[int] - F_GETFL: Final[int] - F_GETLK: Final[int] - F_GETOWN: Final[int] - F_RDLCK: Final[int] - F_SETFD: Final[int] - F_SETFL: Final[int] - F_SETLK: Final[int] - F_SETLKW: Final[int] - F_SETOWN: Final[int] - F_UNLCK: Final[int] - F_WRLCK: Final[int] - - F_GETLEASE: Final[int] - F_SETLEASE: Final[int] - if sys.platform == "darwin": - F_FULLFSYNC: Final[int] - F_NOCACHE: Final[int] - F_GETPATH: Final[int] - if sys.platform == "linux": - F_SETLKW64: Final[int] - F_SETSIG: Final[int] - F_SHLCK: Final[int] - F_SETLK64: Final[int] - F_GETSIG: Final[int] - F_NOTIFY: Final[int] - F_EXLCK: Final[int] - F_GETLK64: Final[int] - F_ADD_SEALS: Final[int] - F_GET_SEALS: Final[int] - F_SEAL_GROW: Final[int] - F_SEAL_SEAL: Final[int] - F_SEAL_SHRINK: Final[int] - F_SEAL_WRITE: Final[int] - F_OFD_GETLK: Final[int] - F_OFD_SETLK: Final[int] - F_OFD_SETLKW: Final[int] - F_GETPIPE_SZ: Final[int] - F_SETPIPE_SZ: Final[int] - DN_ACCESS: Final[int] - DN_ATTRIB: Final[int] - DN_CREATE: Final[int] - DN_DELETE: Final[int] - DN_MODIFY: Final[int] - DN_MULTISHOT: Final[int] - DN_RENAME: Final[int] - - LOCK_EX: Final[int] - LOCK_NB: Final[int] - LOCK_SH: Final[int] - LOCK_UN: Final[int] - if sys.platform == "linux": - LOCK_MAND: Final[int] - LOCK_READ: Final[int] - LOCK_RW: Final[int] - LOCK_WRITE: Final[int] - - if sys.platform == "linux": - # Constants for the POSIX STREAMS interface. Present in glibc until 2.29 (released February 2019). - # Never implemented on BSD, and considered "obsolescent" starting in POSIX 2008. - # Probably still used on Solaris. - I_ATMARK: Final[int] - I_CANPUT: Final[int] - I_CKBAND: Final[int] - I_FDINSERT: Final[int] - I_FIND: Final[int] - I_FLUSH: Final[int] - I_FLUSHBAND: Final[int] - I_GETBAND: Final[int] - I_GETCLTIME: Final[int] - I_GETSIG: Final[int] - I_GRDOPT: Final[int] - I_GWROPT: Final[int] - I_LINK: Final[int] - I_LIST: Final[int] - I_LOOK: Final[int] - I_NREAD: Final[int] - I_PEEK: Final[int] - I_PLINK: Final[int] - I_POP: Final[int] - I_PUNLINK: Final[int] - I_PUSH: Final[int] - I_RECVFD: Final[int] - I_SENDFD: Final[int] - I_SETCLTIME: Final[int] - I_SETSIG: Final[int] - I_SRDOPT: Final[int] - I_STR: Final[int] - I_SWROPT: Final[int] - I_UNLINK: Final[int] - - if sys.version_info >= (3, 12) and sys.platform == "linux": - FICLONE: Final[int] - FICLONERANGE: Final[int] - - if sys.version_info >= (3, 13) and sys.platform == "linux": - F_OWNER_TID: Final = 0 - F_OWNER_PID: Final = 1 - F_OWNER_PGRP: Final = 2 - F_SETOWN_EX: Final = 15 - F_GETOWN_EX: Final = 16 - F_SEAL_FUTURE_WRITE: Final = 16 - F_GET_RW_HINT: Final = 1035 - F_SET_RW_HINT: Final = 1036 - F_GET_FILE_RW_HINT: Final = 1037 - F_SET_FILE_RW_HINT: Final = 1038 - RWH_WRITE_LIFE_NOT_SET: Final = 0 - RWH_WRITE_LIFE_NONE: Final = 1 - RWH_WRITE_LIFE_SHORT: Final = 2 - RWH_WRITE_LIFE_MEDIUM: Final = 3 - RWH_WRITE_LIFE_LONG: Final = 4 - RWH_WRITE_LIFE_EXTREME: Final = 5 - - if sys.version_info >= (3, 11) and sys.platform == "darwin": - F_OFD_SETLK: Final = 90 - F_OFD_SETLKW: Final = 91 - F_OFD_GETLK: Final = 92 - - if sys.version_info >= (3, 13) and sys.platform != "linux": - # OSx and NetBSD - F_GETNOSIGPIPE: Final[int] - F_SETNOSIGPIPE: Final[int] - # OSx and FreeBSD - F_RDAHEAD: Final[int] - - @overload - def fcntl(fd: FileDescriptorLike, cmd: int, arg: int = 0, /) -> int: ... - @overload - def fcntl(fd: FileDescriptorLike, cmd: int, arg: str | ReadOnlyBuffer, /) -> bytes: ... - - # If arg is an int, return int - @overload - def ioctl(fd: FileDescriptorLike, request: int, arg: int = 0, mutate_flag: bool = True, /) -> int: ... - # The return type works as follows: - # - If arg is a read-write buffer, return int if mutate_flag is True, otherwise bytes - # - If arg is a read-only buffer, return bytes (and ignore the value of mutate_flag) - # We can't represent that precisely as we can't distinguish between read-write and read-only - # buffers, so we add overloads for a few unambiguous cases and use Any for the rest. - @overload - def ioctl(fd: FileDescriptorLike, request: int, arg: bytes, mutate_flag: bool = True, /) -> bytes: ... - @overload - def ioctl(fd: FileDescriptorLike, request: int, arg: WriteableBuffer, mutate_flag: Literal[False], /) -> bytes: ... - @overload - def ioctl(fd: FileDescriptorLike, request: int, arg: Buffer, mutate_flag: bool = True, /) -> Any: ... - - def flock(fd: FileDescriptorLike, operation: int, /) -> None: ... - def lockf(fd: FileDescriptorLike, cmd: int, len: int = 0, start: int = 0, whence: int = 0, /) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/filecmp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/filecmp.vpi deleted file mode 100644 index 620cc177..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/filecmp.vpi +++ /dev/null @@ -1,65 +0,0 @@ -import sys -from _typeshed import GenericPath, StrOrBytesPath -from collections.abc import Callable, Iterable, Sequence -from types import GenericAlias -from typing import Any, AnyStr, Final, Generic, Literal - -__all__ = ["clear_cache", "cmp", "dircmp", "cmpfiles", "DEFAULT_IGNORES"] - -DEFAULT_IGNORES: Final[list[str]] -BUFSIZE: Final = 8192 - -def cmp(f1: StrOrBytesPath, f2: StrOrBytesPath, shallow: bool | Literal[0, 1] = True) -> bool: ... -def cmpfiles( - a: GenericPath[AnyStr], b: GenericPath[AnyStr], common: Iterable[GenericPath[AnyStr]], shallow: bool | Literal[0, 1] = True -) -> tuple[list[AnyStr], list[AnyStr], list[AnyStr]]: ... - -class dircmp(Generic[AnyStr]): - if sys.version_info >= (3, 13): - def __init__( - self, - a: GenericPath[AnyStr], - b: GenericPath[AnyStr], - ignore: Sequence[AnyStr] | None = None, - hide: Sequence[AnyStr] | None = None, - *, - shallow: bool = True, - ) -> None: ... - else: - def __init__( - self, - a: GenericPath[AnyStr], - b: GenericPath[AnyStr], - ignore: Sequence[AnyStr] | None = None, - hide: Sequence[AnyStr] | None = None, - ) -> None: ... - left: AnyStr - right: AnyStr - hide: Sequence[AnyStr] - ignore: Sequence[AnyStr] - # These properties are created at runtime by __getattr__ - subdirs: dict[AnyStr, dircmp[AnyStr]] - same_files: list[AnyStr] - diff_files: list[AnyStr] - funny_files: list[AnyStr] - common_dirs: list[AnyStr] - common_files: list[AnyStr] - common_funny: list[AnyStr] - common: list[AnyStr] - left_only: list[AnyStr] - right_only: list[AnyStr] - left_list: list[AnyStr] - right_list: list[AnyStr] - def report(self) -> None: ... - def report_partial_closure(self) -> None: ... - def report_full_closure(self) -> None: ... - methodmap: dict[str, Callable[[], None]] - def phase0(self) -> None: ... - def phase1(self) -> None: ... - def phase2(self) -> None: ... - def phase3(self) -> None: ... - def phase4(self) -> None: ... - def phase4_closure(self) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def clear_cache() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/fileinput.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/fileinput.vpi deleted file mode 100644 index 37783254..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/fileinput.vpi +++ /dev/null @@ -1,141 +0,0 @@ -import sys -from _typeshed import AnyStr_co, StrOrBytesPath -from collections.abc import Callable, Iterable -from types import GenericAlias, TracebackType -from typing import IO, Any, AnyStr, Generic, Literal, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self, deprecated - -__all__ = [ - "input", - "close", - "nextfile", - "filename", - "lineno", - "filelineno", - "fileno", - "isfirstline", - "isstdin", - "FileInput", - "hook_compressed", - "hook_encoded", -] - -if sys.version_info >= (3, 11): - _TextMode: TypeAlias = Literal["r"] -else: - _TextMode: TypeAlias = Literal["r", "rU", "U"] - -@type_check_only -class _HasReadlineAndFileno(Protocol[AnyStr_co]): - def readline(self) -> AnyStr_co: ... - def fileno(self) -> int: ... - -# encoding and errors are added -@overload -def input( - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: _TextMode = "r", - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[str]] | None = None, - encoding: str | None = None, - errors: str | None = None, -) -> FileInput[str]: ... -@overload -def input( - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: Literal["rb"], - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[bytes]] | None = None, - encoding: None = None, - errors: None = None, -) -> FileInput[bytes]: ... -@overload -def input( - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: str, - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[Any]] | None = None, - encoding: str | None = None, - errors: str | None = None, -) -> FileInput[Any]: ... - -def close() -> None: ... -def nextfile() -> None: ... -def filename() -> str: ... -def lineno() -> int: ... -def filelineno() -> int: ... -def fileno() -> int: ... -def isfirstline() -> bool: ... -def isstdin() -> bool: ... - -class FileInput(Generic[AnyStr]): - # encoding and errors are added - @overload - def __init__( - self: FileInput[str], - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: _TextMode = "r", - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[str]] | None = None, - encoding: str | None = None, - errors: str | None = None, - ) -> None: ... - @overload - def __init__( - self: FileInput[bytes], - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: Literal["rb"], - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[bytes]] | None = None, - encoding: None = None, - errors: None = None, - ) -> None: ... - @overload - def __init__( - self: FileInput[Any], - files: StrOrBytesPath | Iterable[StrOrBytesPath] | None = None, - inplace: bool = False, - backup: str = "", - *, - mode: str, - openhook: Callable[[StrOrBytesPath, str], _HasReadlineAndFileno[Any]] | None = None, - encoding: str | None = None, - errors: str | None = None, - ) -> None: ... - - def __del__(self) -> None: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def __iter__(self) -> Self: ... - def __next__(self) -> AnyStr: ... - if sys.version_info < (3, 11): - def __getitem__(self, i: int) -> AnyStr: ... - - def nextfile(self) -> None: ... - def readline(self) -> AnyStr: ... - def filename(self) -> str: ... - def lineno(self) -> int: ... - def filelineno(self) -> int: ... - def fileno(self) -> int: ... - def isfirstline(self) -> bool: ... - def isstdin(self) -> bool: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def hook_compressed( - filename: StrOrBytesPath, mode: str, *, encoding: str | None = None, errors: str | None = None -) -> IO[Any]: ... -@deprecated("Deprecated since Python 3.10. Use `fileinput.input` or `fileinput.FileInput` instead.") -def hook_encoded(encoding: str, errors: str | None = None) -> Callable[[StrOrBytesPath, str], IO[Any]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/fnmatch.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/fnmatch.vpi deleted file mode 100644 index 345c4576..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/fnmatch.vpi +++ /dev/null @@ -1,15 +0,0 @@ -import sys -from collections.abc import Iterable -from typing import AnyStr - -__all__ = ["filter", "fnmatch", "fnmatchcase", "translate"] -if sys.version_info >= (3, 14): - __all__ += ["filterfalse"] - -def fnmatch(name: AnyStr, pat: AnyStr) -> bool: ... -def fnmatchcase(name: AnyStr, pat: AnyStr) -> bool: ... -def filter(names: Iterable[AnyStr], pat: AnyStr) -> list[AnyStr]: ... -def translate(pat: str) -> str: ... - -if sys.version_info >= (3, 14): - def filterfalse(names: Iterable[AnyStr], pat: AnyStr) -> list[AnyStr]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/fractions.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/fractions.vpi deleted file mode 100644 index 42947f2e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/fractions.vpi +++ /dev/null @@ -1,185 +0,0 @@ -import sys -from collections.abc import Callable -from decimal import Decimal -from numbers import Rational, Real -from typing import Any, Literal, Protocol, SupportsIndex, TypeAlias, overload, type_check_only -from typing_extensions import Self - -_ComparableNum: TypeAlias = int | float | Decimal | Real - -__all__ = ["Fraction"] - -@type_check_only -class _ConvertibleToIntegerRatio(Protocol): - def as_integer_ratio(self) -> tuple[int | Rational, int | Rational]: ... - -class Fraction(Rational): - __slots__ = ("_numerator", "_denominator") - - @overload - def __new__(cls, numerator: int | Rational = 0, denominator: int | Rational | None = None) -> Self: ... - @overload - def __new__(cls, numerator: float | Decimal | str) -> Self: ... - if sys.version_info >= (3, 14): - @overload - def __new__(cls, numerator: _ConvertibleToIntegerRatio) -> Self: ... - - @classmethod - def from_float(cls, f: float) -> Self: ... - @classmethod - def from_decimal(cls, dec: Decimal) -> Self: ... - def limit_denominator(self, max_denominator: int = 1000000) -> Fraction: ... - def as_integer_ratio(self) -> tuple[int, int]: ... - if sys.version_info >= (3, 12): - def is_integer(self) -> bool: ... - - @property - def numerator(a) -> int: ... - @property - def denominator(a) -> int: ... - - @overload - def __add__(a, b: int | Fraction) -> Fraction: ... - @overload - def __add__(a, b: float) -> float: ... - @overload - def __add__(a, b: complex) -> complex: ... - - @overload - def __radd__(b, a: int | Fraction) -> Fraction: ... - @overload - def __radd__(b, a: float) -> float: ... - @overload - def __radd__(b, a: complex) -> complex: ... - - @overload - def __sub__(a, b: int | Fraction) -> Fraction: ... - @overload - def __sub__(a, b: float) -> float: ... - @overload - def __sub__(a, b: complex) -> complex: ... - - @overload - def __rsub__(b, a: int | Fraction) -> Fraction: ... - @overload - def __rsub__(b, a: float) -> float: ... - @overload - def __rsub__(b, a: complex) -> complex: ... - - @overload - def __mul__(a, b: int | Fraction) -> Fraction: ... - @overload - def __mul__(a, b: float) -> float: ... - @overload - def __mul__(a, b: complex) -> complex: ... - - @overload - def __rmul__(b, a: int | Fraction) -> Fraction: ... - @overload - def __rmul__(b, a: float) -> float: ... - @overload - def __rmul__(b, a: complex) -> complex: ... - - @overload - def __truediv__(a, b: int | Fraction) -> Fraction: ... - @overload - def __truediv__(a, b: float) -> float: ... - @overload - def __truediv__(a, b: complex) -> complex: ... - - @overload - def __rtruediv__(b, a: int | Fraction) -> Fraction: ... - @overload - def __rtruediv__(b, a: float) -> float: ... - @overload - def __rtruediv__(b, a: complex) -> complex: ... - - @overload - def __floordiv__(a, b: int | Fraction) -> int: ... - @overload - def __floordiv__(a, b: float) -> float: ... - - @overload - def __rfloordiv__(b, a: int | Fraction) -> int: ... - @overload - def __rfloordiv__(b, a: float) -> float: ... - - @overload - def __mod__(a, b: int | Fraction) -> Fraction: ... - @overload - def __mod__(a, b: float) -> float: ... - - @overload - def __rmod__(b, a: int | Fraction) -> Fraction: ... - @overload - def __rmod__(b, a: float) -> float: ... - - @overload - def __divmod__(a, b: int | Fraction) -> tuple[int, Fraction]: ... - @overload - def __divmod__(a, b: float) -> tuple[float, Fraction]: ... - - @overload - def __rdivmod__(a, b: int | Fraction) -> tuple[int, Fraction]: ... - @overload - def __rdivmod__(a, b: float) -> tuple[float, Fraction]: ... - - if sys.version_info >= (3, 14): - @overload - def __pow__(a, b: int, modulo: None = None) -> Fraction: ... - @overload - def __pow__(a, b: float | Fraction, modulo: None = None) -> float: ... - @overload - def __pow__(a, b: complex, modulo: None = None) -> complex: ... - else: - @overload - def __pow__(a, b: int) -> Fraction: ... - @overload - def __pow__(a, b: float | Fraction) -> float: ... - @overload - def __pow__(a, b: complex) -> complex: ... - - if sys.version_info >= (3, 14): - @overload - def __rpow__(b, a: float | Fraction, modulo: None = None) -> float: ... - @overload - def __rpow__(b, a: complex, modulo: None = None) -> complex: ... - else: - @overload - def __rpow__(b, a: float | Fraction) -> float: ... - @overload - def __rpow__(b, a: complex) -> complex: ... - - def __pos__(a) -> Fraction: ... - def __neg__(a) -> Fraction: ... - def __abs__(a) -> Fraction: ... - def __trunc__(a) -> int: ... - def __floor__(a) -> int: ... - def __ceil__(a) -> int: ... - - @overload - def __round__(self, ndigits: None = None) -> int: ... - @overload - def __round__(self, ndigits: int) -> Fraction: ... - - def __hash__(self) -> int: ... # type: ignore[override] - def __eq__(a, b: object) -> bool: ... - def __lt__(a, b: _ComparableNum) -> bool: ... - def __gt__(a, b: _ComparableNum) -> bool: ... - def __le__(a, b: _ComparableNum) -> bool: ... - def __ge__(a, b: _ComparableNum) -> bool: ... - def __bool__(a) -> bool: ... - def __copy__(self) -> Self: ... - def __deepcopy__(self, memo: Any) -> Self: ... - if sys.version_info >= (3, 11): - def __int__(a, _index: Callable[[SupportsIndex], int] = ...) -> int: ... - # Not actually defined within fractions.py, but provides more useful - # overrides - @property - def real(self) -> Fraction: ... - @property - def imag(self) -> Literal[0]: ... - def conjugate(self) -> Fraction: ... - if sys.version_info >= (3, 14): - @classmethod - def from_number(cls, number: float | Rational | _ConvertibleToIntegerRatio) -> Self: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ftplib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ftplib.vpi deleted file mode 100644 index 1b7222fc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ftplib.vpi +++ /dev/null @@ -1,174 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath, SupportsRead, SupportsReadline -from collections.abc import Callable, Iterable, Iterator -from socket import socket -from ssl import SSLContext -from types import TracebackType -from typing import Any, Final, Literal, TextIO, overload -from typing_extensions import Self, deprecated - -__all__ = ["FTP", "error_reply", "error_temp", "error_perm", "error_proto", "all_errors", "FTP_TLS"] - -MSG_OOB: Final = 1 -FTP_PORT: Final = 21 -MAXLINE: Final = 8192 -CRLF: Final = "\r\n" -B_CRLF: Final = b"\r\n" - -class Error(Exception): ... -class error_reply(Error): ... -class error_temp(Error): ... -class error_perm(Error): ... -class error_proto(Error): ... - -all_errors: tuple[type[Exception], ...] - -class FTP: - debugging: int - host: str - port: int - maxline: int - sock: socket | None - welcome: str | None - passiveserver: int - timeout: float | None - af: int - lastresp: str - file: TextIO | None - encoding: str - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - source_address: tuple[str, int] | None - def __init__( - self, - host: str = "", - user: str = "", - passwd: str = "", - acct: str = "", - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - *, - encoding: str = "utf-8", - ) -> None: ... - def connect( - self, host: str = "", port: int = 0, timeout: float = -999, source_address: tuple[str, int] | None = None - ) -> str: ... - def getwelcome(self) -> str: ... - def set_debuglevel(self, level: int) -> None: ... - def debug(self, level: int) -> None: ... - def set_pasv(self, val: bool | Literal[0, 1]) -> None: ... - def sanitize(self, s: str) -> str: ... - def putline(self, line: str) -> None: ... - def putcmd(self, line: str) -> None: ... - def getline(self) -> str: ... - def getmultiline(self) -> str: ... - def getresp(self) -> str: ... - def voidresp(self) -> str: ... - def abort(self) -> str: ... - def sendcmd(self, cmd: str) -> str: ... - def voidcmd(self, cmd: str) -> str: ... - def sendport(self, host: str, port: int) -> str: ... - def sendeprt(self, host: str, port: int) -> str: ... - def makeport(self) -> socket: ... - def makepasv(self) -> tuple[str, int]: ... - def login(self, user: str = "", passwd: str = "", acct: str = "") -> str: ... - # In practice, `rest` can actually be anything whose str() is an integer sequence, so to make it simple we allow integers - def ntransfercmd(self, cmd: str, rest: int | str | None = None) -> tuple[socket, int | None]: ... - def transfercmd(self, cmd: str, rest: int | str | None = None) -> socket: ... - def retrbinary( - self, cmd: str, callback: Callable[[bytes], object], blocksize: int = 8192, rest: int | str | None = None - ) -> str: ... - def storbinary( - self, - cmd: str, - fp: SupportsRead[bytes], - blocksize: int = 8192, - callback: Callable[[bytes], object] | None = None, - rest: int | str | None = None, - ) -> str: ... - def retrlines(self, cmd: str, callback: Callable[[str], object] | None = None) -> str: ... - def storlines(self, cmd: str, fp: SupportsReadline[bytes], callback: Callable[[bytes], object] | None = None) -> str: ... - def acct(self, password: str) -> str: ... - def nlst(self, *args: str) -> list[str]: ... - # Technically only the last arg can be a Callable but ... - def dir(self, *args: str | Callable[[str], object]) -> None: ... - def mlsd(self, path: str = "", facts: Iterable[str] = []) -> Iterator[tuple[str, dict[str, str]]]: ... - def rename(self, fromname: str, toname: str) -> str: ... - def delete(self, filename: str) -> str: ... - def cwd(self, dirname: str) -> str: ... - def size(self, filename: str) -> int | None: ... - def mkd(self, dirname: str) -> str: ... - def rmd(self, dirname: str) -> str: ... - def pwd(self) -> str: ... - def quit(self) -> str: ... - def close(self) -> None: ... - -class FTP_TLS(FTP): - if sys.version_info >= (3, 12): - def __init__( - self, - host: str = "", - user: str = "", - passwd: str = "", - acct: str = "", - *, - context: SSLContext | None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - encoding: str = "utf-8", - ) -> None: ... - else: - @overload - def __init__( - self, - host: str = "", - user: str = "", - passwd: str = "", - acct: str = "", - keyfile: None = None, - certfile: None = None, - context: SSLContext | None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - *, - encoding: str = "utf-8", - ) -> None: ... - @overload - @deprecated( - "The `keyfile`, `certfile` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `context` parameter instead." - ) - def __init__( - self, - host: str = "", - user: str = "", - passwd: str = "", - acct: str = "", - keyfile: StrOrBytesPath | None = None, - certfile: StrOrBytesPath | None = None, - context: None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - *, - encoding: str = "utf-8", - ) -> None: ... - - ssl_version: int - keyfile: StrOrBytesPath | None - certfile: StrOrBytesPath | None - context: SSLContext - def login(self, user: str = "", passwd: str = "", acct: str = "", secure: bool = True) -> str: ... - def auth(self) -> str: ... - def prot_p(self) -> str: ... - def prot_c(self) -> str: ... - def ccc(self) -> str: ... - -def parse150(resp: str) -> int | None: ... # undocumented -def parse227(resp: str) -> tuple[str, int]: ... # undocumented -def parse229(resp: str, peer: Any) -> tuple[str, int]: ... # undocumented -def parse257(resp: str) -> str: ... # undocumented -def ftpcp( - source: FTP, sourcename: str, target: FTP, targetname: str = "", type: Literal["A", "I"] = "I" -) -> None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/gc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/gc.vpi deleted file mode 100644 index dc20a570..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/gc.vpi +++ /dev/null @@ -1,32 +0,0 @@ -from collections.abc import Callable -from typing import Any, Final, Literal, TypeAlias - -DEBUG_COLLECTABLE: Final = 2 -DEBUG_LEAK: Final = 38 -DEBUG_SAVEALL: Final = 32 -DEBUG_STATS: Final = 1 -DEBUG_UNCOLLECTABLE: Final = 4 - -_CallbackType: TypeAlias = Callable[[Literal["start", "stop"], dict[str, int]], object] - -callbacks: list[_CallbackType] -garbage: list[Any] - -def collect(generation: int = 2) -> int: ... -def disable() -> None: ... -def enable() -> None: ... -def get_count() -> tuple[int, int, int]: ... -def get_debug() -> int: ... -def get_objects(generation: int | None = None) -> list[Any]: ... -def freeze() -> None: ... -def unfreeze() -> None: ... -def get_freeze_count() -> int: ... -def get_referents(*objs: Any) -> list[Any]: ... -def get_referrers(*objs: Any) -> list[Any]: ... -def get_stats() -> list[dict[str, Any]]: ... -def get_threshold() -> tuple[int, int, int]: ... -def is_tracked(obj: Any, /) -> bool: ... -def is_finalized(obj: Any, /) -> bool: ... -def isenabled() -> bool: ... -def set_debug(flags: int, /) -> None: ... -def set_threshold(threshold0: int, threshold1: int = 0, threshold2: int = 0, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/genericpath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/genericpath.vpi deleted file mode 100644 index 07c58cc4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/genericpath.vpi +++ /dev/null @@ -1,98 +0,0 @@ -import os -import sys -from _typeshed import BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath, SupportsRichComparisonT -from collections.abc import Sequence -from typing import Literal, NewType, overload -from typing_extensions import LiteralString, deprecated - -__all__ = [ - "commonprefix", - "exists", - "getatime", - "getctime", - "getmtime", - "getsize", - "isdir", - "isfile", - "samefile", - "sameopenfile", - "samestat", - "ALLOW_MISSING", -] -if sys.version_info >= (3, 12): - __all__ += ["islink"] -if sys.version_info >= (3, 13): - __all__ += ["isjunction", "isdevdrive", "lexists"] -if sys.version_info >= (3, 15): - __all__ += ["ALL_BUT_LAST"] - -# All overloads can return empty string. Ideally, Literal[""] would be a valid -# Iterable[T], so that list[T] | Literal[""] could be used as a return -# type. But because this only works when T is str, we need Sequence[T] instead. -if sys.version_info >= (3, 15): - @overload - @deprecated("Deprecated since Python 3.15; use os.path.commonpath() for path prefixes.") - def commonprefix(m: Sequence[LiteralString], /) -> LiteralString: ... - @overload - @deprecated("Deprecated since Python 3.15; use os.path.commonpath() for path prefixes.") - def commonprefix(m: Sequence[StrPath], /) -> str: ... - @overload - @deprecated("Deprecated since Python 3.15; use os.path.commonpath() for path prefixes.") - def commonprefix(m: Sequence[BytesPath], /) -> bytes | Literal[""]: ... - @overload - @deprecated("Deprecated since Python 3.15; use os.path.commonpath() for path prefixes.") - def commonprefix(m: Sequence[list[SupportsRichComparisonT]], /) -> Sequence[SupportsRichComparisonT]: ... - @overload - @deprecated("Deprecated since Python 3.15; use os.path.commonpath() for path prefixes.") - def commonprefix(m: Sequence[tuple[SupportsRichComparisonT, ...]], /) -> Sequence[SupportsRichComparisonT]: ... -else: - @overload - def commonprefix(m: Sequence[LiteralString]) -> LiteralString: ... - @overload - def commonprefix(m: Sequence[StrPath]) -> str: ... - @overload - def commonprefix(m: Sequence[BytesPath]) -> bytes | Literal[""]: ... - @overload - def commonprefix(m: Sequence[list[SupportsRichComparisonT]]) -> Sequence[SupportsRichComparisonT]: ... - @overload - def commonprefix(m: Sequence[tuple[SupportsRichComparisonT, ...]]) -> Sequence[SupportsRichComparisonT]: ... - -def exists(path: FileDescriptorOrPath) -> bool: ... -def isfile(path: FileDescriptorOrPath) -> bool: ... -def isdir(s: FileDescriptorOrPath) -> bool: ... - -if sys.version_info >= (3, 12): - def islink(path: StrOrBytesPath) -> bool: ... - -# These return float if os.stat_float_times() == True, -# but int is a subclass of float. -def sameopenfile(fp1: int, fp2: int) -> bool: ... - -if sys.version_info >= (3, 15): - def getsize(filename: FileDescriptorOrPath, /) -> int: ... - def getatime(filename: FileDescriptorOrPath, /) -> float: ... - def getmtime(filename: FileDescriptorOrPath, /) -> float: ... - def getctime(filename: FileDescriptorOrPath, /) -> float: ... - def samefile(f1: FileDescriptorOrPath, f2: FileDescriptorOrPath, /) -> bool: ... - def samestat(s1: os.stat_result, s2: os.stat_result, /) -> bool: ... - -else: - def getsize(filename: FileDescriptorOrPath) -> int: ... - def getatime(filename: FileDescriptorOrPath) -> float: ... - def getmtime(filename: FileDescriptorOrPath) -> float: ... - def getctime(filename: FileDescriptorOrPath) -> float: ... - def samefile(f1: FileDescriptorOrPath, f2: FileDescriptorOrPath) -> bool: ... - def samestat(s1: os.stat_result, s2: os.stat_result) -> bool: ... - -if sys.version_info >= (3, 13): - def isjunction(path: StrOrBytesPath) -> bool: ... - def isdevdrive(path: StrOrBytesPath) -> bool: ... - def lexists(path: StrOrBytesPath) -> bool: ... - -# Added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4 -_AllowMissingType = NewType("_AllowMissingType", object) -ALLOW_MISSING: _AllowMissingType - -if sys.version_info >= (3, 15): - _AllButLastType = NewType("_AllButLastType", object) - ALL_BUT_LAST: _AllButLastType diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/getopt.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/getopt.vpi deleted file mode 100644 index c15db812..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/getopt.vpi +++ /dev/null @@ -1,27 +0,0 @@ -from collections.abc import Iterable, Sequence -from typing import Protocol, TypeVar, overload, type_check_only - -_StrSequenceT_co = TypeVar("_StrSequenceT_co", covariant=True, bound=Sequence[str]) - -@type_check_only -class _SliceableT(Protocol[_StrSequenceT_co]): - @overload - def __getitem__(self, key: int, /) -> str: ... - @overload - def __getitem__(self, key: slice, /) -> _StrSequenceT_co: ... - -__all__ = ["GetoptError", "error", "getopt", "gnu_getopt"] - -def getopt( - args: _SliceableT[_StrSequenceT_co], shortopts: str, longopts: Iterable[str] | str = [] -) -> tuple[list[tuple[str, str]], _StrSequenceT_co]: ... -def gnu_getopt( - args: Sequence[str], shortopts: str, longopts: Iterable[str] | str = [] -) -> tuple[list[tuple[str, str]], list[str]]: ... - -class GetoptError(Exception): - msg: str - opt: str - def __init__(self, msg: str, opt: str = "") -> None: ... - -error = GetoptError diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/getpass.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/getpass.vpi deleted file mode 100644 index bb3013df..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/getpass.vpi +++ /dev/null @@ -1,14 +0,0 @@ -import sys -from typing import TextIO - -__all__ = ["getpass", "getuser", "GetPassWarning"] - -if sys.version_info >= (3, 14): - def getpass(prompt: str = "Password: ", stream: TextIO | None = None, *, echo_char: str | None = None) -> str: ... - -else: - def getpass(prompt: str = "Password: ", stream: TextIO | None = None) -> str: ... - -def getuser() -> str: ... - -class GetPassWarning(UserWarning): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/gettext.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/gettext.vpi deleted file mode 100644 index aac2d3ed..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/gettext.vpi +++ /dev/null @@ -1,190 +0,0 @@ -import io -import sys -from _typeshed import StrPath -from collections.abc import Callable, Container, Iterable, Sequence -from typing import Any, Final, Literal, Protocol, TypeVar, overload, type_check_only -from typing_extensions import deprecated - -__all__ = [ - "NullTranslations", - "GNUTranslations", - "Catalog", - "find", - "translation", - "install", - "textdomain", - "bindtextdomain", - "dgettext", - "dngettext", - "gettext", - "ngettext", - "dnpgettext", - "dpgettext", - "npgettext", - "pgettext", -] - -if sys.version_info < (3, 11): - __all__ += ["bind_textdomain_codeset", "ldgettext", "ldngettext", "lgettext", "lngettext"] - -@type_check_only -class _TranslationsReader(Protocol): - def read(self) -> bytes: ... - # optional: - # name: str - -class NullTranslations: - def __init__(self, fp: _TranslationsReader | None = None) -> None: ... - def _parse(self, fp: _TranslationsReader) -> None: ... - def add_fallback(self, fallback: NullTranslations) -> None: ... - def gettext(self, message: str) -> str: ... - def ngettext(self, msgid1: str, msgid2: str, n: int) -> str: ... - def pgettext(self, context: str, message: str) -> str: ... - def npgettext(self, context: str, msgid1: str, msgid2: str, n: int) -> str: ... - def info(self) -> dict[str, str]: ... - def charset(self) -> str | None: ... - if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.8; removed in Python 3.11.") - def output_charset(self) -> str | None: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11.") - def set_output_charset(self, charset: str) -> None: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `gettext()` instead.") - def lgettext(self, message: str) -> str: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `ngettext()` instead.") - def lngettext(self, msgid1: str, msgid2: str, n: int) -> str: ... - - def install(self, names: Container[str] | None = None) -> None: ... - -class GNUTranslations(NullTranslations): - LE_MAGIC: Final[int] - BE_MAGIC: Final[int] - CONTEXT: str - VERSIONS: Sequence[int] - -@overload -def find( - domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, all: Literal[False] = False -) -> str | None: ... -@overload -def find( - domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, *, all: Literal[True] -) -> list[str]: ... -@overload -def find(domain: str, localedir: StrPath | None, languages: Iterable[str] | None, all: Literal[True]) -> list[str]: ... -@overload -def find(domain: str, localedir: StrPath | None = None, languages: Iterable[str] | None = None, all: bool = False) -> Any: ... - -_NullTranslationsT = TypeVar("_NullTranslationsT", bound=NullTranslations) - -if sys.version_info >= (3, 11): - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - class_: None = None, - fallback: Literal[False] = False, - ) -> GNUTranslations: ... - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - *, - class_: Callable[[io.BufferedReader], _NullTranslationsT], - fallback: Literal[False] = False, - ) -> _NullTranslationsT: ... - @overload - def translation( - domain: str, - localedir: StrPath | None, - languages: Iterable[str] | None, - class_: Callable[[io.BufferedReader], _NullTranslationsT], - fallback: Literal[False] = False, - ) -> _NullTranslationsT: ... - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - class_: Callable[[io.BufferedReader], NullTranslations] | None = None, - fallback: bool = False, - ) -> NullTranslations: ... - - def install(domain: str, localedir: StrPath | None = None, *, names: Container[str] | None = None) -> None: ... -else: - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - class_: None = None, - fallback: Literal[False] = False, - codeset: str | None = ..., - ) -> GNUTranslations: ... - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - *, - class_: Callable[[io.BufferedReader], _NullTranslationsT], - fallback: Literal[False] = False, - codeset: str | None = ..., - ) -> _NullTranslationsT: ... - @overload - def translation( - domain: str, - localedir: StrPath | None, - languages: Iterable[str] | None, - class_: Callable[[io.BufferedReader], _NullTranslationsT], - fallback: Literal[False] = False, - codeset: str | None = ..., - ) -> _NullTranslationsT: ... - @overload - def translation( - domain: str, - localedir: StrPath | None = None, - languages: Iterable[str] | None = None, - class_: Callable[[io.BufferedReader], NullTranslations] | None = None, - fallback: bool = False, - codeset: str | None = ..., - ) -> NullTranslations: ... - - @overload - def install(domain: str, localedir: StrPath | None = None, names: Container[str] | None = None) -> None: ... - @overload - @deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.") - def install(domain: str, localedir: StrPath | None, codeset: str | None, /, names: Container[str] | None = None) -> None: ... - @overload - @deprecated("The `codeset` parameter is deprecated since Python 3.8; removed in Python 3.11.") - def install( - domain: str, localedir: StrPath | None = None, *, codeset: str | None, names: Container[str] | None = None - ) -> None: ... - -def textdomain(domain: str | None = None) -> str: ... -def bindtextdomain(domain: str, localedir: StrPath | None = None) -> str: ... -def dgettext(domain: str, message: str) -> str: ... -def dngettext(domain: str, msgid1: str, msgid2: str, n: int) -> str: ... -def gettext(message: str) -> str: ... -def ngettext(msgid1: str, msgid2: str, n: int) -> str: ... -def pgettext(context: str, message: str) -> str: ... -def dpgettext(domain: str, context: str, message: str) -> str: ... -def npgettext(context: str, msgid1: str, msgid2: str, n: int) -> str: ... -def dnpgettext(domain: str, context: str, msgid1: str, msgid2: str, n: int) -> str: ... - -if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `gettext()` instead.") - def lgettext(message: str) -> str: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `dgettext()` instead.") - def ldgettext(domain: str, message: str) -> str: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `ngettext()` instead.") - def lngettext(msgid1: str, msgid2: str, n: int) -> str: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `dngettext()` instead.") - def ldngettext(domain: str, msgid1: str, msgid2: str, n: int) -> str: ... - @deprecated("Deprecated since Python 3.8; removed in Python 3.11. Use `bindtextdomain()` instead.") - def bind_textdomain_codeset(domain: str, codeset: str | None = None) -> str: ... - -Catalog = translation - -def c2py(plural: str) -> Callable[[int], int]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/glob.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/glob.vpi deleted file mode 100644 index bdfb2cfb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/glob.vpi +++ /dev/null @@ -1,54 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Iterator, Sequence -from typing import AnyStr -from typing_extensions import deprecated - -__all__ = ["escape", "glob", "iglob"] - -if sys.version_info >= (3, 13): - __all__ += ["translate"] - -if sys.version_info < (3, 15): - @deprecated( - "Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead." - ) - def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... - @deprecated( - "Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead." - ) - def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ... - -if sys.version_info >= (3, 11): - def glob( - pathname: AnyStr, - *, - root_dir: StrOrBytesPath | None = None, - dir_fd: int | None = None, - recursive: bool = False, - include_hidden: bool = False, - ) -> list[AnyStr]: ... - def iglob( - pathname: AnyStr, - *, - root_dir: StrOrBytesPath | None = None, - dir_fd: int | None = None, - recursive: bool = False, - include_hidden: bool = False, - ) -> Iterator[AnyStr]: ... - -else: - def glob( - pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False - ) -> list[AnyStr]: ... - def iglob( - pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False - ) -> Iterator[AnyStr]: ... - -def escape(pathname: AnyStr) -> AnyStr: ... -def has_magic(s: str | bytes) -> bool: ... # undocumented - -if sys.version_info >= (3, 13): - def translate( - pat: str, *, recursive: bool = False, include_hidden: bool = False, seps: Sequence[str] | None = None - ) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/graphlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/graphlib.vpi deleted file mode 100644 index f0ac72b6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/graphlib.vpi +++ /dev/null @@ -1,29 +0,0 @@ -import sys -from _typeshed import SupportsItems -from collections.abc import Iterable -from typing import Any, Generic, TypeVar, overload - -__all__ = ["TopologicalSorter", "CycleError"] - -_T = TypeVar("_T") - -if sys.version_info >= (3, 11): - from types import GenericAlias - -class TopologicalSorter(Generic[_T]): - @overload - def __init__(self, graph: None = None) -> None: ... - @overload - def __init__(self, graph: SupportsItems[_T, Iterable[_T]]) -> None: ... - - def add(self, node: _T, *predecessors: _T) -> None: ... - def prepare(self) -> None: ... - def is_active(self) -> bool: ... - def __bool__(self) -> bool: ... - def done(self, *nodes: _T) -> None: ... - def get_ready(self) -> tuple[_T, ...]: ... - def static_order(self) -> Iterable[_T]: ... - if sys.version_info >= (3, 11): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class CycleError(ValueError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/grp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/grp.vpi deleted file mode 100644 index 9f372b4d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/grp.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import sys -from _typeshed import structseq -from typing import Any, Final, final - -if sys.platform != "win32": - @final - class struct_group(structseq[Any], tuple[str, str | None, int, list[str]]): - __match_args__: Final = ("gr_name", "gr_passwd", "gr_gid", "gr_mem") - - @property - def gr_name(self) -> str: ... - @property - def gr_passwd(self) -> str | None: ... - @property - def gr_gid(self) -> int: ... - @property - def gr_mem(self) -> list[str]: ... - - def getgrall() -> list[struct_group]: ... - def getgrgid(id: int) -> struct_group: ... - def getgrnam(name: str) -> struct_group: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/gzip.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/gzip.vpi deleted file mode 100644 index 4322e6c8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/gzip.vpi +++ /dev/null @@ -1,181 +0,0 @@ -import sys -import zlib -from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, WriteableBuffer -from io import FileIO, TextIOWrapper -from typing import Final, Literal, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import deprecated - -if sys.version_info >= (3, 14): - from compression._common._streams import BaseStream, DecompressReader -else: - from _compression import BaseStream, DecompressReader - -__all__ = ["BadGzipFile", "GzipFile", "open", "compress", "decompress"] - -_ReadBinaryMode: TypeAlias = Literal["r", "rb"] -_WriteBinaryMode: TypeAlias = Literal["a", "ab", "w", "wb", "x", "xb"] -_OpenTextMode: TypeAlias = Literal["rt", "at", "wt", "xt"] - -READ: Final[object] # undocumented -WRITE: Final[object] # undocumented - -FTEXT: Final[int] # actually Literal[1] # undocumented -FHCRC: Final[int] # actually Literal[2] # undocumented -FEXTRA: Final[int] # actually Literal[4] # undocumented -FNAME: Final[int] # actually Literal[8] # undocumented -FCOMMENT: Final[int] # actually Literal[16] # undocumented - -@type_check_only -class _ReadableFileobj(Protocol): - def read(self, n: int, /) -> bytes: ... - def seek(self, n: int, /) -> object: ... - # The following attributes and methods are optional: - # name: str - # mode: str - # def fileno() -> int: ... - -@type_check_only -class _WritableFileobj(Protocol): - def write(self, b: bytes, /) -> object: ... - def flush(self) -> object: ... - # The following attributes and methods are optional: - # name: str - # mode: str - # def fileno() -> int: ... - -@overload -def open( - filename: StrOrBytesPath | _ReadableFileobj, - mode: _ReadBinaryMode = "rb", - compresslevel: int = 9, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> GzipFile: ... -@overload -def open( - filename: StrOrBytesPath | _WritableFileobj, - mode: _WriteBinaryMode, - compresslevel: int = 9, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> GzipFile: ... -@overload -def open( - filename: StrOrBytesPath | _ReadableFileobj | _WritableFileobj, - mode: _OpenTextMode, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: StrOrBytesPath | _ReadableFileobj | _WritableFileobj, - mode: str, - compresslevel: int = 9, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> GzipFile | TextIOWrapper: ... - -class _PaddedFile: - file: _ReadableFileobj - def __init__(self, f: _ReadableFileobj, prepend: bytes = b"") -> None: ... - def read(self, size: int) -> bytes: ... - def prepend(self, prepend: bytes = b"") -> None: ... - def seek(self, off: int) -> int: ... - def seekable(self) -> bool: ... - -class BadGzipFile(OSError): ... - -class GzipFile(BaseStream): - myfileobj: FileIO | None - mode: object - name: str - compress: zlib._Compress - fileobj: _ReadableFileobj | _WritableFileobj - - @overload - def __init__( - self, - filename: StrOrBytesPath | None, - mode: _ReadBinaryMode, - compresslevel: int = 9, - fileobj: _ReadableFileobj | None = None, - mtime: float | None = None, - ) -> None: ... - @overload - def __init__( - self, - *, - mode: _ReadBinaryMode, - compresslevel: int = 9, - fileobj: _ReadableFileobj | None = None, - mtime: float | None = None, - ) -> None: ... - @overload - def __init__( - self, - filename: StrOrBytesPath | None, - mode: _WriteBinaryMode, - compresslevel: int = 9, - fileobj: _WritableFileobj | None = None, - mtime: float | None = None, - ) -> None: ... - @overload - def __init__( - self, - *, - mode: _WriteBinaryMode, - compresslevel: int = 9, - fileobj: _WritableFileobj | None = None, - mtime: float | None = None, - ) -> None: ... - @overload - def __init__( - self, - filename: StrOrBytesPath | None = None, - mode: str | None = None, - compresslevel: int = 9, - fileobj: _ReadableFileobj | _WritableFileobj | None = None, - mtime: float | None = None, - ) -> None: ... - - if sys.version_info < (3, 12): - @property - @deprecated("Deprecated since Python 2.6; removed in Python 3.12. Use `name` attribute instead.") - def filename(self) -> str: ... - - @property - def mtime(self) -> int | None: ... - crc: int - def write(self, data: ReadableBuffer) -> int: ... - def read(self, size: int | None = -1) -> bytes: ... - def read1(self, size: int = -1) -> bytes: ... - def peek(self, n: int) -> bytes: ... - def close(self) -> None: ... - def flush(self, zlib_mode: int = 2) -> None: ... - def fileno(self) -> int: ... - def rewind(self) -> None: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - def readline(self, size: int | None = -1) -> bytes: ... - - if sys.version_info >= (3, 14): - def readinto(self, b: WriteableBuffer) -> int: ... - def readinto1(self, b: WriteableBuffer) -> int: ... - -class _GzipReader(DecompressReader): - def __init__(self, fp: _ReadableFileobj) -> None: ... - -if sys.version_info >= (3, 15): - def compress(data: SizedBuffer, compresslevel: int = 6, *, mtime: float = 0) -> bytes: ... - -elif sys.version_info >= (3, 14): - def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float = 0) -> bytes: ... - -else: - def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ... - -def decompress(data: ReadableBuffer) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/hashlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/hashlib.vpi deleted file mode 100644 index 50bc8e21..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/hashlib.vpi +++ /dev/null @@ -1,112 +0,0 @@ -import sys -from _blake2 import blake2b as blake2b, blake2s as blake2s -from _hashlib import ( - HASH, - _HashObject, - openssl_md5 as md5, - openssl_sha1 as sha1, - openssl_sha3_224 as sha3_224, - openssl_sha3_256 as sha3_256, - openssl_sha3_384 as sha3_384, - openssl_sha3_512 as sha3_512, - openssl_sha224 as sha224, - openssl_sha256 as sha256, - openssl_sha384 as sha384, - openssl_sha512 as sha512, - openssl_shake_128 as shake_128, - openssl_shake_256 as shake_256, - pbkdf2_hmac as pbkdf2_hmac, - scrypt as scrypt, -) -from _typeshed import ReadableBuffer -from collections.abc import Callable, Set as AbstractSet -from typing import Protocol, type_check_only - -if sys.version_info >= (3, 15): - __all__ = ( - "md5", - "sha1", - "sha224", - "sha256", - "sha384", - "sha512", - "blake2b", - "blake2s", - "sha3_224", - "sha3_256", - "sha3_384", - "sha3_512", - "shake_128", - "shake_256", - "new", - "algorithms_guaranteed", - "algorithms_available", - "file_digest", - "pbkdf2_hmac", - "scrypt", - ) -elif sys.version_info >= (3, 11): - __all__ = ( - "md5", - "sha1", - "sha224", - "sha256", - "sha384", - "sha512", - "blake2b", - "blake2s", - "sha3_224", - "sha3_256", - "sha3_384", - "sha3_512", - "shake_128", - "shake_256", - "new", - "algorithms_guaranteed", - "algorithms_available", - "file_digest", - "pbkdf2_hmac", - ) -else: - __all__ = ( - "md5", - "sha1", - "sha224", - "sha256", - "sha384", - "sha512", - "blake2b", - "blake2s", - "sha3_224", - "sha3_256", - "sha3_384", - "sha3_512", - "shake_128", - "shake_256", - "new", - "algorithms_guaranteed", - "algorithms_available", - "pbkdf2_hmac", - ) - -def new(name: str, data: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ... - -algorithms_guaranteed: AbstractSet[str] -algorithms_available: AbstractSet[str] - -if sys.version_info >= (3, 11): - @type_check_only - class _BytesIOLike(Protocol): - def getbuffer(self) -> ReadableBuffer: ... - - @type_check_only - class _FileDigestFileObj(Protocol): - def readinto(self, buf: bytearray, /) -> int: ... - def readable(self) -> bool: ... - - def file_digest( - fileobj: _BytesIOLike | _FileDigestFileObj, digest: str | Callable[[], _HashObject], /, *, _bufsize: int = 262144 - ) -> HASH: ... - -# Legacy typing-only alias -_Hash = HASH diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/heapq.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/heapq.vpi deleted file mode 100644 index 7969aa4e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/heapq.vpi +++ /dev/null @@ -1,32 +0,0 @@ -import sys -from _heapq import * -from _typeshed import SupportsRichComparison, SupportsRichComparisonT as _T -from collections.abc import Callable, Generator, Iterable -from typing import Final, TypeVar, overload - -__all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"] - -if sys.version_info >= (3, 14): - # Added to __all__ in 3.14.1 - __all__ += ["heapify_max", "heappop_max", "heappush_max", "heappushpop_max", "heapreplace_max"] - -_S = TypeVar("_S") - -__about__: Final[str] - -@overload -def merge(*iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison], reverse: bool = False) -> Generator[_S]: ... -@overload -def merge(*iterables: Iterable[_T], key: None = None, reverse: bool = False) -> Generator[_T]: ... - -@overload -def nlargest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison]) -> list[_S]: ... -@overload -def nlargest(n: int, iterable: Iterable[_T], key: None = None) -> list[_T]: ... - -@overload -def nsmallest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison]) -> list[_S]: ... -@overload -def nsmallest(n: int, iterable: Iterable[_T], key: None = None) -> list[_T]: ... - -def _heapify_max(heap: list[SupportsRichComparison], /) -> None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/hmac.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/hmac.vpi deleted file mode 100644 index 9beabcc4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/hmac.vpi +++ /dev/null @@ -1,33 +0,0 @@ -from _hashlib import _HashObject, compare_digest as compare_digest -from _typeshed import ReadableBuffer, SizedBuffer -from collections.abc import Callable -from types import ModuleType -from typing import TypeAlias, overload - -_DigestMod: TypeAlias = str | Callable[[], _HashObject] | ModuleType - -trans_5C: bytes -trans_36: bytes - -digest_size: None - -# In reality digestmod has a default value, but the function always throws an error -# if the argument is not given, so we pretend it is a required argument. -@overload -def new(key: bytes | bytearray, msg: ReadableBuffer | None, digestmod: _DigestMod) -> HMAC: ... -@overload -def new(key: bytes | bytearray, *, digestmod: _DigestMod) -> HMAC: ... - -class HMAC: - __slots__ = ("_hmac", "_inner", "_outer", "block_size", "digest_size") - digest_size: int - block_size: int - @property - def name(self) -> str: ... - def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ... - def update(self, msg: ReadableBuffer) -> None: ... - def digest(self) -> bytes: ... - def hexdigest(self) -> str: ... - def copy(self) -> HMAC: ... - -def digest(key: SizedBuffer, msg: ReadableBuffer, digest: _DigestMod) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/html/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/html/__init__.vpi deleted file mode 100644 index 71e971d1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/html/__init__.vpi +++ /dev/null @@ -1,7 +0,0 @@ -import re - -__all__ = ["escape", "unescape"] - -def escape(s: str, quote: bool = True) -> str: ... -def unescape(s: str) -> str: ... -def _replace_charref(s: re.Match[str]) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/html/entities.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/html/entities.vpi deleted file mode 100644 index e5890d1e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/html/entities.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Final - -__all__ = ["html5", "name2codepoint", "codepoint2name", "entitydefs"] - -name2codepoint: Final[dict[str, int]] -html5: Final[dict[str, str]] -codepoint2name: Final[dict[int, str]] -entitydefs: Final[dict[str, str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/html/parser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/html/parser.vpi deleted file mode 100644 index 08dc7b93..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/html/parser.vpi +++ /dev/null @@ -1,40 +0,0 @@ -from _markupbase import ParserBase -from re import Pattern -from typing import Final - -__all__ = ["HTMLParser"] - -class HTMLParser(ParserBase): - CDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]] - # Added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.6 - RCDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]] - - # `scripting` parameter added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 - def __init__(self, *, convert_charrefs: bool = True, scripting: bool = False) -> None: ... - def feed(self, data: str) -> None: ... - def close(self) -> None: ... - def get_starttag_text(self) -> str | None: ... - def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None: ... - def handle_endtag(self, tag: str) -> None: ... - def handle_startendtag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None: ... - def handle_data(self, data: str) -> None: ... - def handle_entityref(self, name: str) -> None: ... - def handle_charref(self, name: str) -> None: ... - def handle_comment(self, data: str) -> None: ... - def handle_decl(self, decl: str) -> None: ... - def handle_pi(self, data: str) -> None: ... - def check_for_whole_start_tag(self, i: int) -> int: ... # undocumented - def clear_cdata_mode(self) -> None: ... # undocumented - def goahead(self, end: bool) -> None: ... # undocumented - def parse_bogus_comment(self, i: int, report: bool = True) -> int: ... # undocumented - def parse_endtag(self, i: int) -> int: ... # undocumented - def parse_html_declaration(self, i: int) -> int: ... # undocumented - def parse_pi(self, i: int) -> int: ... # undocumented - def parse_starttag(self, i: int) -> int: ... # undocumented - # `escapable` parameter added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.6 - def set_cdata_mode(self, elem: str, *, escapable: bool = False) -> None: ... # undocumented - rawdata: str # undocumented - cdata_elem: str | None # undocumented - convert_charrefs: bool # undocumented - interesting: Pattern[str] # undocumented - lasttag: str # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/http/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/http/__init__.vpi deleted file mode 100644 index f60c3909..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/http/__init__.vpi +++ /dev/null @@ -1,118 +0,0 @@ -import sys -from enum import IntEnum - -if sys.version_info >= (3, 11): - from enum import StrEnum - -if sys.version_info >= (3, 11): - __all__ = ["HTTPStatus", "HTTPMethod"] -else: - __all__ = ["HTTPStatus"] - -class HTTPStatus(IntEnum): - @property - def phrase(self) -> str: ... - @property - def description(self) -> str: ... - - # Keep these synced with the global constants in http/client.pyi. - CONTINUE = 100 - SWITCHING_PROTOCOLS = 101 - PROCESSING = 102 - EARLY_HINTS = 103 - - OK = 200 - CREATED = 201 - ACCEPTED = 202 - NON_AUTHORITATIVE_INFORMATION = 203 - NO_CONTENT = 204 - RESET_CONTENT = 205 - PARTIAL_CONTENT = 206 - MULTI_STATUS = 207 - ALREADY_REPORTED = 208 - IM_USED = 226 - - MULTIPLE_CHOICES = 300 - MOVED_PERMANENTLY = 301 - FOUND = 302 - SEE_OTHER = 303 - NOT_MODIFIED = 304 - USE_PROXY = 305 - TEMPORARY_REDIRECT = 307 - PERMANENT_REDIRECT = 308 - - BAD_REQUEST = 400 - UNAUTHORIZED = 401 - PAYMENT_REQUIRED = 402 - FORBIDDEN = 403 - NOT_FOUND = 404 - METHOD_NOT_ALLOWED = 405 - NOT_ACCEPTABLE = 406 - PROXY_AUTHENTICATION_REQUIRED = 407 - REQUEST_TIMEOUT = 408 - CONFLICT = 409 - GONE = 410 - LENGTH_REQUIRED = 411 - PRECONDITION_FAILED = 412 - if sys.version_info >= (3, 13): - CONTENT_TOO_LARGE = 413 - REQUEST_ENTITY_TOO_LARGE = 413 - if sys.version_info >= (3, 13): - URI_TOO_LONG = 414 - REQUEST_URI_TOO_LONG = 414 - UNSUPPORTED_MEDIA_TYPE = 415 - if sys.version_info >= (3, 13): - RANGE_NOT_SATISFIABLE = 416 - REQUESTED_RANGE_NOT_SATISFIABLE = 416 - EXPECTATION_FAILED = 417 - IM_A_TEAPOT = 418 - MISDIRECTED_REQUEST = 421 - if sys.version_info >= (3, 13): - UNPROCESSABLE_CONTENT = 422 - UNPROCESSABLE_ENTITY = 422 - LOCKED = 423 - FAILED_DEPENDENCY = 424 - TOO_EARLY = 425 - UPGRADE_REQUIRED = 426 - PRECONDITION_REQUIRED = 428 - TOO_MANY_REQUESTS = 429 - REQUEST_HEADER_FIELDS_TOO_LARGE = 431 - UNAVAILABLE_FOR_LEGAL_REASONS = 451 - - INTERNAL_SERVER_ERROR = 500 - NOT_IMPLEMENTED = 501 - BAD_GATEWAY = 502 - SERVICE_UNAVAILABLE = 503 - GATEWAY_TIMEOUT = 504 - HTTP_VERSION_NOT_SUPPORTED = 505 - VARIANT_ALSO_NEGOTIATES = 506 - INSUFFICIENT_STORAGE = 507 - LOOP_DETECTED = 508 - NOT_EXTENDED = 510 - NETWORK_AUTHENTICATION_REQUIRED = 511 - - if sys.version_info >= (3, 12): - @property - def is_informational(self) -> bool: ... - @property - def is_success(self) -> bool: ... - @property - def is_redirection(self) -> bool: ... - @property - def is_client_error(self) -> bool: ... - @property - def is_server_error(self) -> bool: ... - -if sys.version_info >= (3, 11): - class HTTPMethod(StrEnum): - @property - def description(self) -> str: ... - CONNECT = "CONNECT" - DELETE = "DELETE" - GET = "GET" - HEAD = "HEAD" - OPTIONS = "OPTIONS" - PATCH = "PATCH" - POST = "POST" - PUT = "PUT" - TRACE = "TRACE" diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/http/client.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/http/client.vpi deleted file mode 100644 index d22335b5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/http/client.vpi +++ /dev/null @@ -1,318 +0,0 @@ -import email.message -import io -import ssl -import sys -import types -from _typeshed import MaybeNone, ReadableBuffer, StrOrBytesPath, SupportsRead, SupportsReadline, WriteableBuffer -from collections.abc import Callable, Iterable, Iterator, Mapping -from email._policybase import _MessageT -from socket import socket -from typing import BinaryIO, Final, TypeAlias, TypeVar, overload -from typing_extensions import Self, deprecated - -__all__ = [ - "HTTPResponse", - "HTTPConnection", - "HTTPException", - "NotConnected", - "UnknownProtocol", - "UnknownTransferEncoding", - "UnimplementedFileMode", - "IncompleteRead", - "InvalidURL", - "ImproperConnectionState", - "CannotSendRequest", - "CannotSendHeader", - "ResponseNotReady", - "BadStatusLine", - "LineTooLong", - "RemoteDisconnected", - "error", - "responses", - "HTTPSConnection", -] - -_DataType: TypeAlias = SupportsRead[bytes] | Iterable[ReadableBuffer] | ReadableBuffer -_T = TypeVar("_T") -_HeaderValue: TypeAlias = ReadableBuffer | str | int - -HTTP_PORT: Final = 80 -HTTPS_PORT: Final = 443 - -# Keep these global constants in sync with http.HTTPStatus (http/__init__.pyi). -# They are present for backward compatibility reasons. -CONTINUE: Final = 100 -SWITCHING_PROTOCOLS: Final = 101 -PROCESSING: Final = 102 -EARLY_HINTS: Final = 103 - -OK: Final = 200 -CREATED: Final = 201 -ACCEPTED: Final = 202 -NON_AUTHORITATIVE_INFORMATION: Final = 203 -NO_CONTENT: Final = 204 -RESET_CONTENT: Final = 205 -PARTIAL_CONTENT: Final = 206 -MULTI_STATUS: Final = 207 -ALREADY_REPORTED: Final = 208 -IM_USED: Final = 226 - -MULTIPLE_CHOICES: Final = 300 -MOVED_PERMANENTLY: Final = 301 -FOUND: Final = 302 -SEE_OTHER: Final = 303 -NOT_MODIFIED: Final = 304 -USE_PROXY: Final = 305 -TEMPORARY_REDIRECT: Final = 307 -PERMANENT_REDIRECT: Final = 308 - -BAD_REQUEST: Final = 400 -UNAUTHORIZED: Final = 401 -PAYMENT_REQUIRED: Final = 402 -FORBIDDEN: Final = 403 -NOT_FOUND: Final = 404 -METHOD_NOT_ALLOWED: Final = 405 -NOT_ACCEPTABLE: Final = 406 -PROXY_AUTHENTICATION_REQUIRED: Final = 407 -REQUEST_TIMEOUT: Final = 408 -CONFLICT: Final = 409 -GONE: Final = 410 -LENGTH_REQUIRED: Final = 411 -PRECONDITION_FAILED: Final = 412 -if sys.version_info >= (3, 13): - CONTENT_TOO_LARGE: Final = 413 -REQUEST_ENTITY_TOO_LARGE: Final = 413 -if sys.version_info >= (3, 13): - URI_TOO_LONG: Final = 414 -REQUEST_URI_TOO_LONG: Final = 414 -UNSUPPORTED_MEDIA_TYPE: Final = 415 -if sys.version_info >= (3, 13): - RANGE_NOT_SATISFIABLE: Final = 416 -REQUESTED_RANGE_NOT_SATISFIABLE: Final = 416 -EXPECTATION_FAILED: Final = 417 -IM_A_TEAPOT: Final = 418 -MISDIRECTED_REQUEST: Final = 421 -if sys.version_info >= (3, 13): - UNPROCESSABLE_CONTENT: Final = 422 -UNPROCESSABLE_ENTITY: Final = 422 -LOCKED: Final = 423 -FAILED_DEPENDENCY: Final = 424 -TOO_EARLY: Final = 425 -UPGRADE_REQUIRED: Final = 426 -PRECONDITION_REQUIRED: Final = 428 -TOO_MANY_REQUESTS: Final = 429 -REQUEST_HEADER_FIELDS_TOO_LARGE: Final = 431 -UNAVAILABLE_FOR_LEGAL_REASONS: Final = 451 - -INTERNAL_SERVER_ERROR: Final = 500 -NOT_IMPLEMENTED: Final = 501 -BAD_GATEWAY: Final = 502 -SERVICE_UNAVAILABLE: Final = 503 -GATEWAY_TIMEOUT: Final = 504 -HTTP_VERSION_NOT_SUPPORTED: Final = 505 -VARIANT_ALSO_NEGOTIATES: Final = 506 -INSUFFICIENT_STORAGE: Final = 507 -LOOP_DETECTED: Final = 508 -NOT_EXTENDED: Final = 510 -NETWORK_AUTHENTICATION_REQUIRED: Final = 511 - -responses: dict[int, str] - -class HTTPMessage(email.message.Message[str, str]): - def getallmatchingheaders(self, name: str) -> list[str]: ... # undocumented - -@overload -def parse_headers(fp: SupportsReadline[bytes], _class: Callable[[], _MessageT]) -> _MessageT: ... -@overload -def parse_headers(fp: SupportsReadline[bytes]) -> HTTPMessage: ... - -class HTTPResponse(io.BufferedIOBase, BinaryIO): # type: ignore[misc] # incompatible method definitions in the base classes - msg: HTTPMessage - headers: HTTPMessage - version: int - debuglevel: int - fp: io.BufferedReader - closed: bool - status: int - reason: str - chunked: bool - chunk_left: int | None - length: int | None - will_close: bool - # url is set on instances of the class in urllib.request.AbstractHTTPHandler.do_open - # to match urllib.response.addinfourl's interface. - # It's not set in HTTPResponse.__init__ or any other method on the class - url: str - def __init__(self, sock: socket, debuglevel: int = 0, method: str | None = None, url: str | None = None) -> None: ... - def peek(self, n: int = -1) -> bytes: ... - def read(self, amt: int | None = None) -> bytes: ... - def read1(self, n: int = -1) -> bytes: ... - def readinto(self, b: WriteableBuffer) -> int: ... - def readline(self, limit: int = -1) -> bytes: ... # type: ignore[override] - - @overload - def getheader(self, name: str) -> str | None: ... - @overload - def getheader(self, name: str, default: _T) -> str | _T: ... - - def getheaders(self) -> list[tuple[str, str]]: ... - def isclosed(self) -> bool: ... - def __iter__(self) -> Iterator[bytes]: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - @deprecated("Deprecated since Python 3.9. Use `HTTPResponse.headers` attribute instead.") - def info(self) -> HTTPMessage: ... - @deprecated("Deprecated since Python 3.9. Use `HTTPResponse.url` attribute instead.") - def geturl(self) -> str: ... - @deprecated("Deprecated since Python 3.9. Use `HTTPResponse.status` attribute instead.") - def getcode(self) -> int: ... - def begin(self) -> None: ... - -class HTTPConnection: - blocksize: int - auto_open: int # undocumented - debuglevel: int - default_port: int # undocumented - response_class: type[HTTPResponse] # undocumented - timeout: float | None - host: str - port: int - sock: socket | MaybeNone # can be `None` if `.connect()` was not called - if sys.version_info >= (3, 15): - def __init__( - self, - host: str, - port: int | None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - blocksize: int = 8192, - *, - max_response_headers: int | None = None, - ) -> None: ... - else: - def __init__( - self, - host: str, - port: int | None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - blocksize: int = 8192, - ) -> None: ... - - def request( - self, - method: str, - url: str, - body: _DataType | str | None = None, - headers: Mapping[str, _HeaderValue] = {}, - *, - encode_chunked: bool = False, - ) -> None: ... - def getresponse(self) -> HTTPResponse: ... - def set_debuglevel(self, level: int) -> None: ... - if sys.version_info >= (3, 12): - def get_proxy_response_headers(self) -> HTTPMessage | None: ... - - def set_tunnel(self, host: str, port: int | None = None, headers: Mapping[str, str] | None = None) -> None: ... - def connect(self) -> None: ... - def close(self) -> None: ... - def putrequest(self, method: str, url: str, skip_host: bool = False, skip_accept_encoding: bool = False) -> None: ... - def putheader(self, header: str | bytes, *values: _HeaderValue) -> None: ... - def endheaders(self, message_body: _DataType | None = None, *, encode_chunked: bool = False) -> None: ... - def send(self, data: _DataType | str) -> None: ... - -class HTTPSConnection(HTTPConnection): - # Can be `None` if `.connect()` was not called: - sock: ssl.SSLSocket | MaybeNone - if sys.version_info >= (3, 15): - def __init__( - self, - host: str, - port: int | None = None, - *, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - context: ssl.SSLContext | None = None, - blocksize: int = 8192, - max_response_headers: int | None = None, - ) -> None: ... - elif sys.version_info >= (3, 12): - def __init__( - self, - host: str, - port: int | None = None, - *, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - context: ssl.SSLContext | None = None, - blocksize: int = 8192, - ) -> None: ... - else: - @overload - def __init__( - self, - host: str, - port: int | None = None, - key_file: None = None, - cert_file: None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - *, - context: ssl.SSLContext | None = None, - check_hostname: None = None, - blocksize: int = 8192, - ) -> None: ... - @overload - @deprecated( - "The `key_file`, `cert_file`, `check_hostname` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `context` parameter instead." - ) - def __init__( - self, - host: str, - port: int | None = None, - key_file: StrOrBytesPath | None = None, - cert_file: StrOrBytesPath | None = None, - timeout: float | None = ..., - source_address: tuple[str, int] | None = None, - *, - context: ssl.SSLContext | None = None, - check_hostname: bool | None = None, - blocksize: int = 8192, - ) -> None: ... - - key_file: StrOrBytesPath | None - cert_file: StrOrBytesPath | None - -class HTTPException(Exception): ... - -error = HTTPException - -class NotConnected(HTTPException): ... -class InvalidURL(HTTPException): ... - -class UnknownProtocol(HTTPException): - def __init__(self, version: str) -> None: ... - -class UnknownTransferEncoding(HTTPException): ... -class UnimplementedFileMode(HTTPException): ... - -class IncompleteRead(HTTPException): - def __init__(self, partial: bytes, expected: int | None = None) -> None: ... - partial: bytes - expected: int | None - -class ImproperConnectionState(HTTPException): ... -class CannotSendRequest(ImproperConnectionState): ... -class CannotSendHeader(ImproperConnectionState): ... -class ResponseNotReady(ImproperConnectionState): ... - -class BadStatusLine(HTTPException): - def __init__(self, line: str) -> None: ... - -class LineTooLong(HTTPException): - def __init__(self, line_type: str) -> None: ... - -class RemoteDisconnected(ConnectionResetError, BadStatusLine): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookiejar.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookiejar.vpi deleted file mode 100644 index 2cbe432c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookiejar.vpi +++ /dev/null @@ -1,158 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Iterator, Sequence -from http.client import HTTPResponse -from re import Pattern -from typing import ClassVar, TypeVar, overload -from urllib.request import Request - -__all__ = [ - "Cookie", - "CookieJar", - "CookiePolicy", - "DefaultCookiePolicy", - "FileCookieJar", - "LWPCookieJar", - "LoadError", - "MozillaCookieJar", -] - -_T = TypeVar("_T") - -class LoadError(OSError): ... - -class CookieJar: - non_word_re: ClassVar[Pattern[str]] # undocumented - quote_re: ClassVar[Pattern[str]] # undocumented - strict_domain_re: ClassVar[Pattern[str]] # undocumented - domain_re: ClassVar[Pattern[str]] # undocumented - dots_re: ClassVar[Pattern[str]] # undocumented - magic_re: ClassVar[Pattern[str]] # undocumented - def __init__(self, policy: CookiePolicy | None = None) -> None: ... - def add_cookie_header(self, request: Request) -> None: ... - def extract_cookies(self, response: HTTPResponse, request: Request) -> None: ... - def set_policy(self, policy: CookiePolicy) -> None: ... - def make_cookies(self, response: HTTPResponse, request: Request) -> Sequence[Cookie]: ... - def set_cookie(self, cookie: Cookie) -> None: ... - def set_cookie_if_ok(self, cookie: Cookie, request: Request) -> None: ... - def clear(self, domain: str | None = None, path: str | None = None, name: str | None = None) -> None: ... - def clear_session_cookies(self) -> None: ... - def clear_expired_cookies(self) -> None: ... # undocumented - def __iter__(self) -> Iterator[Cookie]: ... - def __len__(self) -> int: ... - -class FileCookieJar(CookieJar): - filename: str | None - delayload: bool - def __init__(self, filename: StrPath | None = None, delayload: bool = False, policy: CookiePolicy | None = None) -> None: ... - def save(self, filename: str | None = None, ignore_discard: bool = False, ignore_expires: bool = False) -> None: ... - def load(self, filename: str | None = None, ignore_discard: bool = False, ignore_expires: bool = False) -> None: ... - def revert(self, filename: str | None = None, ignore_discard: bool = False, ignore_expires: bool = False) -> None: ... - -class MozillaCookieJar(FileCookieJar): ... - -class LWPCookieJar(FileCookieJar): - def as_lwp_str(self, ignore_discard: bool = True, ignore_expires: bool = True) -> str: ... # undocumented - -class CookiePolicy: - netscape: bool - rfc2965: bool - hide_cookie2: bool - def set_ok(self, cookie: Cookie, request: Request) -> bool: ... - def return_ok(self, cookie: Cookie, request: Request) -> bool: ... - def domain_return_ok(self, domain: str, request: Request) -> bool: ... - def path_return_ok(self, path: str, request: Request) -> bool: ... - -class DefaultCookiePolicy(CookiePolicy): - rfc2109_as_netscape: bool - strict_domain: bool - strict_rfc2965_unverifiable: bool - strict_ns_unverifiable: bool - strict_ns_domain: int - strict_ns_set_initial_dollar: bool - strict_ns_set_path: bool - DomainStrictNoDots: ClassVar[int] - DomainStrictNonDomain: ClassVar[int] - DomainRFC2965Match: ClassVar[int] - DomainLiberal: ClassVar[int] - DomainStrict: ClassVar[int] - def __init__( - self, - blocked_domains: Sequence[str] | None = None, - allowed_domains: Sequence[str] | None = None, - netscape: bool = True, - rfc2965: bool = False, - rfc2109_as_netscape: bool | None = None, - hide_cookie2: bool = False, - strict_domain: bool = False, - strict_rfc2965_unverifiable: bool = True, - strict_ns_unverifiable: bool = False, - strict_ns_domain: int = 0, - strict_ns_set_initial_dollar: bool = False, - strict_ns_set_path: bool = False, - secure_protocols: Sequence[str] = ("https", "wss"), - ) -> None: ... - def blocked_domains(self) -> tuple[str, ...]: ... - def set_blocked_domains(self, blocked_domains: Sequence[str]) -> None: ... - def is_blocked(self, domain: str) -> bool: ... - def allowed_domains(self) -> tuple[str, ...] | None: ... - def set_allowed_domains(self, allowed_domains: Sequence[str] | None) -> None: ... - def is_not_allowed(self, domain: str) -> bool: ... - def set_ok_version(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def set_ok_verifiability(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def set_ok_name(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def set_ok_path(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def set_ok_domain(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def set_ok_port(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_version(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_verifiability(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_secure(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_expires(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_port(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - def return_ok_domain(self, cookie: Cookie, request: Request) -> bool: ... # undocumented - -class Cookie: - version: int | None - name: str - value: str | None - port: str | None - path: str - path_specified: bool - secure: bool - expires: int | None - discard: bool - comment: str | None - comment_url: str | None - rfc2109: bool - port_specified: bool - domain: str # undocumented - domain_specified: bool - domain_initial_dot: bool - def __init__( - self, - version: int | None, - name: str, - value: str | None, # undocumented - port: str | None, - port_specified: bool, - domain: str, - domain_specified: bool, - domain_initial_dot: bool, - path: str, - path_specified: bool, - secure: bool, - expires: int | None, - discard: bool, - comment: str | None, - comment_url: str | None, - rest: dict[str, str], - rfc2109: bool = False, - ) -> None: ... - def has_nonstandard_attr(self, name: str) -> bool: ... - - @overload - def get_nonstandard_attr(self, name: str) -> str | None: ... - @overload - def get_nonstandard_attr(self, name: str, default: _T) -> str | _T: ... - - def set_nonstandard_attr(self, name: str, value: str) -> None: ... - def is_expired(self, now: int | None = None) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookies.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookies.vpi deleted file mode 100644 index bdec1068..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/http/cookies.vpi +++ /dev/null @@ -1,53 +0,0 @@ -from _typeshed import MaybeNone, SupportsItems, SupportsKeysAndGetItem -from collections.abc import Container, Iterable -from types import GenericAlias -from typing import Any, Generic, TypeVar, overload - -__all__ = ["CookieError", "BaseCookie", "SimpleCookie"] - -_T = TypeVar("_T") - -@overload -def _quote(str: None) -> None: ... -@overload -def _quote(str: str) -> str: ... - -@overload -def _unquote(str: None) -> None: ... -@overload -def _unquote(str: str) -> str: ... - -class CookieError(Exception): ... - -class Morsel(dict[str, Any], Generic[_T]): - @property - def value(self) -> str | MaybeNone: ... - @property - def coded_value(self) -> _T | MaybeNone: ... - @property - def key(self) -> str | MaybeNone: ... - def __init__(self) -> None: ... - def set(self, key: str, val: str, coded_val: _T) -> None: ... - def setdefault(self, key: str, val: str | None = None) -> str: ... - # The dict update can also get a keywords argument so this is incompatible - def update(self, values: Iterable[tuple[str, str]] | SupportsKeysAndGetItem[str, str]) -> None: ... # type: ignore[override] - def isReservedKey(self, K: str) -> bool: ... - def output(self, attrs: Container[str] | None = None, header: str = "Set-Cookie:") -> str: ... - __str__ = output - def js_output(self, attrs: Container[str] | None = None) -> str: ... - def OutputString(self, attrs: Container[str] | None = None) -> str: ... - def __eq__(self, morsel: object) -> bool: ... - def __setitem__(self, K: str, V: Any) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class BaseCookie(dict[str, Morsel[_T]], Generic[_T]): - def __init__(self, input: str | SupportsItems[str, str | Morsel[Any]] | None = None) -> None: ... - def value_decode(self, val: str) -> tuple[_T, str]: ... - def value_encode(self, val: _T) -> tuple[str, str]: ... - def output(self, attrs: Container[str] | None = None, header: str = "Set-Cookie:", sep: str = "\r\n") -> str: ... - __str__ = output - def js_output(self, attrs: Container[str] | None = None) -> str: ... - def load(self, rawdata: str | SupportsItems[str, str | Morsel[Any]]) -> None: ... - def __setitem__(self, key: str, value: str | Morsel[_T]) -> None: ... - -class SimpleCookie(BaseCookie[str]): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/http/server.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/http/server.vpi deleted file mode 100644 index 88cd2469..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/http/server.vpi +++ /dev/null @@ -1,139 +0,0 @@ -import _socket -import email.message -import io -import socketserver -import sys -from _ssl import _PasswordType -from _typeshed import ReadableBuffer, StrOrBytesPath, StrPath, SupportsRead, SupportsWrite -from collections.abc import Callable, Iterable, Mapping, Sequence -from ssl import Purpose, SSLContext -from typing import Any, AnyStr, BinaryIO, ClassVar, Protocol, type_check_only -from typing_extensions import Self, deprecated - -__all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler"] -if sys.version_info < (3, 15): - __all__ += ["CGIHTTPRequestHandler"] -if sys.version_info >= (3, 14): - __all__ = ["HTTPSServer", "ThreadingHTTPSServer"] - -class HTTPServer(socketserver.TCPServer): - server_name: str - server_port: int - -class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer): ... - -if sys.version_info >= (3, 14): - @type_check_only - class _SSLModule(Protocol): - @staticmethod - def create_default_context( - purpose: Purpose = ..., - *, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadata: str | ReadableBuffer | None = None, - ) -> SSLContext: ... - - class HTTPSServer(HTTPServer): - ssl: _SSLModule - certfile: StrOrBytesPath - keyfile: StrOrBytesPath | None - password: _PasswordType | None - alpn_protocols: Iterable[str] - def __init__( - self, - server_address: socketserver._AfInetAddress, - RequestHandlerClass: Callable[[Any, _socket._RetAddress, Self], socketserver.BaseRequestHandler], - bind_and_activate: bool = True, - *, - certfile: StrOrBytesPath, - keyfile: StrOrBytesPath | None = None, - password: _PasswordType | None = None, - alpn_protocols: Iterable[str] | None = None, - ) -> None: ... - def server_activate(self) -> None: ... - - class ThreadingHTTPSServer(socketserver.ThreadingMixIn, HTTPSServer): ... - -class BaseHTTPRequestHandler(socketserver.StreamRequestHandler): - client_address: tuple[str, int] - close_connection: bool - requestline: str - command: str - path: str - request_version: str - headers: email.message.Message - server_version: str - sys_version: str - error_message_format: str - error_content_type: str - protocol_version: str - MessageClass: type - responses: Mapping[int, tuple[str, str]] - if sys.version_info >= (3, 15): - default_content_type: str - default_request_version: str # undocumented - weekdayname: ClassVar[Sequence[str]] # undocumented - monthname: ClassVar[Sequence[str | None]] # undocumented - def handle_one_request(self) -> None: ... - def handle_expect_100(self) -> bool: ... - def send_error(self, code: int, message: str | None = None, explain: str | None = None) -> None: ... - def send_response(self, code: int, message: str | None = None) -> None: ... - def send_header(self, keyword: str, value: str) -> None: ... - def send_response_only(self, code: int, message: str | None = None) -> None: ... - def end_headers(self) -> None: ... - def flush_headers(self) -> None: ... - def log_request(self, code: int | str = "-", size: int | str = "-") -> None: ... - def log_error(self, format: str, *args: Any) -> None: ... - def log_message(self, format: str, *args: Any) -> None: ... - def version_string(self) -> str: ... - def date_time_string(self, timestamp: float | None = None) -> str: ... - def log_date_time_string(self) -> str: ... - def address_string(self) -> str: ... - def parse_request(self) -> bool: ... # undocumented - -class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): - extensions_map: dict[str, str] - if sys.version_info >= (3, 12): - index_pages: ClassVar[tuple[str, ...]] - directory: str - if sys.version_info >= (3, 15): - def __init__( - self, - request: socketserver._RequestType, - client_address: _socket._RetAddress, - server: socketserver.BaseServer, - *, - directory: StrPath | None = None, - extra_response_headers: Mapping[str, str] | None = None, - ) -> None: ... - else: - def __init__( - self, - request: socketserver._RequestType, - client_address: _socket._RetAddress, - server: socketserver.BaseServer, - *, - directory: StrPath | None = None, - ) -> None: ... - - def do_GET(self) -> None: ... - def do_HEAD(self) -> None: ... - def send_head(self) -> io.BytesIO | BinaryIO | None: ... # undocumented - def list_directory(self, path: StrPath) -> io.BytesIO | None: ... # undocumented - def translate_path(self, path: str) -> str: ... # undocumented - def copyfile(self, source: SupportsRead[AnyStr], outputfile: SupportsWrite[AnyStr]) -> None: ... # undocumented - def guess_type(self, path: StrPath) -> str: ... # undocumented - -def executable(path: StrPath) -> bool: ... # undocumented - -if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): - cgi_directories: list[str] - have_fork: bool # undocumented - def do_POST(self) -> None: ... - def is_cgi(self) -> bool: ... # undocumented - def is_executable(self, path: StrPath) -> bool: ... # undocumented - def is_python(self, path: StrPath) -> bool: ... # undocumented - def run_cgi(self) -> None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/imaplib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/imaplib.vpi deleted file mode 100644 index fd14e45e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/imaplib.vpi +++ /dev/null @@ -1,195 +0,0 @@ -import subprocess -import sys -import time -from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, Unused -from builtins import list as _list # conflicts with a method named "list" -from collections.abc import Callable, Generator -from datetime import datetime -from re import Pattern -from socket import socket as _socket -from ssl import SSLContext, SSLSocket -from types import TracebackType -from typing import IO, Any, Literal, SupportsAbs, SupportsInt, TypeAlias, overload -from typing_extensions import Self, deprecated - -__all__ = ["IMAP4", "IMAP4_stream", "Internaldate2tuple", "Int2AP", "ParseFlags", "Time2Internaldate", "IMAP4_SSL"] - -# TODO: Commands should use their actual return types, not this type alias. -# E.g. Tuple[Literal["OK"], List[bytes]] -_CommandResults: TypeAlias = tuple[str, list[Any]] - -_AnyResponseData: TypeAlias = list[None] | list[bytes | tuple[bytes, bytes]] - -Commands: dict[str, tuple[str, ...]] - -class IMAP4: - class error(Exception): ... - class abort(error): ... - class readonly(abort): ... - utf8_enabled: bool - mustquote: Pattern[str] - debug: int - state: str - literal: str | None - tagged_commands: dict[bytes, _list[bytes] | None] - untagged_responses: dict[str, _list[bytes | tuple[bytes, bytes]]] - continuation_response: str - is_readonly: bool - tagnum: int - tagpre: str - tagre: Pattern[str] - welcome: bytes - capabilities: tuple[str, ...] - PROTOCOL_VERSION: str - def __init__(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ... - def open(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ... - if sys.version_info >= (3, 14): - @property - @deprecated("IMAP4.file is unsupported, can cause errors, and may be removed.") - def file(self) -> IO[str] | IO[bytes]: ... - else: - file: IO[str] | IO[bytes] - - def __getattr__(self, attr: str) -> Any: ... - host: str - port: int - sock: _socket - def read(self, size: int) -> bytes: ... - def readline(self) -> bytes: ... - def send(self, data: ReadableBuffer) -> None: ... - def shutdown(self) -> None: ... - def socket(self) -> _socket: ... - def recent(self) -> _CommandResults: ... - def response(self, code: str) -> _CommandResults: ... - def append( - self, mailbox: str | None, flags: str | None, date_time: _TimeLike | None, message: ReadableBuffer - ) -> tuple[str, _list[bytes]]: ... - def authenticate(self, mechanism: str, authobject: Callable[[bytes], bytes | None]) -> tuple[str, str]: ... - def capability(self) -> _CommandResults: ... - def check(self) -> _CommandResults: ... - def close(self) -> _CommandResults: ... - def copy(self, message_set: str, new_mailbox: str) -> _CommandResults: ... - def create(self, mailbox: str) -> _CommandResults: ... - def delete(self, mailbox: str) -> _CommandResults: ... - def deleteacl(self, mailbox: str, who: str) -> _CommandResults: ... - def enable(self, capability: str) -> _CommandResults: ... - def __enter__(self) -> Self: ... - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - def expunge(self) -> _CommandResults: ... - def fetch(self, message_set: str, message_parts: str) -> tuple[str, _AnyResponseData]: ... - def getacl(self, mailbox: str) -> _CommandResults: ... - def getannotation(self, mailbox: str, entry: str, attribute: str) -> _CommandResults: ... - def getquota(self, root: str) -> _CommandResults: ... - def getquotaroot(self, mailbox: str) -> _CommandResults: ... - if sys.version_info >= (3, 14): - def idle(self, duration: float | None = None) -> Idler: ... - - def list(self, directory: str = '""', pattern: str = "*") -> tuple[str, _AnyResponseData]: ... - def login(self, user: str, password: str) -> tuple[Literal["OK"], _list[bytes]]: ... - def login_cram_md5(self, user: str, password: str) -> _CommandResults: ... - def logout(self) -> tuple[str, _AnyResponseData]: ... - def lsub(self, directory: str = '""', pattern: str = "*") -> _CommandResults: ... - def myrights(self, mailbox: str) -> _CommandResults: ... - def namespace(self) -> _CommandResults: ... - def noop(self) -> tuple[str, _list[bytes]]: ... - def partial(self, message_num: str, message_part: str, start: str, length: str) -> _CommandResults: ... - def proxyauth(self, user: str) -> _CommandResults: ... - def rename(self, oldmailbox: str, newmailbox: str) -> _CommandResults: ... - def search(self, charset: str | None, *criteria: str) -> _CommandResults: ... - def select(self, mailbox: str = "INBOX", readonly: bool = False) -> tuple[str, _list[bytes | None]]: ... - def setacl(self, mailbox: str, who: str, what: str) -> _CommandResults: ... - def setannotation(self, *args: str) -> _CommandResults: ... - def setquota(self, root: str, limits: str) -> _CommandResults: ... - def sort(self, sort_criteria: str, charset: str, *search_criteria: str) -> _CommandResults: ... - def starttls(self, ssl_context: Any | None = None) -> tuple[Literal["OK"], _list[None]]: ... - def status(self, mailbox: str, names: str) -> _CommandResults: ... - def store(self, message_set: str, command: str, flags: str) -> _CommandResults: ... - def subscribe(self, mailbox: str) -> _CommandResults: ... - def thread(self, threading_algorithm: str, charset: str, *search_criteria: str) -> _CommandResults: ... - def uid(self, command: str, *args: str) -> _CommandResults: ... - def unsubscribe(self, mailbox: str) -> _CommandResults: ... - def unselect(self) -> _CommandResults: ... - def xatom(self, name: str, *args: str) -> _CommandResults: ... - def print_log(self) -> None: ... - -if sys.version_info >= (3, 14): - class Idler: - def __init__(self, imap: IMAP4, duration: float | None = None) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc_type: object, exc_val: Unused, exc_tb: Unused) -> Literal[False]: ... - def __iter__(self) -> Self: ... - def __next__(self) -> tuple[str, float | None]: ... - def burst(self, interval: float = 0.1) -> Generator[tuple[str, float | None]]: ... - -class IMAP4_SSL(IMAP4): - if sys.version_info >= (3, 12): - def __init__( - self, host: str = "", port: int = 993, *, ssl_context: SSLContext | None = None, timeout: float | None = None - ) -> None: ... - else: - @overload - def __init__( - self, - host: str = "", - port: int = 993, - keyfile: None = None, - certfile: None = None, - ssl_context: SSLContext | None = None, - timeout: float | None = None, - ) -> None: ... - @overload - @deprecated( - "The `keyfile`, `certfile` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `ssl_context` parameter instead." - ) - def __init__( - self, - host: str = "", - port: int = 993, - keyfile: StrOrBytesPath | None = None, - certfile: StrOrBytesPath | None = None, - ssl_context: None = None, - timeout: float | None = None, - ) -> None: ... - - keyfile: StrOrBytesPath | None - certfile: StrOrBytesPath | None - sslobj: SSLSocket - if sys.version_info >= (3, 14): - @property - @deprecated("IMAP4_SSL.file is unsupported, can cause errors, and may be removed.") - def file(self) -> IO[Any]: ... - else: - file: IO[Any] - - def open(self, host: str = "", port: int | None = 993, timeout: float | None = None) -> None: ... - def ssl(self) -> SSLSocket: ... - -class IMAP4_stream(IMAP4): - command: str - def __init__(self, command: str) -> None: ... - if sys.version_info >= (3, 14): - @property - @deprecated("IMAP4_stream.file is unsupported, can cause errors, and may be removed.") - def file(self) -> IO[Any]: ... - else: - file: IO[Any] - process: subprocess.Popen[bytes] - writefile: IO[Any] - readfile: IO[Any] - def open(self, host: str | None = None, port: int | None = None, timeout: float | None = None) -> None: ... - -class _Authenticator: - mech: Callable[[bytes], bytes | bytearray | memoryview | str | None] - def __init__(self, mechinst: Callable[[bytes], bytes | bytearray | memoryview | str | None]) -> None: ... - def process(self, data: str) -> str: ... - def encode(self, inp: bytes | bytearray | memoryview) -> str: ... - def decode(self, inp: str | SizedBuffer) -> bytes: ... - -def Internaldate2tuple(resp: ReadableBuffer) -> time.struct_time | None: ... -def Int2AP(num: SupportsAbs[SupportsInt]) -> bytes: ... -def ParseFlags(resp: ReadableBuffer) -> tuple[bytes, ...]: ... - -_TimeLike: TypeAlias = float | time.struct_time | time._TimeTuple | datetime | str - -def Time2Internaldate(date_time: _TimeLike) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/imghdr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/imghdr.vpi deleted file mode 100644 index e45ca3eb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/imghdr.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Callable -from typing import Any, BinaryIO, Protocol, overload, type_check_only - -__all__ = ["what"] - -@type_check_only -class _ReadableBinary(Protocol): - def tell(self) -> int: ... - def read(self, size: int, /) -> bytes: ... - def seek(self, offset: int, /) -> Any: ... - -@overload -def what(file: StrPath | _ReadableBinary, h: None = None) -> str | None: ... -@overload -def what(file: Any, h: bytes) -> str | None: ... - -tests: list[Callable[[bytes, BinaryIO | None], str | None]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/imp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/imp.vpi deleted file mode 100644 index b5b4223a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/imp.vpi +++ /dev/null @@ -1,63 +0,0 @@ -import types -from _imp import ( - acquire_lock as acquire_lock, - create_dynamic as create_dynamic, - get_frozen_object as get_frozen_object, - init_frozen as init_frozen, - is_builtin as is_builtin, - is_frozen as is_frozen, - is_frozen_package as is_frozen_package, - lock_held as lock_held, - release_lock as release_lock, -) -from _typeshed import StrPath -from os import PathLike -from types import TracebackType -from typing import IO, Any, Final, Protocol, type_check_only - -SEARCH_ERROR: Final = 0 -PY_SOURCE: Final = 1 -PY_COMPILED: Final = 2 -C_EXTENSION: Final = 3 -PY_RESOURCE: Final = 4 -PKG_DIRECTORY: Final = 5 -C_BUILTIN: Final = 6 -PY_FROZEN: Final = 7 -PY_CODERESOURCE: Final = 8 -IMP_HOOK: Final = 9 - -def new_module(name: str) -> types.ModuleType: ... -def get_magic() -> bytes: ... -def get_tag() -> str: ... -def cache_from_source(path: StrPath, debug_override: bool | None = None) -> str: ... -def source_from_cache(path: StrPath) -> str: ... -def get_suffixes() -> list[tuple[str, str, int]]: ... - -class NullImporter: - def __init__(self, path: StrPath) -> None: ... - def find_module(self, fullname: Any) -> None: ... - -# Technically, a text file has to support a slightly different set of operations than a binary file, -# but we ignore that here. -@type_check_only -class _FileLike(Protocol): - closed: bool - mode: str - def read(self) -> str | bytes: ... - def close(self) -> Any: ... - def __enter__(self) -> Any: ... - def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None, /) -> Any: ... - -# PathLike doesn't work for the pathname argument here -def load_source(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ... -def load_compiled(name: str, pathname: str, file: _FileLike | None = None) -> types.ModuleType: ... -def load_package(name: str, path: StrPath) -> types.ModuleType: ... -def load_module(name: str, file: _FileLike | None, filename: str, details: tuple[str, str, int]) -> types.ModuleType: ... - -# IO[Any] is a TextIOWrapper if name is a .py file, and a FileIO otherwise. -def find_module( - name: str, path: None | list[str] | list[PathLike[str]] | list[StrPath] = None -) -> tuple[IO[Any], str, tuple[str, str, int]]: ... -def reload(module: types.ModuleType) -> types.ModuleType: ... -def init_builtin(name: str) -> types.ModuleType | None: ... -def load_dynamic(name: str, path: str, file: Any = None) -> types.ModuleType: ... # file argument is ignored diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/__init__.vpi deleted file mode 100644 index d60f90ad..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/__init__.vpi +++ /dev/null @@ -1,17 +0,0 @@ -import sys -from importlib._bootstrap import __import__ as __import__ -from importlib.abc import Loader -from types import ModuleType -from typing_extensions import deprecated - -__all__ = ["__import__", "import_module", "invalidate_caches", "reload"] - -# `importlib.import_module` return type should be kept the same as `builtins.__import__` -def import_module(name: str, package: str | None = None) -> ModuleType: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `importlib.util.find_spec()` instead.") - def find_loader(name: str, path: str | None = None) -> Loader | None: ... - -def invalidate_caches() -> None: ... -def reload(module: ModuleType) -> ModuleType: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_abc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_abc.vpi deleted file mode 100644 index e8c80c04..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_abc.vpi +++ /dev/null @@ -1,19 +0,0 @@ -import sys -import types -from abc import ABCMeta -from importlib.machinery import ModuleSpec -from typing_extensions import deprecated - -class Loader(metaclass=ABCMeta): - def load_module(self, fullname: str) -> types.ModuleType: ... - if sys.version_info < (3, 12): - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "The module spec is now used by the import machinery to generate a module repr." - ) - def module_repr(self, module: types.ModuleType) -> str: ... - - def create_module(self, spec: ModuleSpec) -> types.ModuleType | None: ... - # Not defined on the actual class for backwards-compatibility reasons, - # but expected in new code. - def exec_module(self, module: types.ModuleType) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap.vpi deleted file mode 100644 index 02427ff4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap.vpi +++ /dev/null @@ -1,2 +0,0 @@ -from _frozen_importlib import * -from _frozen_importlib import __import__ as __import__, _init_module_attrs as _init_module_attrs diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap_external.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap_external.vpi deleted file mode 100644 index 6210ce70..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/_bootstrap_external.vpi +++ /dev/null @@ -1,2 +0,0 @@ -from _frozen_importlib_external import * -from _frozen_importlib_external import _NamespaceLoader as _NamespaceLoader diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/abc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/abc.vpi deleted file mode 100644 index 945b8d20..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/abc.vpi +++ /dev/null @@ -1,150 +0,0 @@ -import _ast -import sys -import types -from _typeshed import ReadableBuffer, StrPath -from abc import ABCMeta, abstractmethod -from collections.abc import Iterator, Mapping, Sequence -from importlib import _bootstrap_external -from importlib._abc import Loader as Loader -from importlib.machinery import ModuleSpec -from io import BufferedReader -from typing import IO, Any, Literal, Protocol, overload, runtime_checkable -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - __all__ = [ - "Loader", - "MetaPathFinder", - "PathEntryFinder", - "ResourceLoader", - "InspectLoader", - "ExecutionLoader", - "FileLoader", - "SourceLoader", - ] - - if sys.version_info < (3, 12): - __all__ += ["Finder", "ResourceReader", "Traversable", "TraversableResources"] - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use `MetaPathFinder` or `PathEntryFinder` instead.") - class Finder(metaclass=ABCMeta): ... - -@deprecated("Deprecated since Python 3.7. Use `importlib.resources.abc.TraversableResources` instead.") -class ResourceLoader(Loader): - @abstractmethod - def get_data(self, path: str) -> bytes: ... - -class InspectLoader(Loader): - def is_package(self, fullname: str) -> bool: ... - def get_code(self, fullname: str) -> types.CodeType | None: ... - @abstractmethod - def get_source(self, fullname: str) -> str | None: ... - def exec_module(self, module: types.ModuleType) -> None: ... - @staticmethod - def source_to_code( - data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, path: bytes | StrPath = "" - ) -> types.CodeType: ... - -class ExecutionLoader(InspectLoader): - @abstractmethod - def get_filename(self, fullname: str) -> str: ... - -class SourceLoader(_bootstrap_external.SourceLoader, ResourceLoader, ExecutionLoader, metaclass=ABCMeta): # type: ignore[misc] # incompatible definitions of source_to_code in the base classes - @deprecated("Deprecated since Python 3.3. Use `importlib.resources.abc.SourceLoader.path_stats` instead.") - def path_mtime(self, path: str) -> float: ... - def set_data(self, path: str, data: bytes) -> None: ... - def get_source(self, fullname: str) -> str | None: ... - def path_stats(self, path: str) -> Mapping[str, Any]: ... - -# Please keep in sync with _typeshed.importlib.MetaPathFinderProtocol -class MetaPathFinder(metaclass=ABCMeta): - if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `MetaPathFinder.find_spec()` instead.") - def find_module(self, fullname: str, path: Sequence[str] | None) -> Loader | None: ... - - def invalidate_caches(self) -> None: ... - # Not defined on the actual class, but expected to exist. - def find_spec( - self, fullname: str, path: Sequence[str] | None, target: types.ModuleType | None = ..., / - ) -> ModuleSpec | None: ... - -class PathEntryFinder(metaclass=ABCMeta): - if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `PathEntryFinder.find_spec()` instead.") - def find_module(self, fullname: str) -> Loader | None: ... - @deprecated("Deprecated since Python 3.4; removed in Python 3.12. Use `find_spec()` instead.") - def find_loader(self, fullname: str) -> tuple[Loader | None, Sequence[str]]: ... - - def invalidate_caches(self) -> None: ... - # Not defined on the actual class, but expected to exist. - def find_spec(self, fullname: str, target: types.ModuleType | None = ...) -> ModuleSpec | None: ... - -class FileLoader(_bootstrap_external.FileLoader, ResourceLoader, ExecutionLoader, metaclass=ABCMeta): - name: str - path: str - def __init__(self, fullname: str, path: str) -> None: ... - def get_data(self, path: str) -> bytes: ... - def get_filename(self, fullname: str | None = None) -> str: ... - def load_module(self, fullname: str | None = None) -> types.ModuleType: ... - -if sys.version_info < (3, 11): - class ResourceReader(metaclass=ABCMeta): - @abstractmethod - def open_resource(self, resource: str) -> IO[bytes]: ... - @abstractmethod - def resource_path(self, resource: str) -> str: ... - @abstractmethod - def is_resource(self, path: str) -> bool: ... - @abstractmethod - def contents(self) -> Iterator[str]: ... - - @runtime_checkable - class Traversable(Protocol): - @abstractmethod - def is_dir(self) -> bool: ... - @abstractmethod - def is_file(self) -> bool: ... - @abstractmethod - def iterdir(self) -> Iterator[Traversable]: ... - - if sys.version_info >= (3, 11): - @abstractmethod - def joinpath(self, *descendants: str) -> Traversable: ... - else: - @abstractmethod - def joinpath(self, child: str, /) -> Traversable: ... - - # The documentation and runtime protocol allows *args, **kwargs arguments, - # but this would mean that all implementers would have to support them, - # which is not the case. - @overload - @abstractmethod - def open(self, mode: Literal["r"] = "r", *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ... - @overload - @abstractmethod - def open(self, mode: Literal["rb"]) -> IO[bytes]: ... - - @property - @abstractmethod - def name(self) -> str: ... - def __truediv__(self, child: str, /) -> Traversable: ... - @abstractmethod - def read_bytes(self) -> bytes: ... - @abstractmethod - def read_text(self, encoding: str | None = None) -> str: ... - - class TraversableResources(ResourceReader): - @abstractmethod - def files(self) -> Traversable: ... - def open_resource(self, resource: str) -> BufferedReader: ... - def resource_path(self, resource: Any) -> str: ... - def is_resource(self, path: str) -> bool: ... - def contents(self) -> Iterator[str]: ... - -elif sys.version_info < (3, 14): - from importlib.resources.abc import ( - ResourceReader as ResourceReader, - Traversable as Traversable, - TraversableResources as TraversableResources, - ) diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/machinery.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/machinery.vpi deleted file mode 100644 index 767046b7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/machinery.vpi +++ /dev/null @@ -1,43 +0,0 @@ -import sys -from importlib._bootstrap import BuiltinImporter as BuiltinImporter, FrozenImporter as FrozenImporter, ModuleSpec as ModuleSpec -from importlib._bootstrap_external import ( - BYTECODE_SUFFIXES as BYTECODE_SUFFIXES, - DEBUG_BYTECODE_SUFFIXES as DEBUG_BYTECODE_SUFFIXES, - EXTENSION_SUFFIXES as EXTENSION_SUFFIXES, - OPTIMIZED_BYTECODE_SUFFIXES as OPTIMIZED_BYTECODE_SUFFIXES, - SOURCE_SUFFIXES as SOURCE_SUFFIXES, - ExtensionFileLoader as ExtensionFileLoader, - FileFinder as FileFinder, - PathFinder as PathFinder, - SourceFileLoader as SourceFileLoader, - SourcelessFileLoader as SourcelessFileLoader, - WindowsRegistryFinder as WindowsRegistryFinder, -) - -if sys.version_info >= (3, 11): - from importlib._bootstrap_external import NamespaceLoader as NamespaceLoader -if sys.version_info >= (3, 14): - from importlib._bootstrap_external import AppleFrameworkLoader as AppleFrameworkLoader - -def all_suffixes() -> list[str]: ... - -if sys.version_info >= (3, 14): - __all__ = [ - "AppleFrameworkLoader", - "BYTECODE_SUFFIXES", - "BuiltinImporter", - "DEBUG_BYTECODE_SUFFIXES", - "EXTENSION_SUFFIXES", - "ExtensionFileLoader", - "FileFinder", - "FrozenImporter", - "ModuleSpec", - "NamespaceLoader", - "OPTIMIZED_BYTECODE_SUFFIXES", - "PathFinder", - "SOURCE_SUFFIXES", - "SourceFileLoader", - "SourcelessFileLoader", - "WindowsRegistryFinder", - "all_suffixes", - ] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/__init__.vpi deleted file mode 100644 index 866fd969..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/__init__.vpi +++ /dev/null @@ -1,310 +0,0 @@ -import abc -import pathlib -import sys -import types -from _collections_abc import dict_keys, dict_values -from _typeshed import StrPath -from collections.abc import Iterable, Iterator, Mapping -from importlib.abc import MetaPathFinder -from importlib.metadata._meta import PackageMetadata as PackageMetadata, SimplePath -from os import PathLike -from re import Pattern -from typing import Any, ClassVar, Generic, NamedTuple, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, deprecated, disjoint_base - -_T = TypeVar("_T") -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") - -__all__ = [ - "Distribution", - "DistributionFinder", - "PackageMetadata", - "PackageNotFoundError", - "distribution", - "distributions", - "entry_points", - "files", - "metadata", - "packages_distributions", - "requires", - "version", -] - -if sys.version_info >= (3, 15): - __all__ += ["PackagePath", "MetadataNotFound", "SimplePath"] - -_SimplePath: TypeAlias = SimplePath - -def packages_distributions() -> Mapping[str, list[str]]: ... - -class PackageNotFoundError(ModuleNotFoundError): - @property - def name(self) -> str: ... # type: ignore[override] - -if sys.version_info >= (3, 15): - class MetadataNotFound(FileNotFoundError): ... - -if sys.version_info >= (3, 13): - _EntryPointBase = object -elif sys.version_info >= (3, 11): - class DeprecatedTuple: - def __getitem__(self, item: int) -> str: ... - - _EntryPointBase = DeprecatedTuple -else: - @type_check_only - class _EntryPointBase(NamedTuple): - name: str - value: str - group: str - -if sys.version_info >= (3, 11): - class EntryPoint(_EntryPointBase): - pattern: ClassVar[Pattern[str]] - name: str - value: str - group: str - - def __init__(self, name: str, value: str, group: str) -> None: ... - def load(self) -> Any: ... # Callable[[], Any] or an importable module - @property - def extras(self) -> list[str]: ... - @property - def module(self) -> str: ... - @property - def attr(self) -> str: ... - dist: ClassVar[Distribution | None] - def matches( - self, - *, - name: str = ..., - value: str = ..., - group: str = ..., - module: str = ..., - attr: str = ..., - extras: list[str] = ..., - ) -> bool: ... # undocumented - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - def __lt__(self, other: object) -> bool: ... - if sys.version_info < (3, 12): - def __iter__(self) -> Iterator[Any]: ... # result of iter((str, Self)), really - -else: - @disjoint_base - class EntryPoint(_EntryPointBase): - pattern: ClassVar[Pattern[str]] - - def load(self) -> Any: ... # Callable[[], Any] or an importable module - @property - def extras(self) -> list[str]: ... - @property - def module(self) -> str: ... - @property - def attr(self) -> str: ... - dist: ClassVar[Distribution | None] - def matches( - self, - *, - name: str = ..., - value: str = ..., - group: str = ..., - module: str = ..., - attr: str = ..., - extras: list[str] = ..., - ) -> bool: ... # undocumented - def __hash__(self) -> int: ... - def __iter__(self) -> Iterator[Any]: ... # result of iter((str, Self)), really - -if sys.version_info >= (3, 12): - class EntryPoints(tuple[EntryPoint, ...]): - __slots__ = () - def __getitem__(self, name: str) -> EntryPoint: ... # type: ignore[override] - def select( - self, - *, - name: str = ..., - value: str = ..., - group: str = ..., - module: str = ..., - attr: str = ..., - extras: list[str] = ..., - ) -> EntryPoints: ... - @property - def names(self) -> set[str]: ... - @property - def groups(self) -> set[str]: ... - -else: - class DeprecatedList(list[_T]): - __slots__ = () - - class EntryPoints(DeprecatedList[EntryPoint]): # use as list is deprecated since 3.10 - # int argument is deprecated since 3.10 - __slots__ = () - def __getitem__(self, name: int | str) -> EntryPoint: ... # type: ignore[override] - def select( - self, - *, - name: str = ..., - value: str = ..., - group: str = ..., - module: str = ..., - attr: str = ..., - extras: list[str] = ..., - ) -> EntryPoints: ... - @property - def names(self) -> set[str]: ... - @property - def groups(self) -> set[str]: ... - -if sys.version_info < (3, 12): - class Deprecated(Generic[_KT, _VT]): - def __getitem__(self, name: _KT) -> _VT: ... - - @overload - def get(self, name: _KT, default: None = None) -> _VT | None: ... - @overload - def get(self, name: _KT, default: _VT) -> _VT: ... - @overload - def get(self, name: _KT, default: _T) -> _VT | _T: ... - - def __iter__(self) -> Iterator[_KT]: ... - def __contains__(self, *args: object) -> bool: ... - def keys(self) -> dict_keys[_KT, _VT]: ... - def values(self) -> dict_values[_KT, _VT]: ... - - @deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `select` instead.") - class SelectableGroups(Deprecated[str, EntryPoints], dict[str, EntryPoints]): # use as dict is deprecated since 3.10 - @classmethod - def load(cls, eps: Iterable[EntryPoint]) -> Self: ... - @property - def groups(self) -> set[str]: ... - @property - def names(self) -> set[str]: ... - - @overload - def select(self) -> Self: ... - @overload - def select( - self, - *, - name: str = ..., - value: str = ..., - group: str = ..., - module: str = ..., - attr: str = ..., - extras: list[str] = ..., - ) -> EntryPoints: ... - -class PackagePath(pathlib.PurePosixPath): - def read_text(self, encoding: str = "utf-8") -> str: ... - def read_binary(self) -> bytes: ... - def locate(self) -> PathLike[str]: ... - # The following attributes are not defined on PackagePath, but are dynamically added by Distribution.files: - hash: FileHash | None - size: int | None - dist: Distribution - -class FileHash: - mode: str - value: str - def __init__(self, spec: str) -> None: ... - -if sys.version_info >= (3, 15): - _distribution_parent = abc.ABC -elif sys.version_info >= (3, 12): - class DeprecatedNonAbstract: ... - _distribution_parent = DeprecatedNonAbstract -else: - _distribution_parent = object - -class Distribution(_distribution_parent): - @abc.abstractmethod - def read_text(self, filename: str) -> str | None: ... - @abc.abstractmethod - def locate_file(self, path: StrPath) -> _SimplePath: ... - @classmethod - def from_name(cls, name: str) -> Distribution: ... - - @overload - @classmethod - def discover(cls, *, context: DistributionFinder.Context) -> Iterable[Distribution]: ... - @overload - @classmethod - def discover( - cls, *, context: None = None, name: str | None = ..., path: list[str] = ..., **kwargs: Any - ) -> Iterable[Distribution]: ... - - @staticmethod - def at(path: StrPath) -> PathDistribution: ... - @property - def metadata(self) -> PackageMetadata: ... - @property - def entry_points(self) -> EntryPoints: ... - @property - def version(self) -> str: ... - @property - def files(self) -> list[PackagePath] | None: ... - @property - def requires(self) -> list[str] | None: ... - @property - def name(self) -> str: ... - if sys.version_info >= (3, 13): - @property - def origin(self) -> types.SimpleNamespace | None: ... - -class DistributionFinder(MetaPathFinder): - class Context: - name: str | None - def __init__(self, *, name: str | None = ..., path: list[str] = ..., **kwargs: Any) -> None: ... - @property - def path(self) -> list[str]: ... - - @abc.abstractmethod - def find_distributions(self, context: DistributionFinder.Context = ...) -> Iterable[Distribution]: ... - -class MetadataPathFinder(DistributionFinder): - @classmethod - def find_distributions(cls, context: DistributionFinder.Context = ...) -> Iterable[PathDistribution]: ... - if sys.version_info >= (3, 11): - @classmethod - def invalidate_caches(cls) -> None: ... - else: - # Yes, this is an instance method that has a parameter named "cls" - def invalidate_caches(cls) -> None: ... - -class PathDistribution(Distribution): - _path: _SimplePath - def __init__(self, path: _SimplePath) -> None: ... - def read_text(self, filename: StrPath) -> str | None: ... - def locate_file(self, path: StrPath) -> _SimplePath: ... - -def distribution(distribution_name: str) -> Distribution: ... - -@overload -def distributions(*, context: DistributionFinder.Context) -> Iterable[Distribution]: ... -@overload -def distributions( - *, context: None = None, name: str | None = ..., path: list[str] = ..., **kwargs: Any -) -> Iterable[Distribution]: ... - -def metadata(distribution_name: str) -> PackageMetadata: ... - -if sys.version_info >= (3, 12): - def entry_points( - *, name: str = ..., value: str = ..., group: str = ..., module: str = ..., attr: str = ..., extras: list[str] = ... - ) -> EntryPoints: ... - -else: - @overload - def entry_points() -> SelectableGroups: ... - @overload - def entry_points( - *, name: str = ..., value: str = ..., group: str = ..., module: str = ..., attr: str = ..., extras: list[str] = ... - ) -> EntryPoints: ... - -def version(distribution_name: str) -> str: ... -def files(distribution_name: str) -> list[PackagePath] | None: ... -def requires(distribution_name: str) -> list[str] | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/_meta.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/_meta.vpi deleted file mode 100644 index b9bad7b8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/_meta.vpi +++ /dev/null @@ -1,65 +0,0 @@ -import sys -from _typeshed import StrPath -from collections.abc import Iterator -from os import PathLike -from typing import Any, Protocol, overload -from typing_extensions import TypeVar - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True, default=Any) - -class PackageMetadata(Protocol): - def __len__(self) -> int: ... - def __contains__(self, item: str) -> bool: ... - def __getitem__(self, key: str) -> str: ... - def __iter__(self) -> Iterator[str]: ... - @property - def json(self) -> dict[str, str | list[str]]: ... - - @overload - def get_all(self, name: str, failobj: None = None) -> list[Any] | None: ... - @overload - def get_all(self, name: str, failobj: _T) -> list[Any] | _T: ... - - if sys.version_info >= (3, 12): - @overload - def get(self, name: str, failobj: None = None) -> str | None: ... - @overload - def get(self, name: str, failobj: _T) -> _T | str: ... - -if sys.version_info >= (3, 13): - class SimplePath(Protocol): - def joinpath(self, other: StrPath, /) -> SimplePath: ... - def __truediv__(self, other: StrPath, /) -> SimplePath: ... - # Incorrect at runtime - @property - def parent(self) -> PathLike[str]: ... - def read_text(self, encoding: str | None = None) -> str: ... - def read_bytes(self) -> bytes: ... - def exists(self) -> bool: ... - -elif sys.version_info >= (3, 12): - class SimplePath(Protocol[_T_co]): - # At runtime this is defined as taking `str | _T`, but that causes trouble. - # See #11436. - def joinpath(self, other: str, /) -> _T_co: ... - @property - def parent(self) -> _T_co: ... - def read_text(self) -> str: ... - # As with joinpath(), this is annotated as taking `str | _T` at runtime. - def __truediv__(self, other: str, /) -> _T_co: ... - -else: - class SimplePath(Protocol): - # Actually takes only self at runtime, but that's clearly wrong - def joinpath(self, other: Any, /) -> SimplePath: ... - # Not defined as a property at runtime, but it should be - @property - def parent(self) -> Any: ... - def read_text(self) -> str: ... - # There was a bug in `SimplePath` definition in cpython, see #8451 - # Strictly speaking `__div__` was defined in 3.10, not __truediv__, - # but it should have always been `__truediv__`. - # Also, the runtime defines this method as taking no arguments, - # which is obviously wrong. - def __truediv__(self, other: Any, /) -> SimplePath: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/diagnose.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/diagnose.vpi deleted file mode 100644 index 565872fd..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/metadata/diagnose.vpi +++ /dev/null @@ -1,2 +0,0 @@ -def inspect(path: str) -> None: ... -def run() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/readers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/readers.vpi deleted file mode 100644 index 50f06ea5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/readers.vpi +++ /dev/null @@ -1,69 +0,0 @@ -# On py311+, things are actually defined in importlib.resources.readers, -# and re-exported here, -# but doing it this way leads to less code duplication for us - -import pathlib -import sys -import zipfile -from _typeshed import StrPath -from collections.abc import Iterable, Iterator -from importlib._bootstrap_external import FileLoader -from io import BufferedReader -from typing import Literal, NoReturn, TypeVar -from typing_extensions import Never -from zipimport import zipimporter - -if sys.version_info >= (3, 11): - from importlib.resources import abc -else: - from importlib import abc - -if sys.version_info >= (3, 11): - __all__ = ["FileReader", "ZipReader", "MultiplexedPath", "NamespaceReader"] - -if sys.version_info < (3, 11): - _T = TypeVar("_T") - - def remove_duplicates(items: Iterable[_T]) -> Iterator[_T]: ... - -class FileReader(abc.TraversableResources): - path: pathlib.Path - def __init__(self, loader: FileLoader) -> None: ... - def resource_path(self, resource: StrPath) -> str: ... - def files(self) -> pathlib.Path: ... - -class ZipReader(abc.TraversableResources): - prefix: str - archive: str - def __init__(self, loader: zipimporter, module: str) -> None: ... - def open_resource(self, resource: str) -> BufferedReader: ... - def is_resource(self, path: StrPath) -> bool: ... - def files(self) -> zipfile.Path: ... - -class MultiplexedPath(abc.Traversable): - def __init__(self, *paths: abc.Traversable) -> None: ... - def iterdir(self) -> Iterator[abc.Traversable]: ... - def read_bytes(self) -> NoReturn: ... - def read_text(self, *args: Never, **kwargs: Never) -> NoReturn: ... # type: ignore[override] - def is_dir(self) -> Literal[True]: ... - def is_file(self) -> Literal[False]: ... - - if sys.version_info >= (3, 12): - def joinpath(self, *descendants: StrPath) -> abc.Traversable: ... - elif sys.version_info >= (3, 11): - def joinpath(self, child: StrPath) -> abc.Traversable: ... # type: ignore[override] - else: - def joinpath(self, child: str) -> abc.Traversable: ... - - if sys.version_info < (3, 12): - __truediv__ = joinpath - - def open(self, *args: Never, **kwargs: Never) -> NoReturn: ... # type: ignore[override] - @property - def name(self) -> str: ... - -class NamespaceReader(abc.TraversableResources): - path: MultiplexedPath - def __init__(self, namespace_path: Iterable[str]) -> None: ... - def resource_path(self, resource: str) -> str: ... - def files(self) -> MultiplexedPath: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/__init__.vpi deleted file mode 100644 index 5e58ddf3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/__init__.vpi +++ /dev/null @@ -1,81 +0,0 @@ -import os -import sys -from collections.abc import Iterator -from contextlib import AbstractContextManager -from pathlib import Path -from types import ModuleType -from typing import Any, BinaryIO, Literal, TextIO, TypeAlias -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - from importlib.resources.abc import Traversable -else: - from importlib.abc import Traversable - -if sys.version_info >= (3, 11): - from importlib.resources._common import Package as Package -else: - Package: TypeAlias = str | ModuleType - -__all__ = [ - "Package", - "ResourceReader", - "as_file", - "contents", - "files", - "is_resource", - "open_binary", - "open_text", - "path", - "read_binary", - "read_text", -] - -if sys.version_info < (3, 13): - __all__ += ["Resource"] - -if sys.version_info < (3, 11): - Resource: TypeAlias = str | os.PathLike[Any] -elif sys.version_info < (3, 13): - Resource: TypeAlias = str - -if sys.version_info >= (3, 12): - from importlib.resources._common import Anchor as Anchor - - __all__ += ["Anchor"] - -if sys.version_info >= (3, 13): - from importlib.resources._functional import ( - contents as contents, - is_resource as is_resource, - open_binary as open_binary, - open_text as open_text, - path as path, - read_binary as read_binary, - read_text as read_text, - ) - -else: - def open_binary(package: Package, resource: Resource) -> BinaryIO: ... - def open_text(package: Package, resource: Resource, encoding: str = "utf-8", errors: str = "strict") -> TextIO: ... - def read_binary(package: Package, resource: Resource) -> bytes: ... - def read_text(package: Package, resource: Resource, encoding: str = "utf-8", errors: str = "strict") -> str: ... - def path(package: Package, resource: Resource) -> AbstractContextManager[Path, Literal[False]]: ... - def is_resource(package: Package, name: str) -> bool: ... - @deprecated("Deprecated since Python 3.11. Use `files(anchor).iterdir()`.") - def contents(package: Package) -> Iterator[str]: ... - -if sys.version_info >= (3, 11): - from importlib.resources._common import as_file as as_file -else: - def as_file(path: Traversable) -> AbstractContextManager[Path, Literal[False]]: ... - -if sys.version_info >= (3, 11): - from importlib.resources._common import files as files -else: - def files(package: Package) -> Traversable: ... - -if sys.version_info >= (3, 11): - from importlib.resources.abc import ResourceReader as ResourceReader -else: - from importlib.abc import ResourceReader as ResourceReader diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_common.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_common.vpi deleted file mode 100644 index 447cc1ea..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_common.vpi +++ /dev/null @@ -1,43 +0,0 @@ -import sys - -# Even though this file is 3.11+ only, Pyright will complain in stubtest for older versions. -if sys.version_info >= (3, 11): - import types - from collections.abc import Callable - from contextlib import AbstractContextManager - from importlib.resources.abc import ResourceReader, Traversable - from pathlib import Path - from typing import Literal, TypeAlias, overload - from typing_extensions import deprecated - - Package: TypeAlias = str | types.ModuleType - - if sys.version_info >= (3, 12): - Anchor: TypeAlias = Package - - def package_to_anchor( - func: Callable[[Anchor | None], Traversable], - ) -> Callable[[Anchor | None, Anchor | None], Traversable]: ... - - @overload - def files(anchor: Anchor | None = None) -> Traversable: ... - @overload - @deprecated("Deprecated since Python 3.12; will be removed in Python 3.15. Use `anchor` parameter instead.") - def files(package: Anchor | None = None) -> Traversable: ... - - else: - def files(package: Package) -> Traversable: ... - - def get_resource_reader(package: types.ModuleType) -> ResourceReader | None: ... - - if sys.version_info >= (3, 12): - def resolve(cand: Anchor | None) -> types.ModuleType: ... - - else: - def resolve(cand: Package) -> types.ModuleType: ... - - if sys.version_info < (3, 12): - def get_package(package: Package) -> types.ModuleType: ... - - def from_package(package: types.ModuleType) -> Traversable: ... - def as_file(path: Traversable) -> AbstractContextManager[Path, Literal[False]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_functional.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_functional.vpi deleted file mode 100644 index cfd15dc8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/_functional.vpi +++ /dev/null @@ -1,35 +0,0 @@ -import sys - -# Even though this file is 3.13+ only, Pyright will complain in stubtest for older versions. -if sys.version_info >= (3, 13): - from _typeshed import StrPath - from collections.abc import Iterator - from contextlib import AbstractContextManager - from importlib.resources._common import Anchor - from io import TextIOWrapper - from pathlib import Path - from typing import BinaryIO, Literal, overload - from typing_extensions import Unpack, deprecated - - def open_binary(anchor: Anchor, *path_names: StrPath) -> BinaryIO: ... - - @overload - def open_text( - anchor: Anchor, *path_names: Unpack[tuple[StrPath]], encoding: str | None = "utf-8", errors: str | None = "strict" - ) -> TextIOWrapper: ... - @overload - def open_text(anchor: Anchor, *path_names: StrPath, encoding: str | None, errors: str | None = "strict") -> TextIOWrapper: ... - - def read_binary(anchor: Anchor, *path_names: StrPath) -> bytes: ... - - @overload - def read_text( - anchor: Anchor, *path_names: Unpack[tuple[StrPath]], encoding: str | None = "utf-8", errors: str | None = "strict" - ) -> str: ... - @overload - def read_text(anchor: Anchor, *path_names: StrPath, encoding: str | None, errors: str | None = "strict") -> str: ... - - def path(anchor: Anchor, *path_names: StrPath) -> AbstractContextManager[Path, Literal[False]]: ... - def is_resource(anchor: Anchor, *path_names: StrPath) -> bool: ... - @deprecated("Deprecated since Python 3.11. Use `files(anchor).iterdir()`.") - def contents(anchor: Anchor, *path_names: StrPath) -> Iterator[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/abc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/abc.vpi deleted file mode 100644 index 20a4b1fc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/abc.vpi +++ /dev/null @@ -1,64 +0,0 @@ -import sys -from _typeshed import StrPath -from abc import ABCMeta, abstractmethod -from collections.abc import Iterator -from io import BufferedReader -from typing import IO, Any, Literal, Protocol, overload, runtime_checkable -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - @deprecated("Deprecated since Python 3.12. Use `importlib.resources.abc.TraversableResources` instead.") - class ResourceReader(metaclass=ABCMeta): - @abstractmethod - def open_resource(self, resource: str) -> IO[bytes]: ... - @abstractmethod - def resource_path(self, resource: str) -> str: ... - @abstractmethod - def is_resource(self, path: str) -> bool: ... - @abstractmethod - def contents(self) -> Iterator[str]: ... - - @runtime_checkable - class Traversable(Protocol): - @abstractmethod - def is_dir(self) -> bool: ... - @abstractmethod - def is_file(self) -> bool: ... - @abstractmethod - def iterdir(self) -> Iterator[Traversable]: ... - @abstractmethod - def joinpath(self, *descendants: StrPath) -> Traversable: ... - - # The documentation and runtime protocol allows *args, **kwargs arguments, - # but this would mean that all implementers would have to support them, - # which is not the case. - @overload - @abstractmethod - def open(self, mode: Literal["r"] = "r", *, encoding: str | None = None, errors: str | None = None) -> IO[str]: ... - @overload - @abstractmethod - def open(self, mode: Literal["rb"]) -> IO[bytes]: ... - - @property - @abstractmethod - def name(self) -> str: ... - def __truediv__(self, child: StrPath, /) -> Traversable: ... - @abstractmethod - def read_bytes(self) -> bytes: ... - - if sys.version_info >= (3, 15): - @abstractmethod - def read_text(self, encoding: str | None = None, errors: str | None = None) -> str: ... - else: - @abstractmethod - def read_text(self, encoding: str | None = None) -> str: ... - - class TraversableResources(ResourceReader): - @abstractmethod - def files(self) -> Traversable: ... - def open_resource(self, resource: str) -> BufferedReader: ... - def resource_path(self, resource: Any) -> str: ... - def is_resource(self, path: str) -> bool: ... - def contents(self) -> Iterator[str]: ... - - __all__ = ["ResourceReader", "Traversable", "TraversableResources"] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/readers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/readers.vpi deleted file mode 100644 index 0ab21fd2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/readers.vpi +++ /dev/null @@ -1,14 +0,0 @@ -# On py311+, things are actually defined here -# and re-exported from importlib.readers, -# but doing it this way leads to less code duplication for us - -import sys -from collections.abc import Iterable, Iterator -from typing import TypeVar - -if sys.version_info >= (3, 11): - from importlib.readers import * - - _T = TypeVar("_T") - - def remove_duplicates(items: Iterable[_T]) -> Iterator[_T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/simple.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/simple.vpi deleted file mode 100644 index ef988205..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/resources/simple.vpi +++ /dev/null @@ -1,59 +0,0 @@ -import abc -import sys -from _typeshed import StrPath -from collections.abc import Iterator -from io import TextIOWrapper -from typing import IO, Any, BinaryIO, Literal, NoReturn, overload -from typing_extensions import Never - -if sys.version_info >= (3, 11): - from .abc import Traversable, TraversableResources - - class SimpleReader(abc.ABC): - @property - @abc.abstractmethod - def package(self) -> str: ... - @abc.abstractmethod - def children(self) -> list[SimpleReader]: ... - @abc.abstractmethod - def resources(self) -> list[str]: ... - @abc.abstractmethod - def open_binary(self, resource: str) -> BinaryIO: ... - @property - def name(self) -> str: ... - - class ResourceHandle(Traversable, metaclass=abc.ABCMeta): - parent: ResourceContainer - def __init__(self, parent: ResourceContainer, name: str) -> None: ... - def is_file(self) -> Literal[True]: ... - def is_dir(self) -> Literal[False]: ... - - @overload - def open( - self, - mode: Literal["r"] = "r", - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - ) -> TextIOWrapper: ... - @overload - def open(self, mode: Literal["rb"]) -> BinaryIO: ... - @overload - def open(self, mode: str) -> IO[Any]: ... - - def joinpath(self, name: Never) -> NoReturn: ... # type: ignore[override] - - class ResourceContainer(Traversable, metaclass=abc.ABCMeta): - reader: SimpleReader - def __init__(self, reader: SimpleReader) -> None: ... - def is_dir(self) -> Literal[True]: ... - def is_file(self) -> Literal[False]: ... - def iterdir(self) -> Iterator[ResourceHandle | ResourceContainer]: ... - def open(self, *args: Never, **kwargs: Never) -> NoReturn: ... # type: ignore[override] - if sys.version_info < (3, 12): - def joinpath(self, *descendants: StrPath) -> Traversable: ... - - class TraversableReader(TraversableResources, SimpleReader, metaclass=abc.ABCMeta): - def files(self) -> ResourceContainer: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/simple.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/simple.vpi deleted file mode 100644 index 58d8c661..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/simple.vpi +++ /dev/null @@ -1,11 +0,0 @@ -import sys - -if sys.version_info >= (3, 11): - from .resources.simple import ( - ResourceContainer as ResourceContainer, - ResourceHandle as ResourceHandle, - SimpleReader as SimpleReader, - TraversableReader as TraversableReader, - ) - - __all__ = ["SimpleReader", "ResourceHandle", "ResourceContainer", "TraversableReader"] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/util.vpi deleted file mode 100644 index 785ba6b9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/importlib/util.vpi +++ /dev/null @@ -1,75 +0,0 @@ -import importlib.machinery -import sys -import types -from _typeshed import ReadableBuffer -from collections.abc import Callable -from importlib._bootstrap import module_from_spec as module_from_spec, spec_from_loader as spec_from_loader -from importlib._bootstrap_external import ( - MAGIC_NUMBER as MAGIC_NUMBER, - cache_from_source as cache_from_source, - decode_source as decode_source, - source_from_cache as source_from_cache, - spec_from_file_location as spec_from_file_location, -) -from importlib.abc import Loader -from types import TracebackType -from typing import Literal, ParamSpec -from typing_extensions import Self, deprecated - -_P = ParamSpec("_P") - -if sys.version_info < (3, 12): - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "`__name__`, `__package__` and `__loader__` are now set automatically." - ) - def module_for_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "`__name__`, `__package__` and `__loader__` are now set automatically." - ) - def set_loader(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... - @deprecated( - "Deprecated since Python 3.4; removed in Python 3.12. " - "`__name__`, `__package__` and `__loader__` are now set automatically." - ) - def set_package(fxn: Callable[_P, types.ModuleType]) -> Callable[_P, types.ModuleType]: ... - -def resolve_name(name: str, package: str | None) -> str: ... -def find_spec(name: str, package: str | None = None) -> importlib.machinery.ModuleSpec | None: ... - -class LazyLoader(Loader): - def __init__(self, loader: Loader) -> None: ... - @classmethod - def factory(cls, loader: Loader) -> Callable[..., LazyLoader]: ... - def exec_module(self, module: types.ModuleType) -> None: ... - -def source_hash(source_bytes: ReadableBuffer) -> bytes: ... - -if sys.version_info >= (3, 12): - class _incompatible_extension_module_restrictions: - def __init__(self, *, disable_check: bool) -> None: ... - disable_check: bool - old: Literal[-1, 0, 1] # exists only while entered - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - @property - def override(self) -> Literal[-1, 1]: ... # undocumented - -if sys.version_info >= (3, 14): - __all__ = [ - "LazyLoader", - "Loader", - "MAGIC_NUMBER", - "cache_from_source", - "decode_source", - "find_spec", - "module_from_spec", - "resolve_name", - "source_from_cache", - "source_hash", - "spec_from_file_location", - "spec_from_loader", - ] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/inspect.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/inspect.vpi deleted file mode 100644 index c3110ce2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/inspect.vpi +++ /dev/null @@ -1,749 +0,0 @@ -import dis -import enum -import sys -import types -from _typeshed import AnnotationForm, StrPath -from collections.abc import AsyncGenerator, Awaitable, Callable, Coroutine, Generator, Mapping, Sequence, Set as AbstractSet -from types import ( - AsyncGeneratorType, - BuiltinFunctionType, - BuiltinMethodType, - ClassMethodDescriptorType, - CodeType, - CoroutineType, - FrameType, - FunctionType, - GeneratorType, - GetSetDescriptorType, - LambdaType, - MemberDescriptorType, - MethodDescriptorType, - MethodType, - MethodWrapperType, - ModuleType, - TracebackType, - WrapperDescriptorType, -) -from typing import ( - Any, - ClassVar, - Final, - Literal, - NamedTuple, - ParamSpec, - Protocol, - TypeAlias, - TypeGuard, - TypeVar, - overload, - type_check_only, -) -from typing_extensions import Never, Self, TypeIs, deprecated, disjoint_base - -if sys.version_info >= (3, 14): - from annotationlib import Format - -if sys.version_info >= (3, 11): - __all__ = [ - "ArgInfo", - "Arguments", - "Attribute", - "BlockFinder", - "BoundArguments", - "CORO_CLOSED", - "CORO_CREATED", - "CORO_RUNNING", - "CORO_SUSPENDED", - "CO_ASYNC_GENERATOR", - "CO_COROUTINE", - "CO_GENERATOR", - "CO_ITERABLE_COROUTINE", - "CO_NESTED", - "CO_NEWLOCALS", - "CO_NOFREE", - "CO_OPTIMIZED", - "CO_VARARGS", - "CO_VARKEYWORDS", - "ClassFoundException", - "ClosureVars", - "EndOfBlock", - "FrameInfo", - "FullArgSpec", - "GEN_CLOSED", - "GEN_CREATED", - "GEN_RUNNING", - "GEN_SUSPENDED", - "Parameter", - "Signature", - "TPFLAGS_IS_ABSTRACT", - "Traceback", - "classify_class_attrs", - "cleandoc", - "currentframe", - "findsource", - "formatannotation", - "formatannotationrelativeto", - "formatargvalues", - "get_annotations", - "getabsfile", - "getargs", - "getargvalues", - "getattr_static", - "getblock", - "getcallargs", - "getclasstree", - "getclosurevars", - "getcomments", - "getcoroutinelocals", - "getcoroutinestate", - "getdoc", - "getfile", - "getframeinfo", - "getfullargspec", - "getgeneratorlocals", - "getgeneratorstate", - "getinnerframes", - "getlineno", - "getmembers", - "getmembers_static", - "getmodule", - "getmodulename", - "getmro", - "getouterframes", - "getsource", - "getsourcefile", - "getsourcelines", - "indentsize", - "isabstract", - "isasyncgen", - "isasyncgenfunction", - "isawaitable", - "isbuiltin", - "isclass", - "iscode", - "iscoroutine", - "iscoroutinefunction", - "isdatadescriptor", - "isframe", - "isfunction", - "isgenerator", - "isgeneratorfunction", - "isgetsetdescriptor", - "ismemberdescriptor", - "ismethod", - "ismethoddescriptor", - "ismethodwrapper", - "ismodule", - "isroutine", - "istraceback", - "signature", - "stack", - "trace", - "unwrap", - "walktree", - ] - - if sys.version_info >= (3, 12): - __all__ += [ - "markcoroutinefunction", - "AGEN_CLOSED", - "AGEN_CREATED", - "AGEN_RUNNING", - "AGEN_SUSPENDED", - "getasyncgenlocals", - "getasyncgenstate", - "BufferFlags", - ] - if sys.version_info >= (3, 14): - __all__ += ["CO_HAS_DOCSTRING", "CO_METHOD", "ispackage"] - -_P = ParamSpec("_P") -_T = TypeVar("_T") -_F = TypeVar("_F", bound=Callable[..., Any]) -_T_contra = TypeVar("_T_contra", contravariant=True) -_V_contra = TypeVar("_V_contra", contravariant=True) - -# -# Types and members -# -class EndOfBlock(Exception): ... - -class BlockFinder: - indent: int - islambda: bool - started: bool - passline: bool - indecorator: bool - decoratorhasargs: bool - last: int - def tokeneater(self, type: int, token: str, srowcol: tuple[int, int], erowcol: tuple[int, int], line: str) -> None: ... - -CO_OPTIMIZED: Final = 1 -CO_NEWLOCALS: Final = 2 -CO_VARARGS: Final = 4 -CO_VARKEYWORDS: Final = 8 -CO_NESTED: Final = 16 -CO_GENERATOR: Final = 32 -CO_NOFREE: Final = 64 -CO_COROUTINE: Final = 128 -CO_ITERABLE_COROUTINE: Final = 256 -CO_ASYNC_GENERATOR: Final = 512 -TPFLAGS_IS_ABSTRACT: Final = 1048576 -if sys.version_info >= (3, 14): - CO_HAS_DOCSTRING: Final = 67108864 - CO_METHOD: Final = 134217728 - -modulesbyfile: dict[str, Any] - -_GetMembersPredicateTypeGuard: TypeAlias = Callable[[Any], TypeGuard[_T]] -_GetMembersPredicateTypeIs: TypeAlias = Callable[[Any], TypeIs[_T]] -_GetMembersPredicate: TypeAlias = Callable[[Any], bool] -_GetMembersReturn: TypeAlias = list[tuple[str, _T]] - -@overload -def getmembers(object: object, predicate: _GetMembersPredicateTypeGuard[_T]) -> _GetMembersReturn[_T]: ... -@overload -def getmembers(object: object, predicate: _GetMembersPredicateTypeIs[_T]) -> _GetMembersReturn[_T]: ... -@overload -def getmembers(object: object, predicate: _GetMembersPredicate | None = None) -> _GetMembersReturn[Any]: ... - -if sys.version_info >= (3, 11): - @overload - def getmembers_static(object: object, predicate: _GetMembersPredicateTypeGuard[_T]) -> _GetMembersReturn[_T]: ... - @overload - def getmembers_static(object: object, predicate: _GetMembersPredicateTypeIs[_T]) -> _GetMembersReturn[_T]: ... - @overload - def getmembers_static(object: object, predicate: _GetMembersPredicate | None = None) -> _GetMembersReturn[Any]: ... - -def getmodulename(path: StrPath) -> str | None: ... -def ismodule(object: object) -> TypeIs[ModuleType]: ... -def isclass(object: object) -> TypeIs[type[object]]: ... -def ismethod(object: object) -> TypeIs[MethodType]: ... - -if sys.version_info >= (3, 14): - # Not TypeIs because it does not return True for all modules - def ispackage(object: object) -> TypeGuard[ModuleType]: ... - -def isfunction(object: object) -> TypeIs[FunctionType]: ... - -if sys.version_info >= (3, 12): - def markcoroutinefunction(func: _F) -> _F: ... - -@overload -def isgeneratorfunction(obj: Callable[..., Generator[Any, Any, Any]]) -> bool: ... -@overload -def isgeneratorfunction(obj: Callable[_P, Any]) -> TypeGuard[Callable[_P, GeneratorType[Any, Any, Any]]]: ... -@overload -def isgeneratorfunction(obj: object) -> TypeGuard[Callable[..., GeneratorType[Any, Any, Any]]]: ... - -@overload -def iscoroutinefunction(obj: Callable[..., Coroutine[Any, Any, Any]]) -> bool: ... -@overload -def iscoroutinefunction(obj: Callable[_P, Awaitable[_T]]) -> TypeGuard[Callable[_P, CoroutineType[Any, Any, _T]]]: ... -@overload -def iscoroutinefunction(obj: Callable[_P, object]) -> TypeGuard[Callable[_P, CoroutineType[Any, Any, Any]]]: ... -@overload -def iscoroutinefunction(obj: object) -> TypeGuard[Callable[..., CoroutineType[Any, Any, Any]]]: ... - -def isgenerator(object: object) -> TypeIs[GeneratorType[object, Never, object]]: ... -def iscoroutine(object: object) -> TypeIs[CoroutineType[Any, Any, Any]]: ... -def isawaitable(object: object) -> TypeIs[Awaitable[Any]]: ... - -@overload -def isasyncgenfunction(obj: Callable[..., AsyncGenerator[Any, Any]]) -> bool: ... -@overload -def isasyncgenfunction(obj: Callable[_P, Any]) -> TypeGuard[Callable[_P, AsyncGeneratorType[Any, Any]]]: ... -@overload -def isasyncgenfunction(obj: object) -> TypeGuard[Callable[..., AsyncGeneratorType[Any, Any]]]: ... - -@type_check_only -class _SupportsSet(Protocol[_T_contra, _V_contra]): - def __set__(self, instance: _T_contra, value: _V_contra, /) -> None: ... - -@type_check_only -class _SupportsDelete(Protocol[_T_contra]): - def __delete__(self, instance: _T_contra, /) -> None: ... - -def isasyncgen(object: object) -> TypeIs[AsyncGeneratorType[object, Never]]: ... -def istraceback(object: object) -> TypeIs[TracebackType]: ... -def isframe(object: object) -> TypeIs[FrameType]: ... -def iscode(object: object) -> TypeIs[CodeType]: ... -def isbuiltin(object: object) -> TypeIs[BuiltinFunctionType]: ... - -if sys.version_info >= (3, 11): - def ismethodwrapper(object: object) -> TypeIs[MethodWrapperType]: ... - -def isroutine( - object: object, -) -> TypeIs[ - FunctionType - | LambdaType - | MethodType - | BuiltinFunctionType - | BuiltinMethodType - | WrapperDescriptorType - | MethodDescriptorType - | ClassMethodDescriptorType -]: ... -def ismethoddescriptor(object: object) -> TypeIs[MethodDescriptorType]: ... -def ismemberdescriptor(object: object) -> TypeIs[MemberDescriptorType]: ... -def isabstract(object: object) -> bool: ... -def isgetsetdescriptor(object: object) -> TypeIs[GetSetDescriptorType]: ... -def isdatadescriptor(object: object) -> TypeIs[_SupportsSet[Never, Never] | _SupportsDelete[Never]]: ... - -# -# Retrieving source code -# -_SourceObjectType: TypeAlias = ( - ModuleType | type[Any] | MethodType | FunctionType | TracebackType | FrameType | CodeType | Callable[..., Any] -) - -def findsource(object: _SourceObjectType) -> tuple[list[str], int]: ... -def getabsfile(object: _SourceObjectType, _filename: str | None = None) -> str: ... - -# Special-case the two most common input types here -# to avoid the annoyingly vague `Sequence[str]` return type -@overload -def getblock(lines: list[str]) -> list[str]: ... -@overload -def getblock(lines: tuple[str, ...]) -> tuple[str, ...]: ... -@overload -def getblock(lines: Sequence[str]) -> Sequence[str]: ... - -if sys.version_info >= (3, 15): - def getdoc(object: object, *, inherit_class_doc: bool = True, fallback_to_class_doc: bool = True) -> str | None: ... - -else: - def getdoc(object: object) -> str | None: ... - -def getcomments(object: object) -> str | None: ... -def getfile(object: _SourceObjectType) -> str: ... -def getmodule(object: object, _filename: str | None = None) -> ModuleType | None: ... -def getsourcefile(object: _SourceObjectType) -> str | None: ... -def getsourcelines(object: _SourceObjectType) -> tuple[list[str], int]: ... -def getsource(object: _SourceObjectType) -> str: ... -def cleandoc(doc: str) -> str: ... -def indentsize(line: str) -> int: ... - -_IntrospectableCallable: TypeAlias = Callable[..., Any] - -# -# Introspecting callables with the Signature object -# -if sys.version_info >= (3, 14): - def signature( - obj: _IntrospectableCallable, - *, - follow_wrapped: bool = True, - globals: Mapping[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - eval_str: bool = False, - annotation_format: Format = Format.VALUE, # noqa: Y011 - ) -> Signature: ... - -else: - def signature( - obj: _IntrospectableCallable, - *, - follow_wrapped: bool = True, - globals: Mapping[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - eval_str: bool = False, - ) -> Signature: ... - -class _void: ... -class _empty: ... - -class Signature: - __slots__ = ("_return_annotation", "_parameters") - def __init__( - self, parameters: Sequence[Parameter] | None = None, *, return_annotation: Any = ..., __validate_parameters__: bool = True - ) -> None: ... - empty = _empty - @property - def parameters(self) -> types.MappingProxyType[str, Parameter]: ... - @property - def return_annotation(self) -> Any: ... - def bind(self, *args: Any, **kwargs: Any) -> BoundArguments: ... - def bind_partial(self, *args: Any, **kwargs: Any) -> BoundArguments: ... - def replace(self, *, parameters: Sequence[Parameter] | type[_void] | None = ..., return_annotation: Any = ...) -> Self: ... - __replace__ = replace - if sys.version_info >= (3, 14): - @classmethod - def from_callable( - cls, - obj: _IntrospectableCallable, - *, - follow_wrapped: bool = True, - globals: Mapping[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - eval_str: bool = False, - annotation_format: Format = Format.VALUE, # noqa: Y011 - ) -> Self: ... - else: - @classmethod - def from_callable( - cls, - obj: _IntrospectableCallable, - *, - follow_wrapped: bool = True, - globals: Mapping[str, Any] | None = None, - locals: Mapping[str, Any] | None = None, - eval_str: bool = False, - ) -> Self: ... - - if sys.version_info >= (3, 14): - def format(self, *, max_width: int | None = None, quote_annotation_strings: bool = True) -> str: ... - elif sys.version_info >= (3, 13): - def format(self, *, max_width: int | None = None) -> str: ... - - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -if sys.version_info >= (3, 14): - from annotationlib import get_annotations as get_annotations -else: - def get_annotations( - obj: Callable[..., object] | type[object] | ModuleType, # any callable, class, or module - *, - globals: Mapping[str, Any] | None = None, # value types depend on the key - locals: Mapping[str, Any] | None = None, # value types depend on the key - eval_str: bool = False, - ) -> dict[str, AnnotationForm]: ... # values are type expressions - -# The name is the same as the enum's name in CPython -class _ParameterKind(enum.IntEnum): - POSITIONAL_ONLY = 0 - POSITIONAL_OR_KEYWORD = 1 - VAR_POSITIONAL = 2 - KEYWORD_ONLY = 3 - VAR_KEYWORD = 4 - - @property - def description(self) -> str: ... - -if sys.version_info >= (3, 12): - AGEN_CREATED: Final = "AGEN_CREATED" - AGEN_RUNNING: Final = "AGEN_RUNNING" - AGEN_SUSPENDED: Final = "AGEN_SUSPENDED" - AGEN_CLOSED: Final = "AGEN_CLOSED" - - def getasyncgenstate( - agen: AsyncGenerator[Any, Any], - ) -> Literal["AGEN_CREATED", "AGEN_RUNNING", "AGEN_SUSPENDED", "AGEN_CLOSED"]: ... - def getasyncgenlocals(agen: AsyncGeneratorType[Any, Any]) -> dict[str, Any]: ... - -class Parameter: - __slots__ = ("_name", "_kind", "_default", "_annotation") - def __init__(self, name: str, kind: _ParameterKind, *, default: Any = ..., annotation: Any = ...) -> None: ... - empty = _empty - - POSITIONAL_ONLY: ClassVar[Literal[_ParameterKind.POSITIONAL_ONLY]] - POSITIONAL_OR_KEYWORD: ClassVar[Literal[_ParameterKind.POSITIONAL_OR_KEYWORD]] - VAR_POSITIONAL: ClassVar[Literal[_ParameterKind.VAR_POSITIONAL]] - KEYWORD_ONLY: ClassVar[Literal[_ParameterKind.KEYWORD_ONLY]] - VAR_KEYWORD: ClassVar[Literal[_ParameterKind.VAR_KEYWORD]] - @property - def name(self) -> str: ... - @property - def default(self) -> Any: ... - @property - def kind(self) -> _ParameterKind: ... - @property - def annotation(self) -> Any: ... - def replace( - self, - *, - name: str | type[_void] = ..., - kind: _ParameterKind | type[_void] = ..., - default: Any = ..., - annotation: Any = ..., - ) -> Self: ... - if sys.version_info >= (3, 13): - __replace__ = replace - - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -class BoundArguments: - __slots__ = ("arguments", "_signature", "__weakref__") - arguments: dict[str, Any] - @property - def args(self) -> tuple[Any, ...]: ... - @property - def kwargs(self) -> dict[str, Any]: ... - @property - def signature(self) -> Signature: ... - def __init__(self, signature: Signature, arguments: dict[str, Any]) -> None: ... - def apply_defaults(self) -> None: ... - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -# -# Classes and functions -# - -_ClassTreeItem: TypeAlias = list[tuple[type, ...]] | list[_ClassTreeItem] - -def getclasstree(classes: list[type], unique: bool = False) -> _ClassTreeItem: ... -def walktree(classes: list[type], children: Mapping[type[Any], list[type]], parent: type[Any] | None) -> _ClassTreeItem: ... - -class Arguments(NamedTuple): - args: list[str] - varargs: str | None - varkw: str | None - -def getargs(co: CodeType) -> Arguments: ... - -if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.0; removed in Python 3.11.") - class ArgSpec(NamedTuple): - args: list[str] - varargs: str | None - keywords: str | None - defaults: tuple[Any, ...] - - @deprecated("Deprecated since Python 3.0; removed in Python 3.11. Use `inspect.signature()` instead.") - def getargspec(func: object) -> ArgSpec: ... - -class FullArgSpec(NamedTuple): - args: list[str] - varargs: str | None - varkw: str | None - defaults: tuple[Any, ...] | None - kwonlyargs: list[str] - kwonlydefaults: dict[str, Any] | None - annotations: dict[str, Any] - -if sys.version_info >= (3, 15): - def getfullargspec(func: object, *, annotation_format: Format = Format.VALUE) -> FullArgSpec: ... # noqa: Y011 - -else: - def getfullargspec(func: object) -> FullArgSpec: ... - -class ArgInfo(NamedTuple): - args: list[str] - varargs: str | None - keywords: str | None - locals: dict[str, Any] - -def getargvalues(frame: FrameType) -> ArgInfo: ... - -if sys.version_info >= (3, 14): - def formatannotation(annotation: object, base_module: str | None = None, *, quote_annotation_strings: bool = True) -> str: ... - -else: - def formatannotation(annotation: object, base_module: str | None = None) -> str: ... - -def formatannotationrelativeto(object: object) -> Callable[[object], str]: ... - -if sys.version_info < (3, 11): - @deprecated( - "Deprecated since Python 3.5; removed in Python 3.11. Use `inspect.signature()` and the `Signature` class instead." - ) - def formatargspec( - args: list[str], - varargs: str | None = None, - varkw: str | None = None, - defaults: tuple[Any, ...] | None = None, - kwonlyargs: Sequence[str] | None = (), - kwonlydefaults: Mapping[str, Any] | None = {}, - annotations: Mapping[str, Any] = {}, - formatarg: Callable[[str], str] = ..., - formatvarargs: Callable[[str], str] = ..., - formatvarkw: Callable[[str], str] = ..., - formatvalue: Callable[[Any], str] = ..., - formatreturns: Callable[[Any], str] = ..., - formatannotation: Callable[[Any], str] = ..., - ) -> str: ... - -def formatargvalues( - args: list[str], - varargs: str | None, - varkw: str | None, - locals: Mapping[str, Any] | None, - formatarg: Callable[[str], str] | None = ..., - formatvarargs: Callable[[str], str] | None = ..., - formatvarkw: Callable[[str], str] | None = ..., - formatvalue: Callable[[Any], str] | None = ..., -) -> str: ... -def getmro(cls: type) -> tuple[type, ...]: ... -@deprecated("Deprecated since Python 3.5. Use `Signature.bind` and `Signature.bind_partial` instead.") -def getcallargs(func: Callable[_P, Any], /, *args: _P.args, **kwds: _P.kwargs) -> dict[str, Any]: ... - -class ClosureVars(NamedTuple): - nonlocals: Mapping[str, Any] - globals: Mapping[str, Any] - builtins: Mapping[str, Any] - unbound: AbstractSet[str] - -def getclosurevars(func: _IntrospectableCallable) -> ClosureVars: ... -def unwrap(func: Callable[..., Any], *, stop: Callable[[Callable[..., Any]], Any] | None = None) -> Any: ... - -# -# The interpreter stack -# - -if sys.version_info >= (3, 11): - class _Traceback(NamedTuple): - filename: str - lineno: int - function: str - code_context: list[str] | None - index: int | None # type: ignore[assignment] - - class _FrameInfo(NamedTuple): - frame: FrameType - filename: str - lineno: int - function: str - code_context: list[str] | None - index: int | None # type: ignore[assignment] - - if sys.version_info >= (3, 12): - class Traceback(_Traceback): - positions: dis.Positions | None - def __new__( - cls, - filename: str, - lineno: int, - function: str, - code_context: list[str] | None, - index: int | None, - *, - positions: dis.Positions | None = None, - ) -> Self: ... - - class FrameInfo(_FrameInfo): - positions: dis.Positions | None - def __new__( - cls, - frame: FrameType, - filename: str, - lineno: int, - function: str, - code_context: list[str] | None, - index: int | None, - *, - positions: dis.Positions | None = None, - ) -> Self: ... - - else: - @disjoint_base - class Traceback(_Traceback): - positions: dis.Positions | None - def __new__( - cls, - filename: str, - lineno: int, - function: str, - code_context: list[str] | None, - index: int | None, - *, - positions: dis.Positions | None = None, - ) -> Self: ... - - @disjoint_base - class FrameInfo(_FrameInfo): - positions: dis.Positions | None - def __new__( - cls, - frame: FrameType, - filename: str, - lineno: int, - function: str, - code_context: list[str] | None, - index: int | None, - *, - positions: dis.Positions | None = None, - ) -> Self: ... - -else: - class Traceback(NamedTuple): - filename: str - lineno: int - function: str - code_context: list[str] | None - index: int | None # type: ignore[assignment] - - class FrameInfo(NamedTuple): - frame: FrameType - filename: str - lineno: int - function: str - code_context: list[str] | None - index: int | None # type: ignore[assignment] - -def getframeinfo(frame: FrameType | TracebackType, context: int = 1) -> Traceback: ... -def getouterframes(frame: Any, context: int = 1) -> list[FrameInfo]: ... -def getinnerframes(tb: TracebackType, context: int = 1) -> list[FrameInfo]: ... -def getlineno(frame: FrameType) -> int: ... -def currentframe() -> FrameType | None: ... -def stack(context: int = 1) -> list[FrameInfo]: ... -def trace(context: int = 1) -> list[FrameInfo]: ... - -# -# Fetching attributes statically -# - -def getattr_static(obj: object, attr: str, default: Any | None = ...) -> Any: ... - -# -# Current State of Generators and Coroutines -# - -GEN_CREATED: Final = "GEN_CREATED" -GEN_RUNNING: Final = "GEN_RUNNING" -GEN_SUSPENDED: Final = "GEN_SUSPENDED" -GEN_CLOSED: Final = "GEN_CLOSED" - -def getgeneratorstate( - generator: Generator[Any, Any, Any], -) -> Literal["GEN_CREATED", "GEN_RUNNING", "GEN_SUSPENDED", "GEN_CLOSED"]: ... - -CORO_CREATED: Final = "CORO_CREATED" -CORO_RUNNING: Final = "CORO_RUNNING" -CORO_SUSPENDED: Final = "CORO_SUSPENDED" -CORO_CLOSED: Final = "CORO_CLOSED" - -def getcoroutinestate( - coroutine: Coroutine[Any, Any, Any], -) -> Literal["CORO_CREATED", "CORO_RUNNING", "CORO_SUSPENDED", "CORO_CLOSED"]: ... -def getgeneratorlocals(generator: Generator[Any, Any, Any]) -> dict[str, Any]: ... -def getcoroutinelocals(coroutine: Coroutine[Any, Any, Any]) -> dict[str, Any]: ... - -# Create private type alias to avoid conflict with symbol of same -# name created in Attribute class. -_Object: TypeAlias = object - -class Attribute(NamedTuple): - name: str - kind: Literal["class method", "static method", "property", "method", "data"] - defining_class: type - object: _Object - -def classify_class_attrs(cls: type) -> list[Attribute]: ... - -class ClassFoundException(Exception): ... - -if sys.version_info >= (3, 12): - class BufferFlags(enum.IntFlag): - SIMPLE = 0 - WRITABLE = 1 - FORMAT = 4 - ND = 8 - STRIDES = 24 - C_CONTIGUOUS = 56 - F_CONTIGUOUS = 88 - ANY_CONTIGUOUS = 152 - INDIRECT = 280 - CONTIG = 9 - CONTIG_RO = 8 - STRIDED = 25 - STRIDED_RO = 24 - RECORDS = 29 - RECORDS_RO = 28 - FULL = 285 - FULL_RO = 284 - READ = 256 - WRITE = 512 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ipaddress.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ipaddress.vpi deleted file mode 100644 index c514abfa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ipaddress.vpi +++ /dev/null @@ -1,249 +0,0 @@ -import sys -from collections.abc import Iterable, Iterator -from typing import Any, Final, Generic, Literal, TypeAlias, TypeVar, overload -from typing_extensions import Self - -# Undocumented length constants -IPV4LENGTH: Final = 32 -IPV6LENGTH: Final = 128 - -_A = TypeVar("_A", IPv4Address, IPv6Address) -_N = TypeVar("_N", IPv4Network, IPv6Network) - -_RawIPAddress: TypeAlias = int | str | bytes | IPv4Address | IPv6Address -_RawNetworkPart: TypeAlias = IPv4Network | IPv6Network | IPv4Interface | IPv6Interface - -def ip_address(address: _RawIPAddress) -> IPv4Address | IPv6Address: ... -def ip_network( - address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int], strict: bool = True -) -> IPv4Network | IPv6Network: ... -def ip_interface( - address: _RawIPAddress | _RawNetworkPart | tuple[_RawIPAddress] | tuple[_RawIPAddress, int], -) -> IPv4Interface | IPv6Interface: ... - -class _IPAddressBase: - __slots__ = () - @property - def compressed(self) -> str: ... - @property - def exploded(self) -> str: ... - @property - def reverse_pointer(self) -> str: ... - if sys.version_info < (3, 14): - @property - def version(self) -> int: ... - -class _BaseAddress(_IPAddressBase): - __slots__ = () - def __add__(self, other: int) -> Self: ... - def __hash__(self) -> int: ... - def __int__(self) -> int: ... - def __sub__(self, other: int) -> Self: ... - def __format__(self, fmt: str) -> str: ... - def __eq__(self, other: object) -> bool: ... - def __lt__(self, other: Self) -> bool: ... - if sys.version_info >= (3, 11): - def __ge__(self, other: Self) -> bool: ... - def __gt__(self, other: Self) -> bool: ... - def __le__(self, other: Self) -> bool: ... - else: - def __ge__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - def __gt__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - def __le__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - -class _BaseNetwork(_IPAddressBase, Generic[_A]): - network_address: _A - netmask: _A - def __contains__(self, other: Any) -> bool: ... - def __getitem__(self, n: int) -> _A: ... - def __iter__(self) -> Iterator[_A]: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __lt__(self, other: Self) -> bool: ... - if sys.version_info >= (3, 11): - def __ge__(self, other: Self) -> bool: ... - def __gt__(self, other: Self) -> bool: ... - def __le__(self, other: Self) -> bool: ... - else: - def __ge__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - def __gt__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - def __le__(self, other: Self, NotImplemented: Any = ...) -> bool: ... - - def address_exclude(self, other: Self) -> Iterator[Self]: ... - @property - def broadcast_address(self) -> _A: ... - def compare_networks(self, other: Self) -> int: ... - def hosts(self) -> Iterator[_A]: ... - @property - def is_global(self) -> bool: ... - @property - def is_link_local(self) -> bool: ... - @property - def is_loopback(self) -> bool: ... - @property - def is_multicast(self) -> bool: ... - @property - def is_private(self) -> bool: ... - @property - def is_reserved(self) -> bool: ... - @property - def is_unspecified(self) -> bool: ... - @property - def num_addresses(self) -> int: ... - def overlaps(self, other: _BaseNetwork[IPv4Address] | _BaseNetwork[IPv6Address]) -> bool: ... - @property - def prefixlen(self) -> int: ... - def subnet_of(self, other: Self) -> bool: ... - def supernet_of(self, other: Self) -> bool: ... - def subnets(self, prefixlen_diff: int = 1, new_prefix: int | None = None) -> Iterator[Self]: ... - def supernet(self, prefixlen_diff: int = 1, new_prefix: int | None = None) -> Self: ... - @property - def with_hostmask(self) -> str: ... - @property - def with_netmask(self) -> str: ... - @property - def with_prefixlen(self) -> str: ... - @property - def hostmask(self) -> _A: ... - -class _BaseV4: - __slots__ = () - if sys.version_info >= (3, 14): - version: Final = 4 - max_prefixlen: Final = 32 - else: - @property - def version(self) -> Literal[4]: ... - @property - def max_prefixlen(self) -> Literal[32]: ... - -class IPv4Address(_BaseV4, _BaseAddress): - __slots__ = ("_ip", "__weakref__") - def __init__(self, address: object) -> None: ... - @property - def is_global(self) -> bool: ... - @property - def is_link_local(self) -> bool: ... - @property - def is_loopback(self) -> bool: ... - @property - def is_multicast(self) -> bool: ... - @property - def is_private(self) -> bool: ... - @property - def is_reserved(self) -> bool: ... - @property - def is_unspecified(self) -> bool: ... - @property - def packed(self) -> bytes: ... - if sys.version_info >= (3, 13): - @property - def ipv6_mapped(self) -> IPv6Address: ... - -class IPv4Network(_BaseV4, _BaseNetwork[IPv4Address]): - def __init__(self, address: object, strict: bool = True) -> None: ... - -class IPv4Interface(IPv4Address): - netmask: IPv4Address - network: IPv4Network - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - @property - def hostmask(self) -> IPv4Address: ... - @property - def ip(self) -> IPv4Address: ... - @property - def with_hostmask(self) -> str: ... - @property - def with_netmask(self) -> str: ... - @property - def with_prefixlen(self) -> str: ... - -class _BaseV6: - __slots__ = () - if sys.version_info >= (3, 14): - version: Final = 6 - max_prefixlen: Final = 128 - else: - @property - def version(self) -> Literal[6]: ... - @property - def max_prefixlen(self) -> Literal[128]: ... - -class IPv6Address(_BaseV6, _BaseAddress): - __slots__ = ("_ip", "_scope_id", "__weakref__") - def __init__(self, address: object) -> None: ... - @property - def is_global(self) -> bool: ... - @property - def is_link_local(self) -> bool: ... - @property - def is_loopback(self) -> bool: ... - @property - def is_multicast(self) -> bool: ... - @property - def is_private(self) -> bool: ... - @property - def is_reserved(self) -> bool: ... - @property - def is_unspecified(self) -> bool: ... - @property - def packed(self) -> bytes: ... - @property - def ipv4_mapped(self) -> IPv4Address | None: ... - @property - def is_site_local(self) -> bool: ... - @property - def sixtofour(self) -> IPv4Address | None: ... - @property - def teredo(self) -> tuple[IPv4Address, IPv4Address] | None: ... - @property - def scope_id(self) -> str | None: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - -class IPv6Network(_BaseV6, _BaseNetwork[IPv6Address]): - def __init__(self, address: object, strict: bool = True) -> None: ... - @property - def is_site_local(self) -> bool: ... - -class IPv6Interface(IPv6Address): - netmask: IPv6Address - network: IPv6Network - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - @property - def hostmask(self) -> IPv6Address: ... - @property - def ip(self) -> IPv6Address: ... - @property - def with_hostmask(self) -> str: ... - @property - def with_netmask(self) -> str: ... - @property - def with_prefixlen(self) -> str: ... - -def v4_int_to_packed(address: int) -> bytes: ... -def v6_int_to_packed(address: int) -> bytes: ... - -# Third overload is technically incorrect, but convenient when first and last are return values of ip_address() -@overload -def summarize_address_range(first: IPv4Address, last: IPv4Address) -> Iterator[IPv4Network]: ... -@overload -def summarize_address_range(first: IPv6Address, last: IPv6Address) -> Iterator[IPv6Network]: ... -@overload -def summarize_address_range( - first: IPv4Address | IPv6Address, last: IPv4Address | IPv6Address -) -> Iterator[IPv4Network] | Iterator[IPv6Network]: ... - -def collapse_addresses(addresses: Iterable[_N]) -> Iterator[_N]: ... - -@overload -def get_mixed_type_key(obj: _A) -> tuple[int, _A]: ... -@overload -def get_mixed_type_key(obj: IPv4Network) -> tuple[int, IPv4Address, IPv4Address]: ... -@overload -def get_mixed_type_key(obj: IPv6Network) -> tuple[int, IPv6Address, IPv6Address]: ... - -class AddressValueError(ValueError): ... -class NetmaskValueError(ValueError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/json/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/json/__init__.vpi deleted file mode 100644 index 2342b29c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/json/__init__.vpi +++ /dev/null @@ -1,93 +0,0 @@ -import sys -from _typeshed import SupportsRead, SupportsWrite -from collections.abc import Callable -from typing import Any, Literal - -from .decoder import JSONDecodeError as JSONDecodeError, JSONDecoder as JSONDecoder -from .encoder import JSONEncoder as JSONEncoder - -__all__ = ["dump", "dumps", "load", "loads", "JSONDecoder", "JSONDecodeError", "JSONEncoder"] - -def dumps( - obj: Any, - *, - skipkeys: bool = False, - ensure_ascii: bool = True, - check_circular: bool = True, - allow_nan: bool = True, - cls: type[JSONEncoder] | None = None, - indent: None | int | str = None, - separators: tuple[str, str] | None = None, - default: Callable[[Any], Any] | None = None, - sort_keys: bool = False, - **kwds: Any, -) -> str: ... -def dump( - obj: Any, - fp: SupportsWrite[str], - *, - skipkeys: bool = False, - ensure_ascii: bool = True, - check_circular: bool = True, - allow_nan: bool = True, - cls: type[JSONEncoder] | None = None, - indent: None | int | str = None, - separators: tuple[str, str] | None = None, - default: Callable[[Any], Any] | None = None, - sort_keys: bool = False, - **kwds: Any, -) -> None: ... - -if sys.version_info >= (3, 15): - def loads( - s: str | bytes | bytearray, - *, - cls: type[JSONDecoder] | None = None, - object_hook: Callable[[dict[Any, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None, - array_hook: Callable[[list[Any]], Any] | None = None, - **kwds: Any, - ) -> Any: ... - def load( - fp: SupportsRead[str | bytes], - *, - cls: type[JSONDecoder] | None = None, - object_hook: Callable[[dict[Any, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None, - array_hook: Callable[[list[Any]], Any] | None = None, - **kwds: Any, - ) -> Any: ... - -else: - def loads( - s: str | bytes | bytearray, - *, - cls: type[JSONDecoder] | None = None, - object_hook: Callable[[dict[Any, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None, - **kwds: Any, - ) -> Any: ... - def load( - fp: SupportsRead[str | bytes], - *, - cls: type[JSONDecoder] | None = None, - object_hook: Callable[[dict[Any, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None, - **kwds: Any, - ) -> Any: ... - -def detect_encoding( - b: bytes | bytearray, -) -> Literal["utf-8", "utf-8-sig", "utf-16", "utf-16-be", "utf-16-le", "utf-32", "utf-32-be", "utf-32-le"]: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/json/decoder.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/json/decoder.vpi deleted file mode 100644 index 1b09579f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/json/decoder.vpi +++ /dev/null @@ -1,50 +0,0 @@ -import sys -from collections.abc import Callable -from typing import Any - -__all__ = ["JSONDecoder", "JSONDecodeError"] - -class JSONDecodeError(ValueError): - msg: str - doc: str - pos: int - lineno: int - colno: int - def __init__(self, msg: str, doc: str, pos: int) -> None: ... - -class JSONDecoder: - if sys.version_info >= (3, 15): - array_hook: Callable[[list[Any]], Any] | None - object_hook: Callable[[dict[str, Any]], Any] - parse_float: Callable[[str], Any] - parse_int: Callable[[str], Any] - parse_constant: Callable[[str], Any] - strict: bool - object_pairs_hook: Callable[[list[tuple[str, Any]]], Any] - if sys.version_info >= (3, 15): - def __init__( - self, - *, - object_hook: Callable[[dict[str, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - strict: bool = True, - object_pairs_hook: Callable[[list[tuple[str, Any]]], Any] | None = None, - array_hook: Callable[[list[Any]], Any] | None = None, - ) -> None: ... - - else: - def __init__( - self, - *, - object_hook: Callable[[dict[str, Any]], Any] | None = None, - parse_float: Callable[[str], Any] | None = None, - parse_int: Callable[[str], Any] | None = None, - parse_constant: Callable[[str], Any] | None = None, - strict: bool = True, - object_pairs_hook: Callable[[list[tuple[str, Any]]], Any] | None = None, - ) -> None: ... - - def decode(self, s: str, _w: Callable[..., Any] = ...) -> Any: ... # _w is undocumented - def raw_decode(self, s: str, idx: int = 0) -> tuple[Any, int]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/json/encoder.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/json/encoder.vpi deleted file mode 100644 index 83b78666..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/json/encoder.vpi +++ /dev/null @@ -1,40 +0,0 @@ -from collections.abc import Callable, Iterator -from re import Pattern -from typing import Any, Final - -ESCAPE: Final[Pattern[str]] # undocumented -ESCAPE_ASCII: Final[Pattern[str]] # undocumented -HAS_UTF8: Final[Pattern[bytes]] # undocumented -ESCAPE_DCT: Final[dict[str, str]] # undocumented -INFINITY: Final[float] # undocumented - -def py_encode_basestring(s: str) -> str: ... # undocumented -def py_encode_basestring_ascii(s: str) -> str: ... # undocumented -def encode_basestring(s: str, /) -> str: ... # undocumented -def encode_basestring_ascii(s: str, /) -> str: ... # undocumented - -class JSONEncoder: - item_separator: str - key_separator: str - - skipkeys: bool - ensure_ascii: bool - check_circular: bool - allow_nan: bool - sort_keys: bool - indent: int | str - def __init__( - self, - *, - skipkeys: bool = False, - ensure_ascii: bool = True, - check_circular: bool = True, - allow_nan: bool = True, - sort_keys: bool = False, - indent: int | str | None = None, - separators: tuple[str, str] | None = None, - default: Callable[..., Any] | None = None, - ) -> None: ... - def default(self, o: Any) -> Any: ... - def encode(self, o: Any) -> str: ... - def iterencode(self, o: Any, _one_shot: bool = False) -> Iterator[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/json/scanner.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/json/scanner.vpi deleted file mode 100644 index 68b42e92..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/json/scanner.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from _json import make_scanner as make_scanner -from re import Pattern -from typing import Final - -__all__ = ["make_scanner"] - -NUMBER_RE: Final[Pattern[str]] # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/json/tool.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/json/tool.vpi deleted file mode 100644 index 7e7363e7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/json/tool.vpi +++ /dev/null @@ -1 +0,0 @@ -def main() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/keyword.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/keyword.vpi deleted file mode 100644 index 6b8bdad6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/keyword.vpi +++ /dev/null @@ -1,16 +0,0 @@ -from collections.abc import Sequence -from typing import Final - -__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"] - -def iskeyword(s: str, /) -> bool: ... - -# a list at runtime, but you're not meant to mutate it; -# type it as a sequence -kwlist: Final[Sequence[str]] - -def issoftkeyword(s: str, /) -> bool: ... - -# a list at runtime, but you're not meant to mutate it; -# type it as a sequence -softkwlist: Final[Sequence[str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/btm_matcher.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/btm_matcher.vpi deleted file mode 100644 index 4c87b664..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/btm_matcher.vpi +++ /dev/null @@ -1,28 +0,0 @@ -from _typeshed import Incomplete, SupportsGetItem -from collections import defaultdict -from collections.abc import Iterable - -from .fixer_base import BaseFix -from .pytree import Leaf, Node - -class BMNode: - count: Incomplete - transition_table: Incomplete - fixers: Incomplete - id: Incomplete - content: str - def __init__(self) -> None: ... - -class BottomMatcher: - match: Incomplete - root: Incomplete - nodes: Incomplete - fixers: Incomplete - logger: Incomplete - def __init__(self) -> None: ... - def add_fixer(self, fixer: BaseFix) -> None: ... - def add(self, pattern: SupportsGetItem[int | slice, Incomplete] | None, start: BMNode) -> list[BMNode]: ... - def run(self, leaves: Iterable[Leaf]) -> defaultdict[BaseFix, list[Node | Leaf]]: ... - def print_ac(self) -> None: ... - -def type_repr(type_num: int) -> str | int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixer_base.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixer_base.vpi deleted file mode 100644 index 06813c94..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixer_base.vpi +++ /dev/null @@ -1,42 +0,0 @@ -from _typeshed import Incomplete, StrPath -from abc import ABCMeta, abstractmethod -from collections.abc import MutableMapping -from typing import ClassVar, Literal, TypeVar - -from .pytree import Base, Leaf, Node - -_N = TypeVar("_N", bound=Base) - -class BaseFix: - PATTERN: ClassVar[str | None] - pattern: Incomplete | None - pattern_tree: Incomplete | None - options: Incomplete | None - filename: Incomplete | None - numbers: Incomplete - used_names: Incomplete - order: ClassVar[Literal["post", "pre"]] - explicit: ClassVar[bool] - run_order: ClassVar[int] - keep_line_order: ClassVar[bool] - BM_compatible: ClassVar[bool] - syms: Incomplete - log: Incomplete - def __init__(self, options: MutableMapping[str, Incomplete], log: list[str]) -> None: ... - def compile_pattern(self) -> None: ... - def set_filename(self, filename: StrPath) -> None: ... - def match(self, node: _N) -> Literal[False] | dict[str, _N]: ... - @abstractmethod - def transform(self, node: Base, results: dict[str, Base]) -> Node | Leaf | None: ... - def new_name(self, template: str = "xxx_todo_changeme") -> str: ... - first_log: bool - def log_message(self, message: str) -> None: ... - def cannot_convert(self, node: Base, reason: str | None = None) -> None: ... - def warning(self, node: Base, reason: str) -> None: ... - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def finish_tree(self, tree: Node, filename: StrPath) -> None: ... - -class ConditionalFix(BaseFix, metaclass=ABCMeta): - skip_on: ClassVar[str | None] - def start_tree(self, tree: Node, filename: StrPath, /) -> None: ... - def should_skip(self, node: Base) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.vpi deleted file mode 100644 index e53e3dd8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_apply.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixApply(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.vpi deleted file mode 100644 index 1bf7db2f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_asserts.vpi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import ClassVar, Final, Literal - -from ..fixer_base import BaseFix - -NAMES: Final[dict[str, str]] - -class FixAsserts(BaseFix): - BM_compatible: ClassVar[Literal[False]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.vpi deleted file mode 100644 index 8ed5ccaa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_basestring.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixBasestring(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[Literal["'basestring'"]] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.vpi deleted file mode 100644 index 1efca622..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_buffer.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixBuffer(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.vpi deleted file mode 100644 index 08c54c3b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_dict.vpi +++ /dev/null @@ -1,16 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar, Literal - -from .. import fixer_base - -iter_exempt: set[str] - -class FixDict(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... - P1: ClassVar[str] - p1: ClassVar[Incomplete] - P2: ClassVar[str] - p2: ClassVar[Incomplete] - def in_special_context(self, node, isiter): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.vpi deleted file mode 100644 index 0d856e6b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_except.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from collections.abc import Generator, Iterable -from typing import ClassVar, Literal, TypeVar - -from .. import fixer_base -from ..pytree import Base - -_N = TypeVar("_N", bound=Base) - -def find_excepts(nodes: Iterable[_N]) -> Generator[tuple[_N, _N]]: ... - -class FixExcept(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.vpi deleted file mode 100644 index 71e2a820..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exec.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixExec(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.vpi deleted file mode 100644 index 8122a638..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_execfile.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixExecfile(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.vpi deleted file mode 100644 index 7fc910c0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_exitfunc.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from _typeshed import Incomplete, StrPath -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -from ..pytree import Node - -class FixExitfunc(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def __init__(self, *args) -> None: ... - sys_import: Incomplete | None - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.vpi deleted file mode 100644 index 638889be..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_filter.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixFilter(fixer_base.ConditionalFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - skip_on: ClassVar[Literal["future_builtins.filter"]] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.vpi deleted file mode 100644 index 60487bb1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_funcattrs.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixFuncattrs(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.vpi deleted file mode 100644 index 12ed93f2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_future.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixFuture(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.vpi deleted file mode 100644 index aa3ccf50..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_getcwdu.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixGetcwdu(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.vpi deleted file mode 100644 index f6f5a072..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_has_key.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixHasKey(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.vpi deleted file mode 100644 index 6b2723d0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_idioms.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from typing import ClassVar, Final, Literal - -from .. import fixer_base - -CMP: Final[str] -TYPE: Final[str] - -class FixIdioms(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[False]] - PATTERN: ClassVar[str] - def match(self, node): ... - def transform(self, node, results): ... - def transform_isinstance(self, node, results): ... - def transform_while(self, node, results) -> None: ... - def transform_sort(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.vpi deleted file mode 100644 index 2daa1832..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_import.vpi +++ /dev/null @@ -1,16 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Generator -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Node - -def traverse_imports(names) -> Generator[str]: ... - -class FixImport(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - skip: bool - def start_tree(self, tree: Node, name: StrPath) -> None: ... - def transform(self, node, results): ... - def probably_a_local_import(self, imp_name): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.vpi deleted file mode 100644 index d86ebbe2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports.vpi +++ /dev/null @@ -1,21 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Generator -from typing import ClassVar, Final, Literal - -from .. import fixer_base -from ..pytree import Node - -MAPPING: Final[dict[str, str]] - -def alternates(members): ... -def build_pattern(mapping=...) -> Generator[str]: ... - -class FixImports(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - mapping = MAPPING - def build_pattern(self): ... - def compile_pattern(self) -> None: ... - def match(self, node): ... - replace: dict[str, str] - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.vpi deleted file mode 100644 index 618ecd04..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_imports2.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Final - -from . import fix_imports - -MAPPING: Final[dict[str, str]] - -class FixImports2(fix_imports.FixImports): - mapping = MAPPING diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.vpi deleted file mode 100644 index fc127953..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_input.vpi +++ /dev/null @@ -1,11 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar, Literal - -from .. import fixer_base - -context: Incomplete - -class FixInput(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.vpi deleted file mode 100644 index 804b7b25..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_intern.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixIntern(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - order: ClassVar[Literal["pre"]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.vpi deleted file mode 100644 index 31eefd62..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_isinstance.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixIsinstance(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.vpi deleted file mode 100644 index 229d86ee..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixItertools(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - it_funcs: str - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.vpi deleted file mode 100644 index 39a4da50..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_itertools_imports.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -class FixItertoolsImports(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.vpi deleted file mode 100644 index 9ccf2711..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_long.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -class FixLong(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[Literal["'long'"]] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.vpi deleted file mode 100644 index 6e60282c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_map.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixMap(fixer_base.ConditionalFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - skip_on: ClassVar[Literal["future_builtins.map"]] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.vpi deleted file mode 100644 index 6ad25e9a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_metaclass.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from collections.abc import Generator -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Base - -def has_metaclass(parent): ... -def fixup_parse_tree(cls_node) -> None: ... -def fixup_simple_stmt(parent, i, stmt_node) -> None: ... -def remove_trailing_newline(node) -> None: ... -def find_metas(cls_node) -> Generator[tuple[Base, int, Base]]: ... -def fixup_indent(suite) -> None: ... - -class FixMetaclass(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.vpi deleted file mode 100644 index ca9b71e4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_methodattrs.vpi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import ClassVar, Final, Literal - -from .. import fixer_base - -MAP: Final[dict[str, str]] - -class FixMethodattrs(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.vpi deleted file mode 100644 index 6ff1220b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ne.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixNe(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[False]] - def match(self, node): ... - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.vpi deleted file mode 100644 index b13914ae..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_next.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from _typeshed import StrPath -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Node - -bind_warning: str - -class FixNext(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - order: ClassVar[Literal["pre"]] - shadowed_next: bool - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def transform(self, node, results) -> None: ... - -def is_assign_target(node): ... -def find_assign(node): ... -def is_subtree(root, node): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.vpi deleted file mode 100644 index 5c37fc12..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_nonzero.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixNonzero(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.vpi deleted file mode 100644 index 113145e3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_numliterals.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixNumliterals(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[False]] - def match(self, node): ... - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.vpi deleted file mode 100644 index b9863d38..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_operator.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -def invocation(s): ... - -class FixOperator(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - order: ClassVar[Literal["pre"]] - methods: str - obj: str - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.vpi deleted file mode 100644 index 237df6c5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_paren.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixParen(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.vpi deleted file mode 100644 index e9564b04..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_print.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from _typeshed import Incomplete -from typing import ClassVar, Literal - -from .. import fixer_base - -parend_expr: Incomplete - -class FixPrint(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... - def add_kwarg(self, l_nodes, s_kwd, n_expr) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.vpi deleted file mode 100644 index e02c3080..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raise.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixRaise(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.vpi deleted file mode 100644 index d1a0eb0e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_raw_input.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixRawInput(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.vpi deleted file mode 100644 index f8ad876c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reduce.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -class FixReduce(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - order: ClassVar[Literal["pre"]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.vpi deleted file mode 100644 index 82007543..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_reload.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixReload(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - order: ClassVar[Literal["pre"]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.vpi deleted file mode 100644 index f095b308..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_renames.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from collections.abc import Generator -from typing import ClassVar, Final, Literal - -from .. import fixer_base - -MAPPING: Final[dict[str, dict[str, str]]] -LOOKUP: Final[dict[tuple[str, str], str]] - -def alternates(members): ... -def build_pattern() -> Generator[str]: ... - -class FixRenames(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - order: ClassVar[Literal["pre"]] - PATTERN: ClassVar[str] - def match(self, node): ... - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.vpi deleted file mode 100644 index 3b192d39..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_repr.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixRepr(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.vpi deleted file mode 100644 index 6962ff32..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_set_literal.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from lib2to3 import fixer_base -from typing import ClassVar, Literal - -class FixSetLiteral(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.vpi deleted file mode 100644 index ba914bca..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_standarderror.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixStandarderror(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.vpi deleted file mode 100644 index 0fa1a478..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_sys_exc.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixSysExc(fixer_base.BaseFix): - exc_info: ClassVar[list[str]] - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.vpi deleted file mode 100644 index 4c99855e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_throw.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixThrow(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.vpi deleted file mode 100644 index 7f4f7f4e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_tuple_params.vpi +++ /dev/null @@ -1,16 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -def is_docstring(stmt): ... - -class FixTupleParams(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... - def transform_lambda(self, node, results) -> None: ... - -def simplify_args(node): ... -def find_params(node): ... -def map_to_index(param_list, prefix=[], d=None): ... -def tuple_name(param_list): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.vpi deleted file mode 100644 index e26dbec7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_types.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixTypes(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.vpi deleted file mode 100644 index 85d13152..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_unicode.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from _typeshed import StrPath -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Node - -class FixUnicode(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - unicode_literals: bool - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.vpi deleted file mode 100644 index ab84114f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_urllib.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from collections.abc import Generator -from typing import Final, Literal - -from .fix_imports import FixImports - -MAPPING: Final[dict[str, list[tuple[Literal["urllib.request", "urllib.parse", "urllib.error"], list[str]]]]] - -def build_pattern() -> Generator[str]: ... - -class FixUrllib(FixImports): - def build_pattern(self): ... - def transform_import(self, node, results) -> None: ... - def transform_member(self, node, results): ... - def transform_dot(self, node, results) -> None: ... - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.vpi deleted file mode 100644 index 4ce5cb2c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_ws_comma.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Leaf - -class FixWsComma(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[False]] - PATTERN: ClassVar[str] - COMMA: Leaf - COLON: Leaf - SEPS: tuple[Leaf, Leaf] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.vpi deleted file mode 100644 index 71318b76..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xrange.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from _typeshed import Incomplete, StrPath -from typing import ClassVar, Literal - -from .. import fixer_base -from ..pytree import Node - -class FixXrange(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - transformed_xranges: set[Incomplete] | None - def start_tree(self, tree: Node, filename: StrPath) -> None: ... - def finish_tree(self, tree: Node, filename: StrPath) -> None: ... - def transform(self, node, results): ... - def transform_xrange(self, node, results) -> None: ... - def transform_range(self, node, results): ... - P1: ClassVar[str] - p1: ClassVar[Incomplete] - P2: ClassVar[str] - p2: ClassVar[Incomplete] - def in_special_context(self, node): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.vpi deleted file mode 100644 index b4794143..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_xreadlines.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixXreadlines(fixer_base.BaseFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - def transform(self, node, results) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.vpi deleted file mode 100644 index 805886ee..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/fixes/fix_zip.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import ClassVar, Literal - -from .. import fixer_base - -class FixZip(fixer_base.ConditionalFix): - BM_compatible: ClassVar[Literal[True]] - PATTERN: ClassVar[str] - skip_on: ClassVar[Literal["future_builtins.zip"]] - def transform(self, node, results): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/main.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/main.vpi deleted file mode 100644 index 5b7fdfca..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/main.vpi +++ /dev/null @@ -1,42 +0,0 @@ -from _typeshed import FileDescriptorOrPath -from collections.abc import Container, Iterable, Iterator, Mapping, Sequence -from logging import _ExcInfoType -from typing import AnyStr, Literal - -from . import refactor as refactor - -def diff_texts(a: str, b: str, filename: str) -> Iterator[str]: ... - -class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): - nobackups: bool - show_diffs: bool - def __init__( - self, - fixers: Iterable[str], - options: Mapping[str, object] | None, - explicit: Container[str] | None, - nobackups: bool, - show_diffs: bool, - input_base_dir: str = "", - output_dir: str = "", - append_suffix: str = "", - ) -> None: ... - # Same as super.log_error and Logger.error - def log_error( # type: ignore[override] - self, - msg: str, - *args: Iterable[str], - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - # Same as super.write_file but without default values - def write_file( # type: ignore[override] - self, new_text: str, filename: FileDescriptorOrPath, old_text: str, encoding: str | None - ) -> None: ... - # filename has to be str - def print_output(self, old: str, new: str, filename: str, equal: bool) -> None: ... # type: ignore[override] - -def warn(msg: object) -> None: ... -def main(fixer_pkg: str, args: Sequence[AnyStr] | None = None) -> Literal[0, 1, 2]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.vpi deleted file mode 100644 index 3b1cbef7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/__init__.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from collections.abc import Callable -from typing import Any, TypeAlias - -from ..pytree import _RawNode -from .grammar import Grammar - -# This is imported in several lib2to3/pgen2 submodules -_Convert: TypeAlias = Callable[[Grammar, _RawNode], Any] # noqa: Y047 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/driver.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/driver.vpi deleted file mode 100644 index dea13fb9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/driver.vpi +++ /dev/null @@ -1,27 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Iterable -from logging import Logger -from typing import IO - -from ..pytree import _NL -from . import _Convert -from .grammar import Grammar - -__all__ = ["Driver", "load_grammar"] - -class Driver: - grammar: Grammar - logger: Logger - convert: _Convert - def __init__(self, grammar: Grammar, convert: _Convert | None = None, logger: Logger | None = None) -> None: ... - def parse_tokens( - self, tokens: Iterable[tuple[int, str, tuple[int, int], tuple[int, int], str]], debug: bool = False - ) -> _NL: ... - def parse_stream_raw(self, stream: IO[str], debug: bool = False) -> _NL: ... - def parse_stream(self, stream: IO[str], debug: bool = False) -> _NL: ... - def parse_file(self, filename: StrPath, encoding: str | None = None, debug: bool = False) -> _NL: ... - def parse_string(self, text: str, debug: bool = False) -> _NL: ... - -def load_grammar( - gt: str = "Grammar.txt", gp: str | None = None, save: bool = True, force: bool = False, logger: Logger | None = None -) -> Grammar: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.vpi deleted file mode 100644 index 5093422a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/grammar.vpi +++ /dev/null @@ -1,25 +0,0 @@ -from _typeshed import StrPath -from typing import TypeAlias -from typing_extensions import Self - -_Label: TypeAlias = tuple[int, str | None] -_DFA: TypeAlias = list[list[tuple[int, int]]] -_DFAS: TypeAlias = tuple[_DFA, dict[int, int]] - -class Grammar: - symbol2number: dict[str, int] - number2symbol: dict[int, str] - states: list[_DFA] - dfas: dict[int, _DFAS] - labels: list[_Label] - keywords: dict[str, int] - tokens: dict[int, int] - symbol2label: dict[str, int] - start: int - def dump(self, filename: StrPath) -> None: ... - def load(self, filename: StrPath) -> None: ... - def copy(self) -> Self: ... - def report(self) -> None: ... - -opmap_raw: str -opmap: dict[str, str] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/literals.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/literals.vpi deleted file mode 100644 index c3fabe8a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/literals.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from re import Match - -simple_escapes: dict[str, str] - -def escape(m: Match[str]) -> str: ... -def evalString(s: str) -> str: ... -def test() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/parse.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/parse.vpi deleted file mode 100644 index 9befe9bf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/parse.vpi +++ /dev/null @@ -1,30 +0,0 @@ -from _typeshed import Incomplete -from collections.abc import Sequence -from typing import TypeAlias - -from ..pytree import _NL, _RawNode -from . import _Convert -from .grammar import _DFAS, Grammar - -_Context: TypeAlias = Sequence[Incomplete] - -class ParseError(Exception): - msg: str - type: int - value: str | None - context: _Context - def __init__(self, msg: str, type: int, value: str | None, context: _Context) -> None: ... - -class Parser: - grammar: Grammar - convert: _Convert - stack: list[tuple[_DFAS, int, _RawNode]] - rootnode: _NL | None - used_names: set[str] - def __init__(self, grammar: Grammar, convert: _Convert | None = None) -> None: ... - def setup(self, start: int | None = None) -> None: ... - def addtoken(self, type: int, value: str | None, context: _Context) -> bool: ... - def classify(self, type: int, value: str | None, context: _Context) -> int: ... - def shift(self, type: int, value: str | None, newstate: int, context: _Context) -> None: ... - def push(self, type: int, newdfa: _DFAS, newstate: int, context: _Context) -> None: ... - def pop(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.vpi deleted file mode 100644 index 4b951e14..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/pgen.vpi +++ /dev/null @@ -1,52 +0,0 @@ -from _typeshed import Incomplete, StrPath -from collections.abc import Iterable, Iterator -from typing import IO, ClassVar, NoReturn, overload - -from . import grammar -from .tokenize import _TokenInfo - -class PgenGrammar(grammar.Grammar): ... - -class ParserGenerator: - filename: StrPath - stream: IO[str] - generator: Iterator[_TokenInfo] - first: dict[str, dict[str, int]] - def __init__(self, filename: StrPath, stream: IO[str] | None = None) -> None: ... - def make_grammar(self) -> PgenGrammar: ... - def make_first(self, c: PgenGrammar, name: str) -> dict[int, int]: ... - def make_label(self, c: PgenGrammar, label: str) -> int: ... - def addfirstsets(self) -> None: ... - def calcfirst(self, name: str) -> None: ... - def parse(self) -> tuple[dict[str, list[DFAState]], str]: ... - def make_dfa(self, start: NFAState, finish: NFAState) -> list[DFAState]: ... - def dump_nfa(self, name: str, start: NFAState, finish: NFAState) -> list[DFAState]: ... - def dump_dfa(self, name: str, dfa: Iterable[DFAState]) -> None: ... - def simplify_dfa(self, dfa: list[DFAState]) -> None: ... - def parse_rhs(self) -> tuple[NFAState, NFAState]: ... - def parse_alt(self) -> tuple[NFAState, NFAState]: ... - def parse_item(self) -> tuple[NFAState, NFAState]: ... - def parse_atom(self) -> tuple[NFAState, NFAState]: ... - def expect(self, type: int, value: str | None = None) -> str: ... - def gettoken(self) -> None: ... - - @overload - def raise_error(self, msg: object) -> NoReturn: ... - @overload - def raise_error(self, msg: str, *args: object) -> NoReturn: ... - -class NFAState: - arcs: list[tuple[str | None, NFAState]] - def addarc(self, next: NFAState, label: str | None = None) -> None: ... - -class DFAState: - nfaset: dict[NFAState, Incomplete] - isfinal: bool - arcs: dict[str, DFAState] - def __init__(self, nfaset: dict[NFAState, Incomplete], final: NFAState) -> None: ... - def addarc(self, next: DFAState, label: str) -> None: ... - def unifystate(self, old: DFAState, new: DFAState) -> None: ... - def __eq__(self, other: DFAState) -> bool: ... # type: ignore[override] - __hash__: ClassVar[None] # type: ignore[assignment] - -def generate_grammar(filename: StrPath = "Grammar.txt") -> PgenGrammar: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/token.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/token.vpi deleted file mode 100644 index 6898517a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/token.vpi +++ /dev/null @@ -1,69 +0,0 @@ -from typing import Final - -ENDMARKER: Final[int] -NAME: Final[int] -NUMBER: Final[int] -STRING: Final[int] -NEWLINE: Final[int] -INDENT: Final[int] -DEDENT: Final[int] -LPAR: Final[int] -RPAR: Final[int] -LSQB: Final[int] -RSQB: Final[int] -COLON: Final[int] -COMMA: Final[int] -SEMI: Final[int] -PLUS: Final[int] -MINUS: Final[int] -STAR: Final[int] -SLASH: Final[int] -VBAR: Final[int] -AMPER: Final[int] -LESS: Final[int] -GREATER: Final[int] -EQUAL: Final[int] -DOT: Final[int] -PERCENT: Final[int] -BACKQUOTE: Final[int] -LBRACE: Final[int] -RBRACE: Final[int] -EQEQUAL: Final[int] -NOTEQUAL: Final[int] -LESSEQUAL: Final[int] -GREATEREQUAL: Final[int] -TILDE: Final[int] -CIRCUMFLEX: Final[int] -LEFTSHIFT: Final[int] -RIGHTSHIFT: Final[int] -DOUBLESTAR: Final[int] -PLUSEQUAL: Final[int] -MINEQUAL: Final[int] -STAREQUAL: Final[int] -SLASHEQUAL: Final[int] -PERCENTEQUAL: Final[int] -AMPEREQUAL: Final[int] -VBAREQUAL: Final[int] -CIRCUMFLEXEQUAL: Final[int] -LEFTSHIFTEQUAL: Final[int] -RIGHTSHIFTEQUAL: Final[int] -DOUBLESTAREQUAL: Final[int] -DOUBLESLASH: Final[int] -DOUBLESLASHEQUAL: Final[int] -OP: Final[int] -COMMENT: Final[int] -NL: Final[int] -RARROW: Final[int] -AT: Final[int] -ATEQUAL: Final[int] -AWAIT: Final[int] -ASYNC: Final[int] -ERRORTOKEN: Final[int] -COLONEQUAL: Final[int] -N_TOKENS: Final[int] -NT_OFFSET: Final[int] -tok_name: dict[int, str] - -def ISTERMINAL(x: int) -> bool: ... -def ISNONTERMINAL(x: int) -> bool: ... -def ISEOF(x: int) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.vpi deleted file mode 100644 index 76ff7331..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pgen2/tokenize.vpi +++ /dev/null @@ -1,96 +0,0 @@ -from collections.abc import Callable, Iterable, Iterator -from typing import TypeAlias - -from .token import * - -__all__ = [ - "AMPER", - "AMPEREQUAL", - "ASYNC", - "AT", - "ATEQUAL", - "AWAIT", - "BACKQUOTE", - "CIRCUMFLEX", - "CIRCUMFLEXEQUAL", - "COLON", - "COMMA", - "COMMENT", - "DEDENT", - "DOT", - "DOUBLESLASH", - "DOUBLESLASHEQUAL", - "DOUBLESTAR", - "DOUBLESTAREQUAL", - "ENDMARKER", - "EQEQUAL", - "EQUAL", - "ERRORTOKEN", - "GREATER", - "GREATEREQUAL", - "INDENT", - "ISEOF", - "ISNONTERMINAL", - "ISTERMINAL", - "LBRACE", - "LEFTSHIFT", - "LEFTSHIFTEQUAL", - "LESS", - "LESSEQUAL", - "LPAR", - "LSQB", - "MINEQUAL", - "MINUS", - "NAME", - "NEWLINE", - "NL", - "NOTEQUAL", - "NT_OFFSET", - "NUMBER", - "N_TOKENS", - "OP", - "PERCENT", - "PERCENTEQUAL", - "PLUS", - "PLUSEQUAL", - "RARROW", - "RBRACE", - "RIGHTSHIFT", - "RIGHTSHIFTEQUAL", - "RPAR", - "RSQB", - "SEMI", - "SLASH", - "SLASHEQUAL", - "STAR", - "STAREQUAL", - "STRING", - "TILDE", - "VBAR", - "VBAREQUAL", - "tok_name", - "tokenize", - "generate_tokens", - "untokenize", - "COLONEQUAL", -] - -_Coord: TypeAlias = tuple[int, int] -_TokenEater: TypeAlias = Callable[[int, str, _Coord, _Coord, str], object] -_TokenInfo: TypeAlias = tuple[int, str, _Coord, _Coord, str] - -class TokenError(Exception): ... -class StopTokenizing(Exception): ... - -def tokenize(readline: Callable[[], str], tokeneater: _TokenEater = ...) -> None: ... - -class Untokenizer: - tokens: list[str] - prev_row: int - prev_col: int - def add_whitespace(self, start: _Coord) -> None: ... - def untokenize(self, iterable: Iterable[_TokenInfo]) -> str: ... - def compat(self, token: tuple[int, str], iterable: Iterable[_TokenInfo]) -> None: ... - -def untokenize(iterable: Iterable[_TokenInfo]) -> str: ... -def generate_tokens(readline: Callable[[], str]) -> Iterator[_TokenInfo]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pygram.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pygram.vpi deleted file mode 100644 index 86c74b54..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pygram.vpi +++ /dev/null @@ -1,114 +0,0 @@ -from .pgen2.grammar import Grammar - -class Symbols: - def __init__(self, grammar: Grammar) -> None: ... - -class python_symbols(Symbols): - and_expr: int - and_test: int - annassign: int - arglist: int - argument: int - arith_expr: int - assert_stmt: int - async_funcdef: int - async_stmt: int - atom: int - augassign: int - break_stmt: int - classdef: int - comp_for: int - comp_if: int - comp_iter: int - comp_op: int - comparison: int - compound_stmt: int - continue_stmt: int - decorated: int - decorator: int - decorators: int - del_stmt: int - dictsetmaker: int - dotted_as_name: int - dotted_as_names: int - dotted_name: int - encoding_decl: int - eval_input: int - except_clause: int - exec_stmt: int - expr: int - expr_stmt: int - exprlist: int - factor: int - file_input: int - flow_stmt: int - for_stmt: int - funcdef: int - global_stmt: int - if_stmt: int - import_as_name: int - import_as_names: int - import_from: int - import_name: int - import_stmt: int - lambdef: int - listmaker: int - not_test: int - old_lambdef: int - old_test: int - or_test: int - parameters: int - pass_stmt: int - power: int - print_stmt: int - raise_stmt: int - return_stmt: int - shift_expr: int - simple_stmt: int - single_input: int - sliceop: int - small_stmt: int - star_expr: int - stmt: int - subscript: int - subscriptlist: int - suite: int - term: int - test: int - testlist: int - testlist1: int - testlist_gexp: int - testlist_safe: int - testlist_star_expr: int - tfpdef: int - tfplist: int - tname: int - trailer: int - try_stmt: int - typedargslist: int - varargslist: int - vfpdef: int - vfplist: int - vname: int - while_stmt: int - with_item: int - with_stmt: int - with_var: int - xor_expr: int - yield_arg: int - yield_expr: int - yield_stmt: int - -class pattern_symbols(Symbols): - Alternative: int - Alternatives: int - Details: int - Matcher: int - NegatedUnit: int - Repeater: int - Unit: int - -python_grammar: Grammar -python_grammar_no_print_statement: Grammar -python_grammar_no_print_and_exec_statement: Grammar -pattern_grammar: Grammar diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pytree.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pytree.vpi deleted file mode 100644 index 045f7882..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/pytree.vpi +++ /dev/null @@ -1,118 +0,0 @@ -from _typeshed import Incomplete, SupportsGetItem, SupportsLenAndGetItem, Unused -from abc import abstractmethod -from collections.abc import Iterable, Iterator, MutableSequence -from typing import ClassVar, Final, TypeAlias -from typing_extensions import Self - -from .fixer_base import BaseFix -from .pgen2.grammar import Grammar - -_NL: TypeAlias = Node | Leaf -_Context: TypeAlias = tuple[str, int, int] -_Results: TypeAlias = dict[str, _NL] -_RawNode: TypeAlias = tuple[int, str, _Context, list[_NL] | None] - -HUGE: Final = 0x7FFFFFFF - -def type_repr(type_num: int) -> str | int: ... - -class Base: - type: int - parent: Node | None - prefix: str - children: list[_NL] - was_changed: bool - was_checked: bool - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - @abstractmethod - def _eq(self, other: Base) -> bool: ... - @abstractmethod - def clone(self) -> Self: ... - @abstractmethod - def post_order(self) -> Iterator[Self]: ... - @abstractmethod - def pre_order(self) -> Iterator[Self]: ... - def replace(self, new: _NL | list[_NL]) -> None: ... - def get_lineno(self) -> int: ... - def changed(self) -> None: ... - def remove(self) -> int | None: ... - @property - def next_sibling(self) -> _NL | None: ... - @property - def prev_sibling(self) -> _NL | None: ... - def leaves(self) -> Iterator[Leaf]: ... - def depth(self) -> int: ... - def get_suffix(self) -> str: ... - -class Node(Base): - fixers_applied: MutableSequence[BaseFix] | None - # Is Unbound until set in refactor.RefactoringTool - future_features: frozenset[Incomplete] - # Is Unbound until set in pgen2.parse.Parser.pop - used_names: set[str] - def __init__( - self, - type: int, - children: Iterable[_NL], - context: Unused = None, - prefix: str | None = None, - fixers_applied: MutableSequence[BaseFix] | None = None, - ) -> None: ... - def _eq(self, other: Base) -> bool: ... - def clone(self) -> Node: ... - def post_order(self) -> Iterator[Self]: ... - def pre_order(self) -> Iterator[Self]: ... - def set_child(self, i: int, child: _NL) -> None: ... - def insert_child(self, i: int, child: _NL) -> None: ... - def append_child(self, child: _NL) -> None: ... - def __unicode__(self) -> str: ... - -class Leaf(Base): - lineno: int - column: int - value: str - fixers_applied: MutableSequence[BaseFix] - def __init__( - self, - type: int, - value: str, - context: _Context | None = None, - prefix: str | None = None, - fixers_applied: MutableSequence[BaseFix] = [], - ) -> None: ... - def _eq(self, other: Base) -> bool: ... - def clone(self) -> Leaf: ... - def post_order(self) -> Iterator[Self]: ... - def pre_order(self) -> Iterator[Self]: ... - def __unicode__(self) -> str: ... - -def convert(gr: Grammar, raw_node: _RawNode) -> _NL: ... - -class BasePattern: - type: int - content: str | None - name: str | None - def optimize(self) -> BasePattern: ... # sic, subclasses are free to optimize themselves into different patterns - def match(self, node: _NL, results: _Results | None = None) -> bool: ... - def match_seq(self, nodes: SupportsLenAndGetItem[_NL], results: _Results | None = None) -> bool: ... - def generate_matches(self, nodes: SupportsGetItem[int, _NL]) -> Iterator[tuple[int, _Results]]: ... - -class LeafPattern(BasePattern): - def __init__(self, type: int | None = None, content: str | None = None, name: str | None = None) -> None: ... - -class NodePattern(BasePattern): - wildcards: bool - def __init__(self, type: int | None = None, content: str | None = None, name: str | None = None) -> None: ... - -class WildcardPattern(BasePattern): - min: int - max: int - def __init__(self, content: str | None = None, min: int = 0, max: int = 0x7FFFFFFF, name: str | None = None) -> None: ... - -class NegatedPattern(BasePattern): - def __init__(self, content: str | None = None) -> None: ... - -def generate_matches( - patterns: SupportsGetItem[int | slice, BasePattern] | None, nodes: SupportsGetItem[int | slice, _NL] -) -> Iterator[tuple[int, _Results]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/refactor.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/refactor.vpi deleted file mode 100644 index dfec28b7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lib2to3/refactor.vpi +++ /dev/null @@ -1,85 +0,0 @@ -from _typeshed import FileDescriptorOrPath, StrPath, SupportsGetItem -from collections.abc import Container, Generator, Iterable, Mapping -from logging import Logger, _ExcInfoType -from multiprocessing import JoinableQueue -from multiprocessing.synchronize import Lock -from typing import Any, ClassVar, Final, NoReturn, overload - -from .btm_matcher import BottomMatcher -from .fixer_base import BaseFix -from .pgen2.driver import Driver -from .pgen2.grammar import Grammar -from .pytree import Node - -def get_all_fix_names(fixer_pkg: str, remove_prefix: bool = True) -> list[str]: ... -def get_fixers_from_package(pkg_name: str) -> list[str]: ... - -class FixerError(Exception): ... - -class RefactoringTool: - CLASS_PREFIX: ClassVar[str] - FILE_PREFIX: ClassVar[str] - fixers: Iterable[str] - explicit: Container[str] - options: dict[str, Any] - grammar: Grammar - write_unchanged_files: bool - errors: list[tuple[str, Iterable[str], dict[str, _ExcInfoType]]] - logger: Logger - fixer_log: list[str] - wrote: bool - driver: Driver - pre_order: list[BaseFix] - post_order: list[BaseFix] - files: list[StrPath] - BM: BottomMatcher - bmi_pre_order: list[BaseFix] - bmi_post_order: list[BaseFix] - def __init__( - self, fixer_names: Iterable[str], options: Mapping[str, object] | None = None, explicit: Container[str] | None = None - ) -> None: ... - def get_fixers(self) -> tuple[list[BaseFix], list[BaseFix]]: ... - def log_error(self, msg: str, *args: Iterable[str], **kwargs: _ExcInfoType) -> NoReturn: ... - - @overload - def log_message(self, msg: object) -> None: ... - @overload - def log_message(self, msg: str, *args: object) -> None: ... - - @overload - def log_debug(self, msg: object) -> None: ... - @overload - def log_debug(self, msg: str, *args: object) -> None: ... - - def print_output(self, old_text: str, new_text: str, filename: StrPath, equal: bool) -> None: ... - def refactor(self, items: Iterable[str], write: bool = False, doctests_only: bool = False) -> None: ... - def refactor_dir(self, dir_name: str, write: bool = False, doctests_only: bool = False) -> None: ... - def _read_python_source(self, filename: FileDescriptorOrPath) -> tuple[str, str]: ... - def refactor_file(self, filename: StrPath, write: bool = False, doctests_only: bool = False) -> None: ... - def refactor_string(self, data: str, name: str) -> Node | None: ... - def refactor_stdin(self, doctests_only: bool = False) -> None: ... - def refactor_tree(self, tree: Node, name: str) -> bool: ... - def traverse_by(self, fixers: SupportsGetItem[int, Iterable[BaseFix]] | None, traversal: Iterable[Node]) -> None: ... - def processed_file( - self, new_text: str, filename: StrPath, old_text: str | None = None, write: bool = False, encoding: str | None = None - ) -> None: ... - def write_file(self, new_text: str, filename: FileDescriptorOrPath, old_text: str, encoding: str | None = None) -> None: ... - PS1: Final = ">>> " - PS2: Final = "... " - def refactor_docstring(self, input: str, filename: StrPath) -> str: ... - def refactor_doctest(self, block: list[str], lineno: int, indent: int, filename: StrPath) -> list[str]: ... - def summarize(self) -> None: ... - def parse_block(self, block: Iterable[str], lineno: int, indent: int) -> Node: ... - def wrap_toks( - self, block: Iterable[str], lineno: int, indent: int - ) -> Generator[tuple[int, str, tuple[int, int], tuple[int, int], str]]: ... - def gen_lines(self, block: Iterable[str], indent: int) -> Generator[str]: ... - -class MultiprocessingUnsupported(Exception): ... - -class MultiprocessRefactoringTool(RefactoringTool): - queue: JoinableQueue[None | tuple[Iterable[str], bool | int]] | None - output_lock: Lock | None - def refactor( - self, items: Iterable[str], write: bool = False, doctests_only: bool = False, num_processes: int = 1 - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/linecache.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/linecache.vpi deleted file mode 100644 index f527e708..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/linecache.vpi +++ /dev/null @@ -1,18 +0,0 @@ -from collections.abc import Callable -from typing import Any, TypeAlias - -__all__ = ["getline", "clearcache", "checkcache", "lazycache"] - -_ModuleGlobals: TypeAlias = dict[str, Any] -_ModuleMetadata: TypeAlias = tuple[int, float | None, list[str], str] - -_SourceLoader: TypeAlias = tuple[Callable[[], str | None]] - -cache: dict[str, _SourceLoader | _ModuleMetadata] # undocumented - -def getline(filename: str, lineno: int, module_globals: _ModuleGlobals | None = None) -> str: ... -def clearcache() -> None: ... -def getlines(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ... -def checkcache(filename: str | None = None) -> None: ... -def updatecache(filename: str, module_globals: _ModuleGlobals | None = None) -> list[str]: ... -def lazycache(filename: str, module_globals: _ModuleGlobals) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/locale.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/locale.vpi deleted file mode 100644 index 1be68ec5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/locale.vpi +++ /dev/null @@ -1,160 +0,0 @@ -import sys -from _locale import ( - CHAR_MAX as CHAR_MAX, - LC_ALL as LC_ALL, - LC_COLLATE as LC_COLLATE, - LC_CTYPE as LC_CTYPE, - LC_MONETARY as LC_MONETARY, - LC_NUMERIC as LC_NUMERIC, - LC_TIME as LC_TIME, - localeconv as localeconv, - strcoll as strcoll, - strxfrm as strxfrm, -) - -# This module defines a function "str()", which is why "str" can't be used -# as a type annotation or type alias. -from builtins import str as _str -from collections.abc import Callable, Iterable -from decimal import Decimal -from typing import Any -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - from _locale import getencoding as getencoding - -# Some parts of the `_locale` module are platform-specific: -if sys.platform != "win32": - from _locale import ( - ABDAY_1 as ABDAY_1, - ABDAY_2 as ABDAY_2, - ABDAY_3 as ABDAY_3, - ABDAY_4 as ABDAY_4, - ABDAY_5 as ABDAY_5, - ABDAY_6 as ABDAY_6, - ABDAY_7 as ABDAY_7, - ABMON_1 as ABMON_1, - ABMON_2 as ABMON_2, - ABMON_3 as ABMON_3, - ABMON_4 as ABMON_4, - ABMON_5 as ABMON_5, - ABMON_6 as ABMON_6, - ABMON_7 as ABMON_7, - ABMON_8 as ABMON_8, - ABMON_9 as ABMON_9, - ABMON_10 as ABMON_10, - ABMON_11 as ABMON_11, - ABMON_12 as ABMON_12, - ALT_DIGITS as ALT_DIGITS, - AM_STR as AM_STR, - CODESET as CODESET, - CRNCYSTR as CRNCYSTR, - D_FMT as D_FMT, - D_T_FMT as D_T_FMT, - DAY_1 as DAY_1, - DAY_2 as DAY_2, - DAY_3 as DAY_3, - DAY_4 as DAY_4, - DAY_5 as DAY_5, - DAY_6 as DAY_6, - DAY_7 as DAY_7, - ERA as ERA, - ERA_D_FMT as ERA_D_FMT, - ERA_D_T_FMT as ERA_D_T_FMT, - ERA_T_FMT as ERA_T_FMT, - LC_MESSAGES as LC_MESSAGES, - MON_1 as MON_1, - MON_2 as MON_2, - MON_3 as MON_3, - MON_4 as MON_4, - MON_5 as MON_5, - MON_6 as MON_6, - MON_7 as MON_7, - MON_8 as MON_8, - MON_9 as MON_9, - MON_10 as MON_10, - MON_11 as MON_11, - MON_12 as MON_12, - NOEXPR as NOEXPR, - PM_STR as PM_STR, - RADIXCHAR as RADIXCHAR, - T_FMT as T_FMT, - T_FMT_AMPM as T_FMT_AMPM, - THOUSEP as THOUSEP, - YESEXPR as YESEXPR, - bind_textdomain_codeset as bind_textdomain_codeset, - bindtextdomain as bindtextdomain, - dcgettext as dcgettext, - dgettext as dgettext, - gettext as gettext, - nl_langinfo as nl_langinfo, - textdomain as textdomain, - ) - -__all__ = [ - "getlocale", - "getdefaultlocale", - "getpreferredencoding", - "Error", - "setlocale", - "localeconv", - "strcoll", - "strxfrm", - "str", - "atof", - "atoi", - "format_string", - "currency", - "normalize", - "LC_CTYPE", - "LC_COLLATE", - "LC_TIME", - "LC_MONETARY", - "LC_NUMERIC", - "LC_ALL", - "CHAR_MAX", -] - -if sys.version_info >= (3, 11): - __all__ += ["getencoding"] - -if sys.version_info < (3, 12): - __all__ += ["format"] - -if sys.version_info < (3, 13): - __all__ += ["resetlocale"] - -if sys.platform != "win32": - __all__ += ["LC_MESSAGES"] - -class Error(Exception): ... - -def getdefaultlocale( - envvars: tuple[_str, ...] = ("LC_ALL", "LC_CTYPE", "LANG", "LANGUAGE") -) -> tuple[_str | None, _str | None]: ... -def getlocale(category: int = ...) -> tuple[_str | None, _str | None]: ... -def setlocale(category: int, locale: _str | Iterable[_str | None] | None = None) -> _str: ... -def getpreferredencoding(do_setlocale: bool = True) -> _str: ... -def normalize(localename: _str) -> _str: ... - -if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.11; removed in Python 3.13. Use `locale.setlocale(locale.LC_ALL, '')` instead.") - def resetlocale(category: int = ...) -> None: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.7; removed in Python 3.12. Use `locale.format_string()` instead.") - def format( - percent: _str, value: float | Decimal, grouping: bool = False, monetary: bool = False, *additional: Any - ) -> _str: ... - -def format_string(f: _str, val: Any, grouping: bool = False, monetary: bool = False) -> _str: ... -def currency(val: float | Decimal, symbol: bool = True, grouping: bool = False, international: bool = False) -> _str: ... -def delocalize(string: _str) -> _str: ... -def localize(string: _str, grouping: bool = False, monetary: bool = False) -> _str: ... -def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ... -def atoi(string: _str) -> int: ... -def str(val: float) -> _str: ... - -locale_alias: dict[_str, _str] # undocumented -locale_encoding_alias: dict[_str, _str] # undocumented -windows_locale: dict[int, _str] # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/logging/__init__.vpi deleted file mode 100644 index 10911d6e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/__init__.vpi +++ /dev/null @@ -1,674 +0,0 @@ -import sys -import threading -from _typeshed import StrPath, SupportsWrite -from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence -from io import TextIOWrapper -from re import Pattern -from string import Template -from time import struct_time -from types import FrameType, GenericAlias, TracebackType -from typing import Any, ClassVar, Final, Generic, Literal, Protocol, TextIO, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, deprecated - -__all__ = [ - "BASIC_FORMAT", - "BufferingFormatter", - "CRITICAL", - "DEBUG", - "ERROR", - "FATAL", - "FileHandler", - "Filter", - "Formatter", - "Handler", - "INFO", - "LogRecord", - "Logger", - "LoggerAdapter", - "NOTSET", - "NullHandler", - "StreamHandler", - "WARN", - "WARNING", - "addLevelName", - "basicConfig", - "captureWarnings", - "critical", - "debug", - "disable", - "error", - "exception", - "fatal", - "getLevelName", - "getLogger", - "getLoggerClass", - "info", - "log", - "makeLogRecord", - "setLoggerClass", - "shutdown", - "warning", - "getLogRecordFactory", - "setLogRecordFactory", - "lastResort", - "raiseExceptions", - "warn", -] - -if sys.version_info >= (3, 11): - __all__ += ["getLevelNamesMapping"] -if sys.version_info >= (3, 12): - __all__ += ["getHandlerByName", "getHandlerNames"] - -_SysExcInfoType: TypeAlias = tuple[type[BaseException], BaseException, TracebackType | None] | tuple[None, None, None] -_ExcInfoType: TypeAlias = None | bool | _SysExcInfoType | BaseException -_ArgsType: TypeAlias = tuple[object, ...] | Mapping[str, object] -_Level: TypeAlias = int | str -_FormatStyle: TypeAlias = Literal["%", "{", "$"] - -if sys.version_info >= (3, 12): - @type_check_only - class _SupportsFilter(Protocol): - def filter(self, record: LogRecord, /) -> bool | LogRecord: ... - - _FilterType: TypeAlias = Filter | Callable[[LogRecord], bool | LogRecord] | _SupportsFilter -else: - @type_check_only - class _SupportsFilter(Protocol): - def filter(self, record: LogRecord, /) -> bool: ... - - _FilterType: TypeAlias = Filter | Callable[[LogRecord], bool] | _SupportsFilter - -raiseExceptions: bool -logThreads: bool -logMultiprocessing: bool -logProcesses: bool -_srcfile: str | None - -def currentframe() -> FrameType: ... - -_levelToName: dict[int, str] -_nameToLevel: dict[str, int] - -class Filterer: - filters: list[_FilterType] - def addFilter(self, filter: _FilterType) -> None: ... - def removeFilter(self, filter: _FilterType) -> None: ... - if sys.version_info >= (3, 12): - def filter(self, record: LogRecord) -> bool | LogRecord: ... - else: - def filter(self, record: LogRecord) -> bool: ... - -class Manager: # undocumented - root: RootLogger - disable: int - emittedNoHandlerWarning: bool - loggerDict: dict[str, Logger | PlaceHolder] - loggerClass: type[Logger] | None - logRecordFactory: Callable[..., LogRecord] | None - def __init__(self, rootnode: RootLogger) -> None: ... - def getLogger(self, name: str) -> Logger: ... - def setLoggerClass(self, klass: type[Logger]) -> None: ... - def setLogRecordFactory(self, factory: Callable[..., LogRecord]) -> None: ... - -class Logger(Filterer): - name: str # undocumented - level: int # undocumented - parent: Logger | None # undocumented - propagate: bool - handlers: list[Handler] # undocumented - disabled: bool # undocumented - root: ClassVar[RootLogger] # undocumented - manager: Manager # undocumented - def __init__(self, name: str, level: _Level = 0) -> None: ... - def setLevel(self, level: _Level) -> None: ... - def isEnabledFor(self, level: int) -> bool: ... - def getEffectiveLevel(self) -> int: ... - def getChild(self, suffix: str) -> Self: ... # see python/typing#980 - if sys.version_info >= (3, 12): - def getChildren(self) -> set[Logger]: ... - - def debug( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def info( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def warning( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - @deprecated("Deprecated since Python 3.3. Use `Logger.warning()` instead.") - def warn( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def error( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def exception( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = True, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def critical( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def log( - self, - level: int, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - ) -> None: ... - def _log( - self, - level: int, - msg: object, - args: _ArgsType, - exc_info: _ExcInfoType | None = None, - extra: Mapping[str, object] | None = None, - stack_info: bool = False, - stacklevel: int = 1, - ) -> None: ... # undocumented - fatal = critical - def addHandler(self, hdlr: Handler) -> None: ... - def removeHandler(self, hdlr: Handler) -> None: ... - def findCaller(self, stack_info: bool = False, stacklevel: int = 1) -> tuple[str, int, str, str | None]: ... - def handle(self, record: LogRecord) -> None: ... - def makeRecord( - self, - name: str, - level: int, - fn: str, - lno: int, - msg: object, - args: _ArgsType, - exc_info: _SysExcInfoType | None, - func: str | None = None, - extra: Mapping[str, object] | None = None, - sinfo: str | None = None, - ) -> LogRecord: ... - def hasHandlers(self) -> bool: ... - def callHandlers(self, record: LogRecord) -> None: ... # undocumented - -CRITICAL: Final = 50 -FATAL: Final = CRITICAL -ERROR: Final = 40 -WARNING: Final = 30 -WARN: Final = WARNING -INFO: Final = 20 -DEBUG: Final = 10 -NOTSET: Final = 0 - -class Handler(Filterer): - level: int # undocumented - formatter: Formatter | None # undocumented - lock: threading.Lock | None # undocumented - name: str | None # undocumented - def __init__(self, level: _Level = 0) -> None: ... - def get_name(self) -> str: ... # undocumented - def set_name(self, name: str) -> None: ... # undocumented - def createLock(self) -> None: ... - def acquire(self) -> None: ... - def release(self) -> None: ... - def setLevel(self, level: _Level) -> None: ... - def setFormatter(self, fmt: Formatter | None) -> None: ... - def flush(self) -> None: ... - def close(self) -> None: ... - def handle(self, record: LogRecord) -> bool: ... - def handleError(self, record: LogRecord) -> None: ... - def format(self, record: LogRecord) -> str: ... - def emit(self, record: LogRecord) -> None: ... - -if sys.version_info >= (3, 12): - def getHandlerByName(name: str) -> Handler | None: ... - def getHandlerNames() -> frozenset[str]: ... - -class Formatter: - converter: Callable[[float | None], struct_time] - _fmt: str | None # undocumented - datefmt: str | None # undocumented - _style: PercentStyle # undocumented - default_time_format: str - default_msec_format: str | None - - def __init__( - self, - fmt: str | None = None, - datefmt: str | None = None, - style: _FormatStyle = "%", - validate: bool = True, - *, - defaults: Mapping[str, Any] | None = None, - ) -> None: ... - def format(self, record: LogRecord) -> str: ... - def formatTime(self, record: LogRecord, datefmt: str | None = None) -> str: ... - def formatException(self, ei: _SysExcInfoType) -> str: ... - def formatMessage(self, record: LogRecord) -> str: ... # undocumented - def formatStack(self, stack_info: str) -> str: ... - def usesTime(self) -> bool: ... # undocumented - -class BufferingFormatter: - linefmt: Formatter - def __init__(self, linefmt: Formatter | None = None) -> None: ... - def formatHeader(self, records: Sequence[LogRecord]) -> str: ... - def formatFooter(self, records: Sequence[LogRecord]) -> str: ... - def format(self, records: Sequence[LogRecord]) -> str: ... - -class Filter: - name: str # undocumented - nlen: int # undocumented - def __init__(self, name: str = "") -> None: ... - if sys.version_info >= (3, 12): - def filter(self, record: LogRecord) -> bool | LogRecord: ... - else: - def filter(self, record: LogRecord) -> bool: ... - -class LogRecord: - # args can be set to None by logging.handlers.QueueHandler - # (see https://bugs.python.org/issue44473) - args: _ArgsType | None - asctime: str - created: float - exc_info: _SysExcInfoType | None - exc_text: str | None - filename: str - funcName: str - levelname: str - levelno: int - lineno: int - module: str - msecs: float - # Only created when logging.Formatter.format is called. See #6132. - message: str - msg: str | Any # The runtime accepts any object, but will be a str in 99% of cases - name: str - pathname: str - process: int | None - processName: str | None - relativeCreated: float - stack_info: str | None - thread: int | None - threadName: str | None - if sys.version_info >= (3, 12): - taskName: str | None - - def __init__( - self, - name: str, - level: int, - pathname: str, - lineno: int, - msg: object, - args: _ArgsType | None, - exc_info: _SysExcInfoType | None, - func: str | None = None, - sinfo: str | None = None, - ) -> None: ... - def getMessage(self) -> str: ... - # Allows setting contextual information on LogRecord objects as per the docs, see #7833 - def __setattr__(self, name: str, value: Any, /) -> None: ... - -_L = TypeVar("_L", bound=Logger | LoggerAdapter[Any]) - -class LoggerAdapter(Generic[_L]): - logger: _L - manager: Manager # undocumented - extra: Mapping[str, object] | None - - if sys.version_info >= (3, 13): - def __init__(self, logger: _L, extra: Mapping[str, object] | None = None, merge_extra: bool = False) -> None: ... - else: - def __init__(self, logger: _L, extra: Mapping[str, object] | None = None) -> None: ... - - if sys.version_info >= (3, 13): - merge_extra: bool - - def process(self, msg: Any, kwargs: MutableMapping[str, Any]) -> tuple[Any, MutableMapping[str, Any]]: ... - def debug( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def info( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def warning( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - @deprecated("Deprecated since Python 3.3. Use `LoggerAdapter.warning()` instead.") - def warn( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def error( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def exception( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = True, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def critical( - self, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def log( - self, - level: int, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, - **kwargs: object, - ) -> None: ... - def isEnabledFor(self, level: int) -> bool: ... - def getEffectiveLevel(self) -> int: ... - def setLevel(self, level: _Level) -> None: ... - def hasHandlers(self) -> bool: ... - if sys.version_info >= (3, 11): - def _log( - self, - level: int, - msg: object, - args: _ArgsType, - *, - exc_info: _ExcInfoType | None = None, - extra: Mapping[str, object] | None = None, - stack_info: bool = False, - ) -> None: ... # undocumented - else: - def _log( - self, - level: int, - msg: object, - args: _ArgsType, - exc_info: _ExcInfoType | None = None, - extra: Mapping[str, object] | None = None, - stack_info: bool = False, - ) -> None: ... # undocumented - - @property - def name(self) -> str: ... # undocumented - if sys.version_info >= (3, 11): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def getLogger(name: str | None = None) -> Logger: ... -def getLoggerClass() -> type[Logger]: ... -def getLogRecordFactory() -> Callable[..., LogRecord]: ... -def debug( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def info( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def warning( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -@deprecated("Deprecated since Python 3.3. Use `warning()` instead.") -def warn( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def error( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def critical( - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def exception( - msg: object, - *args: object, - exc_info: _ExcInfoType = True, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... -def log( - level: int, - msg: object, - *args: object, - exc_info: _ExcInfoType = None, - stack_info: bool = False, - stacklevel: int = 1, - extra: Mapping[str, object] | None = None, -) -> None: ... - -fatal = critical - -def disable(level: int = 50) -> None: ... -def addLevelName(level: int, levelName: str) -> None: ... - -@overload -def getLevelName(level: int) -> str: ... -@overload -@deprecated("The str -> int case is considered a mistake.") -def getLevelName(level: str) -> Any: ... - -if sys.version_info >= (3, 11): - def getLevelNamesMapping() -> dict[str, int]: ... - -def makeLogRecord(dict: Mapping[str, object]) -> LogRecord: ... - -@overload # handlers is non-None -def basicConfig( - *, - format: str = ..., # default value depends on the value of `style` - datefmt: str | None = None, - style: _FormatStyle = "%", - level: _Level | None = None, - handlers: Iterable[Handler], - force: bool | None = False, -) -> None: ... -@overload # handlers is None, filename is passed (but possibly None) -def basicConfig( - *, - filename: StrPath | None, - filemode: str = "a", - format: str = ..., # default value depends on the value of `style` - datefmt: str | None = None, - style: _FormatStyle = "%", - level: _Level | None = None, - handlers: None = None, - force: bool | None = False, - encoding: str | None = None, - errors: str | None = "backslashreplace", -) -> None: ... -@overload # handlers is None, filename is not passed -def basicConfig( - *, - format: str = ..., # default value depends on the value of `style` - datefmt: str | None = None, - style: _FormatStyle = "%", - level: _Level | None = None, - stream: SupportsWrite[str] | None = None, - handlers: None = None, - force: bool | None = False, -) -> None: ... - -def shutdown(handlerList: Sequence[Any] = ...) -> None: ... # handlerList is undocumented -def setLoggerClass(klass: type[Logger]) -> None: ... -def captureWarnings(capture: bool) -> None: ... -def setLogRecordFactory(factory: Callable[..., LogRecord]) -> None: ... - -lastResort: Handler | None - -_StreamT = TypeVar("_StreamT", bound=SupportsWrite[str]) - -class StreamHandler(Handler, Generic[_StreamT]): - stream: _StreamT # undocumented - terminator: str - - @overload - def __init__(self: StreamHandler[TextIO], stream: None = None) -> None: ... - @overload - def __init__(self: StreamHandler[_StreamT], stream: _StreamT) -> None: ... # viper: ignore[reportInvalidTypeVarUse] #11780 - - def setStream(self, stream: _StreamT) -> _StreamT | None: ... - if sys.version_info >= (3, 11): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class FileHandler(StreamHandler[TextIOWrapper]): - baseFilename: str # undocumented - mode: str # undocumented - encoding: str | None # undocumented - delay: bool # undocumented - errors: str | None # undocumented - stream: TextIOWrapper | None # type: ignore[assignment] # None when delay=True or after close() - def __init__( - self, filename: StrPath, mode: str = "a", encoding: str | None = None, delay: bool = False, errors: str | None = None - ) -> None: ... - def _open(self) -> TextIOWrapper: ... # undocumented - -class NullHandler(Handler): ... - -class PlaceHolder: # undocumented - loggerMap: dict[Logger, None] - def __init__(self, alogger: Logger) -> None: ... - def append(self, alogger: Logger) -> None: ... - -# Below aren't in module docs but still visible - -class RootLogger(Logger): - def __init__(self, level: int) -> None: ... - -root: RootLogger - -class PercentStyle: # undocumented - default_format: str - asctime_format: str - asctime_search: str - validation_pattern: Pattern[str] - _fmt: str - - def __init__(self, fmt: str, *, defaults: Mapping[str, Any] | None = None) -> None: ... - def usesTime(self) -> bool: ... - def validate(self) -> None: ... - def format(self, record: Any) -> str: ... - -class StrFormatStyle(PercentStyle): # undocumented - fmt_spec: Pattern[str] - field_spec: Pattern[str] - -class StringTemplateStyle(PercentStyle): # undocumented - _tpl: Template - -_STYLES: Final[dict[str, tuple[PercentStyle, str]]] - -BASIC_FORMAT: Final = "%(levelname)s:%(name)s:%(message)s" diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/config.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/logging/config.vpi deleted file mode 100644 index 1c870edc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/config.vpi +++ /dev/null @@ -1,141 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence -from configparser import RawConfigParser -from re import Pattern -from threading import Thread -from typing import IO, Any, Final, Literal, SupportsIndex, TypeAlias, TypedDict, overload, type_check_only -from typing_extensions import Required, disjoint_base - -from . import Filter, Filterer, Formatter, Handler, Logger, _FilterType, _FormatStyle, _Level - -DEFAULT_LOGGING_CONFIG_PORT: Final = 9030 -RESET_ERROR: Final[int] # undocumented -IDENTIFIER: Final[Pattern[str]] # undocumented - -if sys.version_info >= (3, 11): - @type_check_only - class _RootLoggerConfiguration(TypedDict, total=False): - level: _Level - filters: Sequence[str | _FilterType] - handlers: Sequence[str] - -else: - @type_check_only - class _RootLoggerConfiguration(TypedDict, total=False): - level: _Level - filters: Sequence[str] - handlers: Sequence[str] - -@type_check_only -class _LoggerConfiguration(_RootLoggerConfiguration, TypedDict, total=False): - propagate: bool - -_FormatterConfigurationTypedDict = TypedDict( - "_FormatterConfigurationTypedDict", {"class": str, "format": str, "datefmt": str, "style": _FormatStyle}, total=False -) - -@type_check_only -class _FilterConfigurationTypedDict(TypedDict): - name: str - -# Formatter and filter configs can specify custom factories via the special `()` key. -# If that is the case, the dictionary can contain any additional keys -# https://docs.python.org/3/library/logging.config.html#user-defined-objects -_FormatterConfiguration: TypeAlias = _FormatterConfigurationTypedDict | dict[str, Any] -_FilterConfiguration: TypeAlias = _FilterConfigurationTypedDict | dict[str, Any] -# Handler config can have additional keys even when not providing a custom factory so we just use `dict`. -_HandlerConfiguration: TypeAlias = dict[str, Any] - -@type_check_only -class _DictConfigArgs(TypedDict, total=False): - version: Required[Literal[1]] - formatters: dict[str, _FormatterConfiguration] - filters: dict[str, _FilterConfiguration] - handlers: dict[str, _HandlerConfiguration] - loggers: dict[str, _LoggerConfiguration] - root: _RootLoggerConfiguration - incremental: bool - disable_existing_loggers: bool - -# Accept dict[str, Any] to avoid false positives if called with a dict -# type, since dict types are not compatible with TypedDicts. -# -# Also accept a TypedDict type, to allow callers to use TypedDict -# types, and for somewhat stricter type checking of dict literals. -def dictConfig(config: _DictConfigArgs | dict[str, Any]) -> None: ... -def fileConfig( - fname: StrOrBytesPath | IO[str] | RawConfigParser, - defaults: Mapping[str, str] | None = None, - disable_existing_loggers: bool = True, - encoding: str | None = None, -) -> None: ... -def valid_ident(s: str) -> Literal[True]: ... # undocumented -def listen(port: int = 9030, verify: Callable[[bytes], bytes | None] | None = None) -> Thread: ... -def stopListening() -> None: ... - -class ConvertingMixin: # undocumented - def convert_with_key(self, key: Any, value: Any, replace: bool = True) -> Any: ... - def convert(self, value: Any) -> Any: ... - -class ConvertingDict(dict[Hashable, Any], ConvertingMixin): # undocumented - def __getitem__(self, key: Hashable) -> Any: ... - def get(self, key: Hashable, default: Any = None) -> Any: ... - def pop(self, key: Hashable, default: Any = None) -> Any: ... - -class ConvertingList(list[Any], ConvertingMixin): # undocumented - @overload - def __getitem__(self, key: SupportsIndex) -> Any: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None]) -> Any: ... - - def pop(self, idx: SupportsIndex = -1) -> Any: ... - -if sys.version_info >= (3, 12): - class ConvertingTuple(tuple[Any, ...], ConvertingMixin): # undocumented - @overload - def __getitem__(self, key: SupportsIndex) -> Any: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None]) -> Any: ... - -else: - @disjoint_base - class ConvertingTuple(tuple[Any, ...], ConvertingMixin): # undocumented - @overload - def __getitem__(self, key: SupportsIndex) -> Any: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None]) -> Any: ... - -class BaseConfigurator: - CONVERT_PATTERN: Pattern[str] - WORD_PATTERN: Pattern[str] - DOT_PATTERN: Pattern[str] - INDEX_PATTERN: Pattern[str] - DIGIT_PATTERN: Pattern[str] - value_converters: dict[str, str] - importer: Callable[..., Any] - - config: dict[str, Any] # undocumented - - def __init__(self, config: _DictConfigArgs | dict[str, Any]) -> None: ... - def resolve(self, s: str) -> Any: ... - def ext_convert(self, value: str) -> Any: ... - def cfg_convert(self, value: str) -> Any: ... - def convert(self, value: Any) -> Any: ... - def configure_custom(self, config: dict[str, Any]) -> Any: ... - def as_tuple(self, value: list[Any] | tuple[Any, ...]) -> tuple[Any, ...]: ... - -class DictConfigurator(BaseConfigurator): - def configure(self) -> None: ... # undocumented - def configure_formatter(self, config: _FormatterConfiguration) -> Formatter | Any: ... # undocumented - def configure_filter(self, config: _FilterConfiguration) -> Filter | Any: ... # undocumented - def add_filters(self, filterer: Filterer, filters: Iterable[_FilterType]) -> None: ... # undocumented - def configure_handler(self, config: _HandlerConfiguration) -> Handler | Any: ... # undocumented - def add_handlers(self, logger: Logger, handlers: Iterable[str]) -> None: ... # undocumented - def common_logger_config( - self, logger: Logger, config: _LoggerConfiguration, incremental: bool = False - ) -> None: ... # undocumented - def configure_logger(self, name: str, config: _LoggerConfiguration, incremental: bool = False) -> None: ... # undocumented - def configure_root(self, config: _LoggerConfiguration, incremental: bool = False) -> None: ... # undocumented - -dictConfigClass = DictConfigurator diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/handlers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/logging/handlers.vpi deleted file mode 100644 index 535f1c68..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/logging/handlers.vpi +++ /dev/null @@ -1,258 +0,0 @@ -import datetime -import http.client -import ssl -import sys -from _typeshed import ReadableBuffer, StrPath -from collections.abc import Callable -from logging import FileHandler, Handler, LogRecord -from re import Pattern -from socket import SocketKind, socket -from threading import Thread -from types import TracebackType -from typing import Any, ClassVar, Final, Protocol, TypeVar, type_check_only -from typing_extensions import Self - -_T = TypeVar("_T") - -DEFAULT_TCP_LOGGING_PORT: Final = 9020 -DEFAULT_UDP_LOGGING_PORT: Final = 9021 -DEFAULT_HTTP_LOGGING_PORT: Final = 9022 -DEFAULT_SOAP_LOGGING_PORT: Final = 9023 -SYSLOG_UDP_PORT: Final = 514 -SYSLOG_TCP_PORT: Final = 514 - -class WatchedFileHandler(FileHandler): - dev: int # undocumented - ino: int # undocumented - def __init__( - self, filename: StrPath, mode: str = "a", encoding: str | None = None, delay: bool = False, errors: str | None = None - ) -> None: ... - def _statstream(self) -> None: ... # undocumented - def reopenIfNeeded(self) -> None: ... - -class BaseRotatingHandler(FileHandler): - namer: Callable[[str], str] | None - rotator: Callable[[str, str], None] | None - def __init__( - self, filename: StrPath, mode: str, encoding: str | None = None, delay: bool = False, errors: str | None = None - ) -> None: ... - def rotation_filename(self, default_name: str) -> str: ... - def rotate(self, source: str, dest: str) -> None: ... - -class RotatingFileHandler(BaseRotatingHandler): - maxBytes: int # undocumented - backupCount: int # undocumented - def __init__( - self, - filename: StrPath, - mode: str = "a", - maxBytes: int = 0, - backupCount: int = 0, - encoding: str | None = None, - delay: bool = False, - errors: str | None = None, - ) -> None: ... - def doRollover(self) -> None: ... - def shouldRollover(self, record: LogRecord) -> int: ... # undocumented - -class TimedRotatingFileHandler(BaseRotatingHandler): - when: str # undocumented - backupCount: int # undocumented - utc: bool # undocumented - atTime: datetime.time | None # undocumented - interval: int # undocumented - suffix: str # undocumented - dayOfWeek: int # undocumented - rolloverAt: int # undocumented - extMatch: Pattern[str] # undocumented - def __init__( - self, - filename: StrPath, - when: str = "h", - interval: int = 1, - backupCount: int = 0, - encoding: str | None = None, - delay: bool = False, - utc: bool = False, - atTime: datetime.time | None = None, - errors: str | None = None, - ) -> None: ... - def doRollover(self) -> None: ... - def shouldRollover(self, record: LogRecord) -> int: ... # undocumented - def computeRollover(self, currentTime: int) -> int: ... # undocumented - def getFilesToDelete(self) -> list[str]: ... # undocumented - -class SocketHandler(Handler): - host: str # undocumented - port: int | None # undocumented - address: tuple[str, int] | str # undocumented - sock: socket | None # undocumented - closeOnError: bool # undocumented - retryTime: float | None # undocumented - retryStart: float # undocumented - retryFactor: float # undocumented - retryMax: float # undocumented - def __init__(self, host: str, port: int | None) -> None: ... - def makeSocket(self, timeout: float = 1) -> socket: ... # timeout is undocumented - def makePickle(self, record: LogRecord) -> bytes: ... - def send(self, s: ReadableBuffer) -> None: ... - def createSocket(self) -> None: ... - -class DatagramHandler(SocketHandler): - def makeSocket(self) -> socket: ... # type: ignore[override] - -class SysLogHandler(Handler): - LOG_EMERG: int - LOG_ALERT: int - LOG_CRIT: int - LOG_ERR: int - LOG_WARNING: int - LOG_NOTICE: int - LOG_INFO: int - LOG_DEBUG: int - - LOG_KERN: int - LOG_USER: int - LOG_MAIL: int - LOG_DAEMON: int - LOG_AUTH: int - LOG_SYSLOG: int - LOG_LPR: int - LOG_NEWS: int - LOG_UUCP: int - LOG_CRON: int - LOG_AUTHPRIV: int - LOG_FTP: int - LOG_NTP: int - LOG_SECURITY: int - LOG_CONSOLE: int - LOG_SOLCRON: int - LOG_LOCAL0: int - LOG_LOCAL1: int - LOG_LOCAL2: int - LOG_LOCAL3: int - LOG_LOCAL4: int - LOG_LOCAL5: int - LOG_LOCAL6: int - LOG_LOCAL7: int - address: tuple[str, int] | str # undocumented - unixsocket: bool # undocumented - socktype: SocketKind # undocumented - ident: str # undocumented - append_nul: bool # undocumented - facility: int # undocumented - priority_names: ClassVar[dict[str, int]] # undocumented - facility_names: ClassVar[dict[str, int]] # undocumented - priority_map: ClassVar[dict[str, str]] # undocumented - if sys.version_info >= (3, 14): - timeout: float | None - def __init__( - self, - address: tuple[str, int] | str = ("localhost", 514), - facility: str | int = 1, - socktype: SocketKind | None = None, - timeout: float | None = None, - ) -> None: ... - else: - def __init__( - self, address: tuple[str, int] | str = ("localhost", 514), facility: str | int = 1, socktype: SocketKind | None = None - ) -> None: ... - if sys.version_info >= (3, 11): - def createSocket(self) -> None: ... - - def encodePriority(self, facility: int | str, priority: int | str) -> int: ... - def mapPriority(self, levelName: str) -> str: ... - -class NTEventLogHandler(Handler): - def __init__(self, appname: str, dllname: str | None = None, logtype: str = "Application") -> None: ... - def getEventCategory(self, record: LogRecord) -> int: ... - # TODO: correct return value? - def getEventType(self, record: LogRecord) -> int: ... - def getMessageID(self, record: LogRecord) -> int: ... - -class SMTPHandler(Handler): - mailhost: str # undocumented - mailport: int | None # undocumented - username: str | None # undocumented - # password only exists as an attribute if passed credentials is a tuple or list - password: str # undocumented - fromaddr: str # undocumented - toaddrs: list[str] # undocumented - subject: str # undocumented - secure: tuple[()] | tuple[str] | tuple[str, str] | None # undocumented - timeout: float # undocumented - def __init__( - self, - mailhost: str | tuple[str, int], - fromaddr: str, - toaddrs: str | list[str], - subject: str, - credentials: tuple[str, str] | None = None, - secure: tuple[()] | tuple[str] | tuple[str, str] | None = None, - timeout: float = 5.0, - ) -> None: ... - def getSubject(self, record: LogRecord) -> str: ... - -class BufferingHandler(Handler): - capacity: int # undocumented - buffer: list[LogRecord] # undocumented - def __init__(self, capacity: int) -> None: ... - def shouldFlush(self, record: LogRecord) -> bool: ... - -class MemoryHandler(BufferingHandler): - flushLevel: int # undocumented - target: Handler | None # undocumented - flushOnClose: bool # undocumented - def __init__(self, capacity: int, flushLevel: int = 40, target: Handler | None = None, flushOnClose: bool = True) -> None: ... - def setTarget(self, target: Handler | None) -> None: ... - -class HTTPHandler(Handler): - host: str # undocumented - url: str # undocumented - method: str # undocumented - secure: bool # undocumented - credentials: tuple[str, str] | None # undocumented - context: ssl.SSLContext | None # undocumented - def __init__( - self, - host: str, - url: str, - method: str = "GET", - secure: bool = False, - credentials: tuple[str, str] | None = None, - context: ssl.SSLContext | None = None, - ) -> None: ... - def mapLogRecord(self, record: LogRecord) -> dict[str, Any]: ... - def getConnection(self, host: str, secure: bool) -> http.client.HTTPConnection: ... # undocumented - -@type_check_only -class _QueueLike(Protocol[_T]): - def get(self) -> _T: ... - def put_nowait(self, item: _T, /) -> None: ... - -class QueueHandler(Handler): - queue: _QueueLike[Any] - def __init__(self, queue: _QueueLike[Any]) -> None: ... - def prepare(self, record: LogRecord) -> Any: ... - def enqueue(self, record: LogRecord) -> None: ... - if sys.version_info >= (3, 12): - listener: QueueListener | None - -class QueueListener: - handlers: tuple[Handler, ...] # undocumented - respect_handler_level: bool # undocumented - queue: _QueueLike[Any] # undocumented - _thread: Thread | None # undocumented - def __init__(self, queue: _QueueLike[Any], *handlers: Handler, respect_handler_level: bool = False) -> None: ... - def dequeue(self, block: bool) -> LogRecord: ... - def prepare(self, record: LogRecord) -> Any: ... - def start(self) -> None: ... - def stop(self) -> None: ... - def enqueue_sentinel(self) -> None: ... - def handle(self, record: LogRecord) -> None: ... - - if sys.version_info >= (3, 14): - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/lzma.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/lzma.vpi deleted file mode 100644 index 656ecb16..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/lzma.vpi +++ /dev/null @@ -1,181 +0,0 @@ -import sys -from _lzma import ( - CHECK_CRC32 as CHECK_CRC32, - CHECK_CRC64 as CHECK_CRC64, - CHECK_ID_MAX as CHECK_ID_MAX, - CHECK_NONE as CHECK_NONE, - CHECK_SHA256 as CHECK_SHA256, - CHECK_UNKNOWN as CHECK_UNKNOWN, - FILTER_ARM as FILTER_ARM, - FILTER_ARMTHUMB as FILTER_ARMTHUMB, - FILTER_DELTA as FILTER_DELTA, - FILTER_IA64 as FILTER_IA64, - FILTER_LZMA1 as FILTER_LZMA1, - FILTER_LZMA2 as FILTER_LZMA2, - FILTER_POWERPC as FILTER_POWERPC, - FILTER_SPARC as FILTER_SPARC, - FILTER_X86 as FILTER_X86, - FORMAT_ALONE as FORMAT_ALONE, - FORMAT_AUTO as FORMAT_AUTO, - FORMAT_RAW as FORMAT_RAW, - FORMAT_XZ as FORMAT_XZ, - MF_BT2 as MF_BT2, - MF_BT3 as MF_BT3, - MF_BT4 as MF_BT4, - MF_HC3 as MF_HC3, - MF_HC4 as MF_HC4, - MODE_FAST as MODE_FAST, - MODE_NORMAL as MODE_NORMAL, - PRESET_DEFAULT as PRESET_DEFAULT, - PRESET_EXTREME as PRESET_EXTREME, - LZMACompressor as LZMACompressor, - LZMADecompressor as LZMADecompressor, - LZMAError as LZMAError, - _FilterChain, - is_check_supported as is_check_supported, -) -from _typeshed import ReadableBuffer, StrOrBytesPath -from io import TextIOWrapper -from typing import IO, Literal, TypeAlias, overload -from typing_extensions import Self - -if sys.version_info >= (3, 14): - from compression._common._streams import BaseStream -else: - from _compression import BaseStream - -__all__ = [ - "CHECK_NONE", - "CHECK_CRC32", - "CHECK_CRC64", - "CHECK_SHA256", - "CHECK_ID_MAX", - "CHECK_UNKNOWN", - "FILTER_LZMA1", - "FILTER_LZMA2", - "FILTER_DELTA", - "FILTER_X86", - "FILTER_IA64", - "FILTER_ARM", - "FILTER_ARMTHUMB", - "FILTER_POWERPC", - "FILTER_SPARC", - "FORMAT_AUTO", - "FORMAT_XZ", - "FORMAT_ALONE", - "FORMAT_RAW", - "MF_HC3", - "MF_HC4", - "MF_BT2", - "MF_BT3", - "MF_BT4", - "MODE_FAST", - "MODE_NORMAL", - "PRESET_DEFAULT", - "PRESET_EXTREME", - "LZMACompressor", - "LZMADecompressor", - "LZMAFile", - "LZMAError", - "open", - "compress", - "decompress", - "is_check_supported", -] - -_OpenBinaryWritingMode: TypeAlias = Literal["w", "wb", "x", "xb", "a", "ab"] -_OpenTextWritingMode: TypeAlias = Literal["wt", "xt", "at"] - -_PathOrFile: TypeAlias = StrOrBytesPath | IO[bytes] - -class LZMAFile(BaseStream, IO[bytes]): # type: ignore[misc] # incompatible definitions of writelines in the base classes - def __init__( - self, - filename: _PathOrFile | None = None, - mode: str = "r", - *, - format: int | None = None, - check: int = -1, - preset: int | None = None, - filters: _FilterChain | None = None, - ) -> None: ... - def __enter__(self) -> Self: ... - def peek(self, size: int = -1) -> bytes: ... - def read(self, size: int | None = -1) -> bytes: ... - def read1(self, size: int = -1) -> bytes: ... - def readline(self, size: int | None = -1) -> bytes: ... - def write(self, data: ReadableBuffer) -> int: ... - def seek(self, offset: int, whence: int = 0) -> int: ... - -@overload -def open( - filename: _PathOrFile, - mode: Literal["r", "rb"] = "rb", - *, - format: int | None = None, - check: Literal[-1] = -1, - preset: None = None, - filters: _FilterChain | None = None, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> LZMAFile: ... -@overload -def open( - filename: _PathOrFile, - mode: _OpenBinaryWritingMode, - *, - format: int | None = None, - check: int = -1, - preset: int | None = None, - filters: _FilterChain | None = None, - encoding: None = None, - errors: None = None, - newline: None = None, -) -> LZMAFile: ... -@overload -def open( - filename: StrOrBytesPath, - mode: Literal["rt"], - *, - format: int | None = None, - check: Literal[-1] = -1, - preset: None = None, - filters: _FilterChain | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: StrOrBytesPath, - mode: _OpenTextWritingMode, - *, - format: int | None = None, - check: int = -1, - preset: int | None = None, - filters: _FilterChain | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> TextIOWrapper: ... -@overload -def open( - filename: _PathOrFile, - mode: str, - *, - format: int | None = None, - check: int = -1, - preset: int | None = None, - filters: _FilterChain | None = None, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, -) -> LZMAFile | TextIOWrapper: ... - -def compress( - data: ReadableBuffer, format: int = 1, check: int = -1, preset: int | None = None, filters: _FilterChain | None = None -) -> bytes: ... -def decompress( - data: ReadableBuffer, format: int = 0, memlimit: int | None = None, filters: _FilterChain | None = None -) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/mailbox.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/mailbox.vpi deleted file mode 100644 index 961c0f5e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/mailbox.vpi +++ /dev/null @@ -1,301 +0,0 @@ -import email.message -import io -import sys -from _typeshed import StrPath, SupportsItems, SupportsNoArgReadline, SupportsRead, SupportsWrite, Unused -from abc import ABCMeta, abstractmethod -from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence -from types import GenericAlias, TracebackType -from typing import Any, Generic, Literal, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self - -__all__ = [ - "Mailbox", - "Maildir", - "mbox", - "MH", - "Babyl", - "MMDF", - "Message", - "MaildirMessage", - "mboxMessage", - "MHMessage", - "BabylMessage", - "MMDFMessage", - "Error", - "NoSuchMailboxError", - "NotEmptyError", - "ExternalClashError", - "FormatError", -] - -_T = TypeVar("_T") - -@type_check_only -class _SupportsReadAndReadline(SupportsRead[bytes], SupportsNoArgReadline[bytes], Protocol): ... - -# As opposed to _MessageT_co in email._policybase, this type is bound to -# mailbox.Message instead of email.message.Message. -_MessageT_co = TypeVar("_MessageT_co", bound=Message, default=Message, covariant=True) - -_MessageData: TypeAlias = email.message.Message | bytes | str | io.StringIO | _SupportsReadAndReadline - -@type_check_only -class _HasIteritems(Protocol): - def iteritems(self) -> Iterator[tuple[str, _MessageData]]: ... - -linesep: bytes - -# Common interface for get_file() return types. -@type_check_only -class _GetFileReturn(Protocol): - def __iter__(self) -> Iterator[bytes]: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None, / - ) -> bool | None: ... - def read(self, size: int | None = None, /) -> bytes: ... - def read1(self, size: int | None = None, /) -> bytes: ... - def readline(self, size: int | None = None, /) -> bytes: ... - def readlines(self, sizehint: int | None = None, /) -> list[bytes]: ... - def tell(self) -> int: ... - def seek(self, offset: int, whence: int = 0, /) -> object: ... - def close(self) -> object: ... - def readable(self) -> bool: ... - def writable(self) -> bool: ... - def seekable(self) -> bool: ... - def flush(self) -> object: ... - @property - def closed(self) -> bool: ... - -class Mailbox(Generic[_MessageT_co]): - _path: str # undocumented - _factory: Callable[[_GetFileReturn], _MessageT_co] | None # undocumented - - @overload - def __init__(self, path: StrPath, factory: Callable[[_GetFileReturn], _MessageT_co], create: bool = True) -> None: ... - @overload - def __init__(self, path: StrPath, factory: None = None, create: bool = True) -> None: ... - - @abstractmethod - def add(self, message: _MessageData) -> str: ... - @abstractmethod - def remove(self, key: str) -> None: ... - def __delitem__(self, key: str) -> None: ... - def discard(self, key: str) -> None: ... - @abstractmethod - def __setitem__(self, key: str, message: _MessageData) -> None: ... - - @overload - def get(self, key: str, default: None = None) -> _MessageT_co | None: ... - @overload - def get(self, key: str, default: _T) -> _MessageT_co | _T: ... - - def __getitem__(self, key: str) -> _MessageT_co: ... - @abstractmethod - def get_message(self, key: str) -> _MessageT_co: ... - def get_string(self, key: str) -> str: ... - @abstractmethod - def get_bytes(self, key: str) -> bytes: ... - @abstractmethod - def get_file(self, key: str) -> _GetFileReturn: ... - @abstractmethod - def iterkeys(self) -> Iterator[str]: ... - def keys(self) -> list[str]: ... - def itervalues(self) -> Iterator[_MessageT_co]: ... - def __iter__(self) -> Iterator[_MessageT_co]: ... - def values(self) -> list[_MessageT_co]: ... - def iteritems(self) -> Iterator[tuple[str, _MessageT_co]]: ... - def items(self) -> list[tuple[str, _MessageT_co]]: ... - @abstractmethod - def __contains__(self, key: str) -> bool: ... - @abstractmethod - def __len__(self) -> int: ... - def clear(self) -> None: ... - - @overload - def pop(self, key: str, default: None = None) -> _MessageT_co | None: ... - @overload - def pop(self, key: str, default: _T) -> _MessageT_co | _T: ... - - def popitem(self) -> tuple[str, _MessageT_co]: ... - def update( - self, arg: _HasIteritems | SupportsItems[str, _MessageData] | Iterable[tuple[str, _MessageData]] | None = None - ) -> None: ... - @abstractmethod - def flush(self) -> None: ... - @abstractmethod - def lock(self) -> None: ... - @abstractmethod - def unlock(self) -> None: ... - @abstractmethod - def close(self) -> None: ... - # Undocumented, called by subclasses to parse added messages. - def _dump_message(self, message: _MessageData, target: SupportsWrite[bytes], mangle_from_: bool = False) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class Maildir(Mailbox[MaildirMessage]): - colon: str - def __init__( - self, dirname: StrPath, factory: Callable[[_GetFileReturn], MaildirMessage] | None = None, create: bool = True - ) -> None: ... - def add(self, message: _MessageData | MaildirMessage) -> str: ... - def remove(self, key: str) -> None: ... - def __setitem__(self, key: str, message: _MessageData | MaildirMessage) -> None: ... - def get_message(self, key: str) -> MaildirMessage: ... - def get_bytes(self, key: str) -> bytes: ... - def get_file(self, key: str) -> _ProxyFile: ... - if sys.version_info >= (3, 13): - def get_info(self, key: str) -> str: ... - def set_info(self, key: str, info: str) -> None: ... - def get_flags(self, key: str) -> str: ... - def set_flags(self, key: str, flags: str) -> None: ... - def add_flag(self, key: str, flag: str) -> None: ... - def remove_flag(self, key: str, flag: str) -> None: ... - - def iterkeys(self) -> Iterator[str]: ... - def __contains__(self, key: str) -> bool: ... - def __len__(self) -> int: ... - def flush(self) -> None: ... - def lock(self) -> None: ... - def unlock(self) -> None: ... - def close(self) -> None: ... - def list_folders(self) -> list[str]: ... - def get_folder(self, folder: str) -> Maildir: ... - def add_folder(self, folder: str) -> Maildir: ... - def remove_folder(self, folder: str) -> None: ... - def clean(self) -> None: ... - def next(self) -> str | None: ... - -class _singlefileMailbox(Mailbox[_MessageT_co], metaclass=ABCMeta): - def add(self, message: _MessageData) -> str: ... - def remove(self, key: str) -> None: ... - def __setitem__(self, key: str, message: _MessageData) -> None: ... - def iterkeys(self) -> Iterator[str]: ... - def __contains__(self, key: str) -> bool: ... - def __len__(self) -> int: ... - def lock(self) -> None: ... - def unlock(self) -> None: ... - def flush(self) -> None: ... - def close(self) -> None: ... - -class _mboxMMDF(_singlefileMailbox[_MessageT_co]): - def get_message(self, key: str) -> _MessageT_co: ... - def get_file(self, key: str, from_: bool = False) -> _PartialFile: ... - def get_bytes(self, key: str, from_: bool = False) -> bytes: ... - def get_string(self, key: str, from_: bool = False) -> str: ... - -class mbox(_mboxMMDF[mboxMessage]): - def __init__( - self, path: StrPath, factory: Callable[[_GetFileReturn], mboxMessage] | None = None, create: bool = True - ) -> None: ... - -class MMDF(_mboxMMDF[MMDFMessage]): - def __init__( - self, path: StrPath, factory: Callable[[_GetFileReturn], MMDFMessage] | None = None, create: bool = True - ) -> None: ... - -class MH(Mailbox[MHMessage]): - def __init__( - self, path: StrPath, factory: Callable[[_GetFileReturn], MHMessage] | None = None, create: bool = True - ) -> None: ... - def add(self, message: _MessageData) -> str: ... - def remove(self, key: str) -> None: ... - def __setitem__(self, key: str, message: _MessageData) -> None: ... - def get_message(self, key: str) -> MHMessage: ... - def get_bytes(self, key: str) -> bytes: ... - def get_file(self, key: str) -> _ProxyFile: ... - def iterkeys(self) -> Iterator[str]: ... - def __contains__(self, key: str) -> bool: ... - def __len__(self) -> int: ... - def flush(self) -> None: ... - def lock(self) -> None: ... - def unlock(self) -> None: ... - def close(self) -> None: ... - def list_folders(self) -> list[str]: ... - def get_folder(self, folder: StrPath) -> MH: ... - def add_folder(self, folder: StrPath) -> MH: ... - def remove_folder(self, folder: StrPath) -> None: ... - def get_sequences(self) -> dict[str, list[int]]: ... - def set_sequences(self, sequences: Mapping[str, Sequence[int]]) -> None: ... - def pack(self) -> None: ... - -class Babyl(_singlefileMailbox[BabylMessage]): - def __init__( - self, path: StrPath, factory: Callable[[_GetFileReturn], BabylMessage] | None = None, create: bool = True - ) -> None: ... - def get_message(self, key: str) -> BabylMessage: ... - def get_bytes(self, key: str) -> bytes: ... - def get_file(self, key: str) -> io.BytesIO: ... - def get_labels(self) -> list[str]: ... - -class Message(email.message.Message[str, str]): - def __init__(self, message: _MessageData | None = None) -> None: ... - -class MaildirMessage(Message): - def get_subdir(self) -> str: ... - def set_subdir(self, subdir: Literal["new", "cur"]) -> None: ... - def get_flags(self) -> str: ... - def set_flags(self, flags: Iterable[str]) -> None: ... - def add_flag(self, flag: str) -> None: ... - def remove_flag(self, flag: str) -> None: ... - def get_date(self) -> int: ... - def set_date(self, date: float) -> None: ... - def get_info(self) -> str: ... - def set_info(self, info: str) -> None: ... - -class _mboxMMDFMessage(Message): - def get_from(self) -> str: ... - def set_from(self, from_: str, time_: bool | tuple[int, int, int, int, int, int, int, int, int] | None = None) -> None: ... - def get_flags(self) -> str: ... - def set_flags(self, flags: Iterable[str]) -> None: ... - def add_flag(self, flag: str) -> None: ... - def remove_flag(self, flag: str) -> None: ... - -class mboxMessage(_mboxMMDFMessage): ... - -class MHMessage(Message): - def get_sequences(self) -> list[str]: ... - def set_sequences(self, sequences: Iterable[str]) -> None: ... - def add_sequence(self, sequence: str) -> None: ... - def remove_sequence(self, sequence: str) -> None: ... - -class BabylMessage(Message): - def get_labels(self) -> list[str]: ... - def set_labels(self, labels: Iterable[str]) -> None: ... - def add_label(self, label: str) -> None: ... - def remove_label(self, label: str) -> None: ... - def get_visible(self) -> Message: ... - def set_visible(self, visible: _MessageData) -> None: ... - def update_visible(self) -> None: ... - -class MMDFMessage(_mboxMMDFMessage): ... - -# Until Python 3.14, this class was technically - but unnecessarily - generic at runtime. -class _ProxyFile: - def __init__(self, f: _GetFileReturn, pos: int | None = None) -> None: ... - def read(self, size: int | None = None) -> bytes: ... - def read1(self, size: int | None = None) -> bytes: ... - def readline(self, size: int | None = None) -> bytes: ... - def readlines(self, sizehint: int | None = None) -> list[bytes]: ... - def __iter__(self) -> Iterator[bytes]: ... - def tell(self) -> int: ... - def seek(self, offset: int, whence: int = 0) -> None: ... - def close(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *exc: Unused) -> None: ... - def readable(self) -> bool: ... - def writable(self) -> bool: ... - def seekable(self) -> bool: ... - def flush(self) -> None: ... - @property - def closed(self) -> bool: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class _PartialFile(_ProxyFile): - def __init__(self, f: _GetFileReturn, start: int | None = None, stop: int | None = None) -> None: ... - -class Error(Exception): ... -class NoSuchMailboxError(Error): ... -class NotEmptyError(Error): ... -class ExternalClashError(Error): ... -class FormatError(Error): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/mailcap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/mailcap.vpi deleted file mode 100644 index 74c32694..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/mailcap.vpi +++ /dev/null @@ -1,11 +0,0 @@ -from collections.abc import Mapping, Sequence -from typing import TypeAlias - -_Cap: TypeAlias = dict[str, str | int] - -__all__ = ["getcaps", "findmatch"] - -def findmatch( - caps: Mapping[str, list[_Cap]], MIMEtype: str, key: str = "view", filename: str = "/dev/null", plist: Sequence[str] = [] -) -> tuple[str | None, _Cap | None]: ... -def getcaps() -> dict[str, list[_Cap]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/marshal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/marshal.vpi deleted file mode 100644 index d72abe77..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/marshal.vpi +++ /dev/null @@ -1,52 +0,0 @@ -import builtins -import sys -import types -from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite -from typing import Any, Final, TypeAlias - -version: Final[int] - -_Marshallable: TypeAlias = ( - # handled in w_object() in marshal.c - None - | type[StopIteration] - | builtins.ellipsis - | bool - # handled in w_complex_object() in marshal.c - | int - | float - | complex - | bytes - | str - | tuple[_Marshallable, ...] - | list[Any] - | dict[Any, Any] - | set[Any] - | frozenset[_Marshallable] - | types.CodeType - | ReadableBuffer -) - -if sys.version_info >= (3, 15): - def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 6, /, *, allow_code: bool = True) -> None: ... - def dumps(value: _Marshallable, version: int = 6, /, *, allow_code: bool = True) -> bytes: ... - -elif sys.version_info >= (3, 14): - def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 5, /, *, allow_code: bool = True) -> None: ... - def dumps(value: _Marshallable, version: int = 5, /, *, allow_code: bool = True) -> bytes: ... - -elif sys.version_info >= (3, 13): - def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /, *, allow_code: bool = True) -> None: ... - def dumps(value: _Marshallable, version: int = 4, /, *, allow_code: bool = True) -> bytes: ... - -else: - def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /) -> None: ... - def dumps(value: _Marshallable, version: int = 4, /) -> bytes: ... - -if sys.version_info >= (3, 13): - def load(file: SupportsRead[bytes], /, *, allow_code: bool = True) -> Any: ... - def loads(bytes: ReadableBuffer, /, *, allow_code: bool = True) -> Any: ... - -else: - def load(file: SupportsRead[bytes], /) -> Any: ... - def loads(bytes: ReadableBuffer, /) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/math/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/math/__init__.vpi deleted file mode 100644 index 4839bf7e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/math/__init__.vpi +++ /dev/null @@ -1,157 +0,0 @@ -import sys -from _typeshed import SupportsMul, SupportsRMul -from collections.abc import Iterable -from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, TypeAlias, TypeVar, overload, type_check_only - -_T = TypeVar("_T") -_T_co = TypeVar("_T_co", covariant=True) - -_SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex - -e: Final[float] -pi: Final[float] -inf: Final[float] -nan: Final[float] -tau: Final[float] - -def acos(x: _SupportsFloatOrIndex, /) -> float: ... -def acosh(x: _SupportsFloatOrIndex, /) -> float: ... -def asin(x: _SupportsFloatOrIndex, /) -> float: ... -def asinh(x: _SupportsFloatOrIndex, /) -> float: ... -def atan(x: _SupportsFloatOrIndex, /) -> float: ... -def atan2(y: _SupportsFloatOrIndex, x: _SupportsFloatOrIndex, /) -> float: ... -def atanh(x: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 11): - def cbrt(x: _SupportsFloatOrIndex, /) -> float: ... - -@type_check_only -class _SupportsCeil(Protocol[_T_co]): - def __ceil__(self) -> _T_co: ... - -@overload -def ceil(x: _SupportsCeil[_T], /) -> _T: ... -@overload -def ceil(x: _SupportsFloatOrIndex, /) -> int: ... - -def comb(n: SupportsIndex, k: SupportsIndex, /) -> int: ... -def copysign(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... -def cos(x: _SupportsFloatOrIndex, /) -> float: ... -def cosh(x: _SupportsFloatOrIndex, /) -> float: ... -def degrees(x: _SupportsFloatOrIndex, /) -> float: ... -def dist(p: Iterable[_SupportsFloatOrIndex], q: Iterable[_SupportsFloatOrIndex], /) -> float: ... -def erf(x: _SupportsFloatOrIndex, /) -> float: ... -def erfc(x: _SupportsFloatOrIndex, /) -> float: ... -def exp(x: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 11): - def exp2(x: _SupportsFloatOrIndex, /) -> float: ... - -def expm1(x: _SupportsFloatOrIndex, /) -> float: ... -def fabs(x: _SupportsFloatOrIndex, /) -> float: ... -def factorial(x: SupportsIndex, /) -> int: ... - -@type_check_only -class _SupportsFloor(Protocol[_T_co]): - def __floor__(self) -> _T_co: ... - -@overload -def floor(x: _SupportsFloor[_T], /) -> _T: ... -@overload -def floor(x: _SupportsFloatOrIndex, /) -> int: ... - -def fmod(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 15): - def fmax(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... - def fmin(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... - -def frexp(x: _SupportsFloatOrIndex, /) -> tuple[float, int]: ... -def fsum(seq: Iterable[_SupportsFloatOrIndex], /) -> float: ... -def gamma(x: _SupportsFloatOrIndex, /) -> float: ... -def gcd(*integers: SupportsIndex) -> int: ... -def hypot(*coordinates: _SupportsFloatOrIndex) -> float: ... -def isclose( - a: _SupportsFloatOrIndex, - b: _SupportsFloatOrIndex, - *, - rel_tol: _SupportsFloatOrIndex = 1e-09, - abs_tol: _SupportsFloatOrIndex = 0.0, -) -> bool: ... -def isinf(x: _SupportsFloatOrIndex, /) -> bool: ... -def isfinite(x: _SupportsFloatOrIndex, /) -> bool: ... -def isnan(x: _SupportsFloatOrIndex, /) -> bool: ... - -if sys.version_info >= (3, 15): - def isnormal(x: _SupportsFloatOrIndex, /) -> bool: ... - def issubnormal(x: _SupportsFloatOrIndex, /) -> bool: ... - -def isqrt(n: SupportsIndex, /) -> int: ... -def lcm(*integers: SupportsIndex) -> int: ... -def ldexp(x: _SupportsFloatOrIndex, i: int, /) -> float: ... -def lgamma(x: _SupportsFloatOrIndex, /) -> float: ... -def log(x: _SupportsFloatOrIndex, base: _SupportsFloatOrIndex = ...) -> float: ... -def log10(x: _SupportsFloatOrIndex, /) -> float: ... -def log1p(x: _SupportsFloatOrIndex, /) -> float: ... -def log2(x: _SupportsFloatOrIndex, /) -> float: ... -def modf(x: _SupportsFloatOrIndex, /) -> tuple[float, float]: ... - -if sys.version_info >= (3, 12): - def nextafter(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /, *, steps: SupportsIndex | None = None) -> float: ... - -else: - def nextafter(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... - -def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int: ... -def pow(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... - -_PositiveInteger: TypeAlias = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25] -_NegativeInteger: TypeAlias = Literal[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20] -_LiteralInteger = _PositiveInteger | _NegativeInteger | Literal[0] # noqa: Y026 # TODO: Use TypeAlias once mypy bugs are fixed - -_MultiplicableT1 = TypeVar("_MultiplicableT1", bound=SupportsMul[Any, Any]) -_MultiplicableT2 = TypeVar("_MultiplicableT2", bound=SupportsMul[Any, Any]) - -@type_check_only -class _SupportsProdWithNoDefaultGiven(SupportsMul[Any, Any], SupportsRMul[int, Any], Protocol): ... - -_SupportsProdNoDefaultT = TypeVar("_SupportsProdNoDefaultT", bound=_SupportsProdWithNoDefaultGiven) - -# This stub is based on the type stub for `builtins.sum`. -# Like `builtins.sum`, it cannot be precisely represented in a type stub -# without introducing many false positives. -# For more details on its limitations and false positives, see #13572. -# Instead, just like `builtins.sum`, we explicitly handle several useful cases. -@overload -def prod(iterable: Iterable[bool | _LiteralInteger], /, *, start: int = 1) -> int: ... # type: ignore[overload-overlap] -@overload -def prod(iterable: Iterable[_SupportsProdNoDefaultT], /) -> _SupportsProdNoDefaultT | Literal[1]: ... -@overload -def prod(iterable: Iterable[_MultiplicableT1], /, *, start: _MultiplicableT2) -> _MultiplicableT1 | _MultiplicableT2: ... - -def radians(x: _SupportsFloatOrIndex, /) -> float: ... -def remainder(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, /) -> float: ... -def sin(x: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 15): - def signbit(x: _SupportsFloatOrIndex, /) -> bool: ... - -def sinh(x: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 12): - def sumprod(p: Iterable[float], q: Iterable[float], /) -> float: ... - -def sqrt(x: _SupportsFloatOrIndex, /) -> float: ... -def tan(x: _SupportsFloatOrIndex, /) -> float: ... -def tanh(x: _SupportsFloatOrIndex, /) -> float: ... - -# Is different from `_typeshed.SupportsTrunc`, which is not generic -@type_check_only -class _SupportsTrunc(Protocol[_T_co]): - def __trunc__(self) -> _T_co: ... - -def trunc(x: _SupportsTrunc[_T], /) -> _T: ... -def ulp(x: _SupportsFloatOrIndex, /) -> float: ... - -if sys.version_info >= (3, 13): - def fma(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, z: _SupportsFloatOrIndex, /) -> float: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/math/integer.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/math/integer.vpi deleted file mode 100644 index 6d6d6b3e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/math/integer.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import SupportsIndex - -def comb(n: SupportsIndex, k: SupportsIndex, /) -> int: ... -def factorial(n: SupportsIndex, /) -> int: ... -def gcd(*integers: SupportsIndex) -> int: ... -def isqrt(n: SupportsIndex, /) -> int: ... -def lcm(*integers: SupportsIndex) -> int: ... -def perm(n: SupportsIndex, k: SupportsIndex | None = None, /) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/mimetypes.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/mimetypes.vpi deleted file mode 100644 index 2390b2ce..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/mimetypes.vpi +++ /dev/null @@ -1,56 +0,0 @@ -import sys -from _typeshed import StrPath -from collections.abc import Iterable -from typing import IO - -__all__ = [ - "knownfiles", - "inited", - "MimeTypes", - "guess_type", - "guess_all_extensions", - "guess_extension", - "add_type", - "init", - "read_mime_types", - "suffix_map", - "encodings_map", - "types_map", - "common_types", -] - -if sys.version_info >= (3, 13): - __all__ += ["guess_file_type"] - -def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ... -def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ... -def guess_extension(type: str, strict: bool = True) -> str | None: ... -def init(files: Iterable[StrPath] | None = None) -> None: ... -def read_mime_types(file: StrPath) -> dict[str, str] | None: ... -def add_type(type: str, ext: str, strict: bool = True) -> None: ... - -if sys.version_info >= (3, 13): - def guess_file_type(path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ... - -inited: bool -knownfiles: list[StrPath] -suffix_map: dict[str, str] -encodings_map: dict[str, str] -types_map: dict[str, str] -common_types: dict[str, str] - -class MimeTypes: - suffix_map: dict[str, str] - encodings_map: dict[str, str] - types_map: tuple[dict[str, str], dict[str, str]] - types_map_inv: tuple[dict[str, str], dict[str, str]] - def __init__(self, filenames: Iterable[StrPath] = (), strict: bool = True) -> None: ... - def add_type(self, type: str, ext: str, strict: bool = True) -> None: ... - def guess_extension(self, type: str, strict: bool = True) -> str | None: ... - def guess_type(self, url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ... - def guess_all_extensions(self, type: str, strict: bool = True) -> list[str]: ... - def read(self, filename: StrPath, strict: bool = True) -> None: ... - def readfp(self, fp: IO[str], strict: bool = True) -> None: ... - def read_windows_registry(self, strict: bool = True) -> None: ... - if sys.version_info >= (3, 13): - def guess_file_type(self, path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/mmap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/mmap.vpi deleted file mode 100644 index 587b91d8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/mmap.vpi +++ /dev/null @@ -1,187 +0,0 @@ -import os -import sys -from _typeshed import ReadableBuffer, Unused -from collections.abc import Iterator -from typing import Final, Literal, NoReturn, SupportsIndex, overload -from typing_extensions import Self, disjoint_base - -ACCESS_DEFAULT: Final = 0 -ACCESS_READ: Final = 1 -ACCESS_WRITE: Final = 2 -ACCESS_COPY: Final = 3 - -ALLOCATIONGRANULARITY: Final[int] - -if sys.platform == "linux": - MAP_DENYWRITE: Final[int] - MAP_EXECUTABLE: Final[int] - MAP_POPULATE: Final[int] -if sys.version_info >= (3, 11) and sys.platform != "win32" and sys.platform != "darwin": - MAP_STACK: Final[int] - -if sys.platform != "win32": - MAP_ANON: Final[int] - MAP_ANONYMOUS: Final[int] - MAP_PRIVATE: Final[int] - MAP_SHARED: Final[int] - PROT_EXEC: Final[int] - PROT_READ: Final[int] - PROT_WRITE: Final[int] - if sys.version_info >= (3, 15): - MS_ASYNC: Final[int] - MS_INVALIDATE: Final[int] - MS_SYNC: Final[int] - -PAGESIZE: Final[int] - -@disjoint_base -class mmap: - if sys.platform == "win32": - if sys.version_info >= (3, 15): - def __new__( - cls, - fileno: int, - length: int, - tagname: str | None = None, - access: int = 0, - offset: int = 0, - *, - trackfd: bool = True, - ) -> Self: ... - else: - def __new__(cls, fileno: int, length: int, tagname: str | None = None, access: int = 0, offset: int = 0) -> Self: ... - else: - if sys.version_info >= (3, 13): - def __new__( - cls, - fileno: int, - length: int, - flags: int = ..., - prot: int = ..., - access: int = 0, - offset: int = 0, - *, - trackfd: bool = True, - ) -> Self: ... - else: - def __new__( - cls, fileno: int, length: int, flags: int = ..., prot: int = ..., access: int = 0, offset: int = 0 - ) -> Self: ... - - def close(self) -> None: ... - if sys.version_info >= (3, 15): - def flush(self, offset: int = 0, size: int = ..., /, *, flags: int = 0) -> None: ... - else: - def flush(self, offset: int = 0, size: int = ..., /) -> None: ... - - def move(self, dest: int, src: int, count: int, /) -> None: ... - def read_byte(self) -> int: ... - def readline(self) -> bytes: ... - if sys.version_info < (3, 15) or sys.platform != "darwin": - def resize(self, newsize: int, /) -> None: ... - if sys.platform != "win32": - def seek(self, pos: int, whence: Literal[0, 1, 2, 3, 4] = os.SEEK_SET, /) -> None: ... - else: - def seek(self, pos: int, whence: Literal[0, 1, 2] = os.SEEK_SET, /) -> None: ... - - def size(self) -> int: ... - def tell(self) -> int: ... - def write_byte(self, byte: int, /) -> None: ... - def __len__(self) -> int: ... - closed: bool - if sys.platform != "win32": - if sys.version_info >= (3, 15): - def madvise(self, option: int, start: int = 0, length: int | None = None, /) -> None: ... - else: - def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ... - - if sys.version_info >= (3, 15): - def find(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ... - def rfind(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ... - - else: - def find(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... - def rfind(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ... - - def read(self, n: int | None = None, /) -> bytes: ... - def write(self, bytes: ReadableBuffer, /) -> int: ... - if sys.version_info >= (3, 15): - def set_name(self, name: str, /) -> None: ... - - @overload - def __getitem__(self, key: SupportsIndex, /) -> int: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None], /) -> bytes: ... - - def __delitem__(self, key: SupportsIndex | slice[SupportsIndex | None], /) -> NoReturn: ... - - @overload - def __setitem__(self, key: SupportsIndex, value: int, /) -> None: ... - @overload - def __setitem__(self, key: slice[SupportsIndex | None], value: ReadableBuffer, /) -> None: ... - - # Doesn't actually exist, but the object actually supports "in" because it has __getitem__, - # so we claim that there is also a __contains__ to help type checkers. - def __contains__(self, o: object, /) -> bool: ... - # Doesn't actually exist, but the object is actually iterable because it has __getitem__ and __len__, - # so we claim that there is also an __iter__ to help type checkers. - def __iter__(self) -> Iterator[int]: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc_type: Unused, exc_value: Unused, traceback: Unused, /) -> None: ... - def __buffer__(self, flags: int, /) -> memoryview: ... - def __release_buffer__(self, buffer: memoryview, /) -> None: ... - if sys.version_info >= (3, 13): - def seekable(self) -> Literal[True]: ... - -if sys.platform != "win32": - MADV_NORMAL: Final[int] - MADV_RANDOM: Final[int] - MADV_SEQUENTIAL: Final[int] - MADV_WILLNEED: Final[int] - MADV_DONTNEED: Final[int] - MADV_FREE: Final[int] - -if sys.platform == "linux": - MADV_REMOVE: Final[int] - MADV_DONTFORK: Final[int] - MADV_DOFORK: Final[int] - MADV_HWPOISON: Final[int] - MADV_MERGEABLE: Final[int] - MADV_UNMERGEABLE: Final[int] - # Seems like this constant is not defined in glibc. - # See https://github.com/python/typeshed/pull/5360 for details - # MADV_SOFT_OFFLINE: Final[int] - MADV_HUGEPAGE: Final[int] - MADV_NOHUGEPAGE: Final[int] - MADV_DONTDUMP: Final[int] - MADV_DODUMP: Final[int] - -# This Values are defined for FreeBSD but type checkers do not support conditions for these -if sys.platform != "linux" and sys.platform != "darwin" and sys.platform != "win32": - MADV_NOSYNC: Final[int] - MADV_AUTOSYNC: Final[int] - MADV_NOCORE: Final[int] - MADV_CORE: Final[int] - MADV_PROTECT: Final[int] - -if sys.platform == "darwin": - MADV_FREE_REUSABLE: Final[int] - MADV_FREE_REUSE: Final[int] - -if sys.version_info >= (3, 13) and sys.platform != "win32": - MAP_32BIT: Final[int] - -if sys.version_info >= (3, 13) and sys.platform == "darwin": - MAP_NORESERVE: Final = 64 - MAP_NOEXTEND: Final = 256 - MAP_HASSEMAPHORE: Final = 512 - MAP_NOCACHE: Final = 1024 - MAP_JIT: Final = 2048 - MAP_RESILIENT_CODESIGN: Final = 8192 - MAP_RESILIENT_MEDIA: Final = 16384 - MAP_TRANSLATED_ALLOW_EXECUTE: Final = 131072 - MAP_UNIX03: Final = 262144 - MAP_TPRO: Final = 524288 - -if sys.version_info >= (3, 13) and sys.platform == "linux": - MAP_NORESERVE: Final = 16384 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/modulefinder.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/modulefinder.vpi deleted file mode 100644 index 6db665a1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/modulefinder.vpi +++ /dev/null @@ -1,68 +0,0 @@ -import sys -from collections.abc import Container, Iterable, Iterator, Sequence -from types import CodeType -from typing import IO, Any, Final - -if sys.version_info < (3, 11): - LOAD_CONST: Final[int] # undocumented - IMPORT_NAME: Final[int] # undocumented - STORE_NAME: Final[int] # undocumented - STORE_GLOBAL: Final[int] # undocumented - STORE_OPS: Final[tuple[int, int]] # undocumented - EXTENDED_ARG: Final[int] # undocumented - -packagePathMap: dict[str, list[str]] # undocumented - -def AddPackagePath(packagename: str, path: str) -> None: ... - -replacePackageMap: dict[str, str] # undocumented - -def ReplacePackage(oldname: str, newname: str) -> None: ... - -class Module: # undocumented - def __init__(self, name: str, file: str | None = None, path: str | None = None) -> None: ... - -class ModuleFinder: - modules: dict[str, Module] - path: list[str] # undocumented - badmodules: dict[str, dict[str, int]] # undocumented - debug: int # undocumented - indent: int # undocumented - excludes: Container[str] # undocumented - replace_paths: Sequence[tuple[str, str]] # undocumented - - def __init__( - self, - path: list[str] | None = None, - debug: int = 0, - excludes: Container[str] | None = None, - replace_paths: Sequence[tuple[str, str]] | None = None, - ) -> None: ... - def msg(self, level: int, str: str, *args: Any) -> None: ... # undocumented - def msgin(self, *args: Any) -> None: ... # undocumented - def msgout(self, *args: Any) -> None: ... # undocumented - def run_script(self, pathname: str) -> None: ... - def load_file(self, pathname: str) -> None: ... # undocumented - def import_hook( - self, name: str, caller: Module | None = None, fromlist: list[str] | None = None, level: int = -1 - ) -> Module | None: ... # undocumented - def determine_parent(self, caller: Module | None, level: int = -1) -> Module | None: ... # undocumented - def find_head_package(self, parent: Module, name: str) -> tuple[Module, str]: ... # undocumented - def load_tail(self, q: Module, tail: str) -> Module: ... # undocumented - def ensure_fromlist(self, m: Module, fromlist: Iterable[str], recursive: int = 0) -> None: ... # undocumented - def find_all_submodules(self, m: Module) -> Iterable[str]: ... # undocumented - def import_module(self, partname: str, fqname: str, parent: Module) -> Module | None: ... # undocumented - def load_module(self, fqname: str, fp: IO[str], pathname: str, file_info: tuple[str, str, str]) -> Module: ... # undocumented - def scan_opcodes(self, co: CodeType) -> Iterator[tuple[str, tuple[Any, ...]]]: ... # undocumented - def scan_code(self, co: CodeType, m: Module) -> None: ... # undocumented - def load_package(self, fqname: str, pathname: str) -> Module: ... # undocumented - def add_module(self, fqname: str) -> Module: ... # undocumented - def find_module( - self, name: str, path: str | None, parent: Module | None = None - ) -> tuple[IO[Any] | None, str | None, tuple[str, str, int]]: ... # undocumented - def report(self) -> None: ... - def any_missing(self) -> list[str]: ... # undocumented - def any_missing_maybe(self) -> tuple[list[str], list[str]]: ... # undocumented - def replace_paths_in_code(self, co: CodeType) -> CodeType: ... # undocumented - -def test() -> ModuleFinder | None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/__init__.vpi deleted file mode 100644 index 565a52d5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/__init__.vpi +++ /dev/null @@ -1,177 +0,0 @@ -import sys -from _typeshed import MaybeNone -from collections.abc import Container, Iterable -from types import ModuleType -from typing import Any, Final - -if sys.platform == "win32": - from _msi import * - from _msi import _Database - - from .sequence import _SequenceType - - AMD64: Final[bool] - Win64: Final[bool] - - datasizemask: Final = 0x00FF - type_valid: Final = 0x0100 - type_localizable: Final = 0x0200 - typemask: Final = 0x0C00 - type_long: Final = 0x0000 - type_short: Final = 0x0400 - type_string: Final = 0x0C00 - type_binary: Final = 0x0800 - type_nullable: Final = 0x1000 - type_key: Final = 0x2000 - knownbits: Final = 0x3FFF - - class Table: - name: str - fields: list[tuple[int, str, int]] - def __init__(self, name: str) -> None: ... - def add_field(self, index: int, name: str, type: int) -> None: ... - def sql(self) -> str: ... - def create(self, db: _Database) -> None: ... - - class _Unspecified: ... - - def change_sequence( - seq: _SequenceType, action: str, seqno: int | type[_Unspecified] = ..., cond: str | type[_Unspecified] = ... - ) -> None: ... - def add_data(db: _Database, table: str, values: Iterable[tuple[Any, ...]]) -> None: ... - def add_stream(db: _Database, name: str, path: str) -> None: ... - def init_database( - name: str, schema: ModuleType, ProductName: str, ProductCode: str, ProductVersion: str, Manufacturer: str - ) -> _Database: ... - def add_tables(db: _Database, module: ModuleType) -> None: ... - def make_id(str: str) -> str: ... - def gen_uuid() -> str: ... - - class CAB: - name: str - files: list[tuple[str, str]] - filenames: set[str] - index: int - def __init__(self, name: str) -> None: ... - def gen_id(self, file: str) -> str: ... - def append(self, full: str, file: str, logical: str | None) -> tuple[int, str] | MaybeNone: ... - def commit(self, db: _Database) -> None: ... - - _directories: set[str] - - class Directory: - db: _Database - cab: CAB - basedir: Directory | None - physical: str - logical: str - component: str | None - short_names: set[str] - ids: set[str] - keyfiles: dict[str, str] - componentflags: int | None - absolute: str - def __init__( - self, - db: _Database, - cab: CAB, - basedir: Directory | None, - physical: str, - _logical: str, - default: str, - componentflags: int | None = None, - ) -> None: ... - def start_component( - self, - component: str | None = None, - feature: Feature | None = None, - flags: int | None = None, - keyfile: str | None = None, - uuid: str | None = None, - ) -> None: ... - def make_short(self, file: str) -> str: ... - def add_file(self, file: str, src: str | None = None, version: str | None = None, language: str | None = None) -> str: ... - def glob(self, pattern: str, exclude: Container[str] | None = None) -> list[str]: ... - def remove_pyc(self) -> None: ... - - class Binary: - name: str - def __init__(self, fname: str) -> None: ... - - class Feature: - id: str - def __init__( - self, - db: _Database, - id: str, - title: str, - desc: str, - display: int, - level: int = 1, - parent: Feature | None = None, - directory: str | None = None, - attributes: int = 0, - ) -> None: ... - def set_current(self) -> None: ... - - class Control: - dlg: Dialog - name: str - def __init__(self, dlg: Dialog, name: str) -> None: ... - def event(self, event: str, argument: str, condition: str = "1", ordering: int | None = None) -> None: ... - def mapping(self, event: str, attribute: str) -> None: ... - def condition(self, action: str, condition: str) -> None: ... - - class RadioButtonGroup(Control): - property: str - index: int - def __init__(self, dlg: Dialog, name: str, property: str) -> None: ... - def add(self, name: str, x: int, y: int, w: int, h: int, text: str, value: str | None = None) -> None: ... - - class Dialog: - db: _Database - name: str - x: int - y: int - w: int - h: int - def __init__( - self, - db: _Database, - name: str, - x: int, - y: int, - w: int, - h: int, - attr: int, - title: str, - first: str, - default: str | None, - cancel: str | None, - ) -> None: ... - def control( - self, - name: str, - type: str, - x: int, - y: int, - w: int, - h: int, - attr: int, - prop: str | None, - text: str | None, - next: str | None, - help: str | None, - ) -> Control: ... - def text(self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None) -> Control: ... - def bitmap(self, name: str, x: int, y: int, w: int, h: int, text: str | None) -> Control: ... - def line(self, name: str, x: int, y: int, w: int, h: int) -> Control: ... - def pushbutton( - self, name: str, x: int, y: int, w: int, h: int, attr: int, text: str | None, next: str | None - ) -> Control: ... - def radiogroup( - self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None - ) -> RadioButtonGroup: ... - def checkbox( - self, name: str, x: int, y: int, w: int, h: int, attr: int, prop: str | None, text: str | None, next: str | None - ) -> Control: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/schema.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/schema.vpi deleted file mode 100644 index 3bbdc41a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/schema.vpi +++ /dev/null @@ -1,95 +0,0 @@ -import sys -from typing import Final - -if sys.platform == "win32": - from . import Table - - _Validation: Table - ActionText: Table - AdminExecuteSequence: Table - Condition: Table - AdminUISequence: Table - AdvtExecuteSequence: Table - AdvtUISequence: Table - AppId: Table - AppSearch: Table - Property: Table - BBControl: Table - Billboard: Table - Feature: Table - Binary: Table - BindImage: Table - File: Table - CCPSearch: Table - CheckBox: Table - Class: Table - Component: Table - Icon: Table - ProgId: Table - ComboBox: Table - CompLocator: Table - Complus: Table - Directory: Table - Control: Table - Dialog: Table - ControlCondition: Table - ControlEvent: Table - CreateFolder: Table - CustomAction: Table - DrLocator: Table - DuplicateFile: Table - Environment: Table - Error: Table - EventMapping: Table - Extension: Table - MIME: Table - FeatureComponents: Table - FileSFPCatalog: Table - SFPCatalog: Table - Font: Table - IniFile: Table - IniLocator: Table - InstallExecuteSequence: Table - InstallUISequence: Table - IsolatedComponent: Table - LaunchCondition: Table - ListBox: Table - ListView: Table - LockPermissions: Table - Media: Table - MoveFile: Table - MsiAssembly: Table - MsiAssemblyName: Table - MsiDigitalCertificate: Table - MsiDigitalSignature: Table - MsiFileHash: Table - MsiPatchHeaders: Table - ODBCAttribute: Table - ODBCDriver: Table - ODBCDataSource: Table - ODBCSourceAttribute: Table - ODBCTranslator: Table - Patch: Table - PatchPackage: Table - PublishComponent: Table - RadioButton: Table - Registry: Table - RegLocator: Table - RemoveFile: Table - RemoveIniFile: Table - RemoveRegistry: Table - ReserveCost: Table - SelfReg: Table - ServiceControl: Table - ServiceInstall: Table - Shortcut: Table - Signature: Table - TextStyle: Table - TypeLib: Table - UIText: Table - Upgrade: Table - Verb: Table - - tables: Final[list[Table]] - - _Validation_records: list[tuple[str, str, str, int | None, int | None, str | None, int | None, str | None, str | None, str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/sequence.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/sequence.vpi deleted file mode 100644 index 9b01c416..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/sequence.vpi +++ /dev/null @@ -1,13 +0,0 @@ -import sys -from typing import Final, TypeAlias - -if sys.platform == "win32": - _SequenceType: TypeAlias = list[tuple[str, str | None, int]] - - AdminExecuteSequence: Final[_SequenceType] - AdminUISequence: Final[_SequenceType] - AdvtExecuteSequence: Final[_SequenceType] - InstallExecuteSequence: Final[_SequenceType] - InstallUISequence: Final[_SequenceType] - - tables: Final[list[str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/text.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/text.vpi deleted file mode 100644 index da3c5fd0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/msilib/text.vpi +++ /dev/null @@ -1,8 +0,0 @@ -import sys -from typing import Final - -if sys.platform == "win32": - ActionText: Final[list[tuple[str, str, str | None]]] - UIText: Final[list[tuple[str, str | None]]] - dirname: str - tables: Final[list[str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/msvcrt.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/msvcrt.vpi deleted file mode 100644 index 1518f797..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/msvcrt.vpi +++ /dev/null @@ -1,31 +0,0 @@ -import sys -from typing import Final - -# This module is only available on Windows -if sys.platform == "win32": - CRT_ASSEMBLY_VERSION: Final[str] - LK_UNLCK: Final = 0 - LK_LOCK: Final = 1 - LK_NBLCK: Final = 2 - LK_RLCK: Final = 3 - LK_NBRLCK: Final = 4 - SEM_FAILCRITICALERRORS: Final = 0x0001 - SEM_NOALIGNMENTFAULTEXCEPT: Final = 0x0004 - SEM_NOGPFAULTERRORBOX: Final = 0x0002 - SEM_NOOPENFILEERRORBOX: Final = 0x8000 - def locking(fd: int, mode: int, nbytes: int, /) -> None: ... - def setmode(fd: int, mode: int, /) -> int: ... - def open_osfhandle(handle: int, flags: int, /) -> int: ... - def get_osfhandle(fd: int, /) -> int: ... - def kbhit() -> bool: ... - def getch() -> bytes: ... - def getwch() -> str: ... - def getche() -> bytes: ... - def getwche() -> str: ... - def putch(char: bytes | bytearray, /) -> None: ... - def putwch(unicode_char: str, /) -> None: ... - def ungetch(char: bytes | bytearray, /) -> None: ... - def ungetwch(unicode_char: str, /) -> None: ... - def heapmin() -> None: ... - def SetErrorMode(mode: int, /) -> int: ... - def GetErrorMode() -> int: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/__init__.vpi deleted file mode 100644 index 2bd6e288..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/__init__.vpi +++ /dev/null @@ -1,90 +0,0 @@ -from multiprocessing import context, reduction as reducer -from multiprocessing.context import ( - AuthenticationError as AuthenticationError, - BufferTooShort as BufferTooShort, - Process as Process, - ProcessError as ProcessError, - TimeoutError as TimeoutError, -) -from multiprocessing.process import ( - active_children as active_children, - current_process as current_process, - parent_process as parent_process, -) - -# These are technically functions that return instances of these Queue classes. -# The stub here doesn't reflect reality exactly -- -# while e.g. `multiprocessing.queues.Queue` is a class, -# `multiprocessing.Queue` is actually a function at runtime. -# Avoid using `multiprocessing.Queue` as a type annotation; -# use imports from multiprocessing.queues instead. -# See #4266 and #8450 for discussion. -from multiprocessing.queues import JoinableQueue as JoinableQueue, Queue as Queue, SimpleQueue as SimpleQueue -from multiprocessing.spawn import freeze_support as freeze_support - -__all__ = [ - "Array", - "AuthenticationError", - "Barrier", - "BoundedSemaphore", - "BufferTooShort", - "Condition", - "Event", - "JoinableQueue", - "Lock", - "Manager", - "Pipe", - "Pool", - "Process", - "ProcessError", - "Queue", - "RLock", - "RawArray", - "RawValue", - "Semaphore", - "SimpleQueue", - "TimeoutError", - "Value", - "active_children", - "allow_connection_pickling", - "cpu_count", - "current_process", - "freeze_support", - "get_all_start_methods", - "get_context", - "get_logger", - "get_start_method", - "log_to_stderr", - "parent_process", - "reducer", - "set_executable", - "set_forkserver_preload", - "set_start_method", -] - -# These functions (really bound methods) -# are all autogenerated at runtime here: https://github.com/python/cpython/blob/600c65c094b0b48704d8ec2416930648052ba715/Lib/multiprocessing/__init__.py#L23 -RawValue = context._default_context.RawValue -RawArray = context._default_context.RawArray -Value = context._default_context.Value -Array = context._default_context.Array -Barrier = context._default_context.Barrier -BoundedSemaphore = context._default_context.BoundedSemaphore -Condition = context._default_context.Condition -Event = context._default_context.Event -Lock = context._default_context.Lock -RLock = context._default_context.RLock -Semaphore = context._default_context.Semaphore -Pipe = context._default_context.Pipe -Pool = context._default_context.Pool -allow_connection_pickling = context._default_context.allow_connection_pickling -cpu_count = context._default_context.cpu_count -get_logger = context._default_context.get_logger -log_to_stderr = context._default_context.log_to_stderr -Manager = context._default_context.Manager -set_executable = context._default_context.set_executable -set_forkserver_preload = context._default_context.set_forkserver_preload -get_all_start_methods = context._default_context.get_all_start_methods -get_start_method = context._default_context.get_start_method -set_start_method = context._default_context.set_start_method -get_context = context._default_context.get_context diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/connection.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/connection.vpi deleted file mode 100644 index e8366e9a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/connection.vpi +++ /dev/null @@ -1,94 +0,0 @@ -import socket -import sys -from _typeshed import Incomplete, ReadableBuffer -from collections.abc import Iterable -from types import TracebackType -from typing import Any, Generic, SupportsIndex, TypeAlias, TypeVar -from typing_extensions import Self - -__all__ = ["Client", "Listener", "Pipe", "wait"] - -# https://docs.python.org/3/library/multiprocessing.html#address-formats -_Address: TypeAlias = str | tuple[str, int] - -# Defaulting to Any to avoid forcing generics on a lot of pre-existing code -_SendT_contra = TypeVar("_SendT_contra", contravariant=True, default=Any) -_RecvT_co = TypeVar("_RecvT_co", covariant=True, default=Any) - -class _ConnectionBase(Generic[_SendT_contra, _RecvT_co]): - def __init__(self, handle: SupportsIndex, readable: bool = True, writable: bool = True) -> None: ... - @property - def closed(self) -> bool: ... # undocumented - @property - def readable(self) -> bool: ... # undocumented - @property - def writable(self) -> bool: ... # undocumented - def fileno(self) -> int: ... - def close(self) -> None: ... - def send_bytes(self, buf: ReadableBuffer, offset: int = 0, size: int | None = None) -> None: ... - def send(self, obj: _SendT_contra) -> None: ... - def recv_bytes(self, maxlength: int | None = None) -> bytes: ... - def recv_bytes_into(self, buf: Any, offset: int = 0) -> int: ... - def recv(self) -> _RecvT_co: ... - def poll(self, timeout: float | None = 0.0) -> bool: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... - -class Connection(_ConnectionBase[_SendT_contra, _RecvT_co]): ... - -if sys.platform == "win32": - class PipeConnection(_ConnectionBase[_SendT_contra, _RecvT_co]): ... - -class Listener: - def __init__( - self, address: _Address | None = None, family: str | None = None, backlog: int = 1, authkey: bytes | None = None - ) -> None: ... - if sys.platform != "win32": - def accept(self) -> Connection[Incomplete, Incomplete]: ... - else: - def accept(self) -> Connection[Incomplete, Incomplete] | PipeConnection[Incomplete, Incomplete]: ... - - def close(self) -> None: ... - @property - def address(self) -> _Address: ... - @property - def last_accepted(self) -> _Address | None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - -# Any: send and recv methods unused -if sys.version_info >= (3, 12): - def deliver_challenge(connection: _ConnectionBase[Any, Any], authkey: bytes, digest_name: str = "sha256") -> None: ... - -else: - def deliver_challenge(connection: _ConnectionBase[Any, Any], authkey: bytes) -> None: ... - -def answer_challenge(connection: _ConnectionBase[Any, Any], authkey: bytes) -> None: ... -def wait( - object_list: Iterable[_ConnectionBase[_SendT_contra, _RecvT_co] | socket.socket | int], timeout: float | None = None -) -> list[_ConnectionBase[_SendT_contra, _RecvT_co] | socket.socket | int]: ... - -if sys.platform != "win32": - def Client(address: _Address, family: str | None = None, authkey: bytes | None = None) -> Connection[Any, Any]: ... - -else: - def Client( - address: _Address, family: str | None = None, authkey: bytes | None = None - ) -> Connection[Any, Any] | PipeConnection[Any, Any]: ... - -# N.B. Keep this in sync with multiprocessing.context.BaseContext.Pipe. -# _ConnectionBase is the common base class of Connection and PipeConnection -# and can be used in cross-platform code. -# -# The two connections should have the same generic types but inverted (Connection[_T1, _T2], Connection[_T2, _T1]). -# However, TypeVars scoped entirely within a return annotation is unspecified in the spec. -if sys.platform != "win32": - def Pipe(duplex: bool = True) -> tuple[Connection[Any, Any], Connection[Any, Any]]: ... - -else: - def Pipe(duplex: bool = True) -> tuple[PipeConnection[Any, Any], PipeConnection[Any, Any]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/context.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/context.vpi deleted file mode 100644 index 13fd9675..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/context.vpi +++ /dev/null @@ -1,220 +0,0 @@ -import ctypes -import sys -from _ctypes import _CData -from collections.abc import Callable, Iterable, Sequence -from ctypes import _SimpleCData, c_char -from logging import Logger, _Level as _LoggingLevel -from multiprocessing import popen_fork, popen_forkserver, popen_spawn_posix, popen_spawn_win32, queues, synchronize -from multiprocessing.managers import SyncManager -from multiprocessing.pool import Pool as _Pool -from multiprocessing.process import BaseProcess -from multiprocessing.sharedctypes import Synchronized, SynchronizedArray, SynchronizedString -from typing import Any, ClassVar, Literal, TypeAlias, TypeVar, overload - -if sys.platform != "win32": - from multiprocessing.connection import Connection -else: - from multiprocessing.connection import PipeConnection - -__all__ = () - -_LockLike: TypeAlias = synchronize.Lock | synchronize.RLock -_T = TypeVar("_T") -_CT = TypeVar("_CT", bound=_CData) - -class ProcessError(Exception): ... -class BufferTooShort(ProcessError): ... -class TimeoutError(ProcessError): ... -class AuthenticationError(ProcessError): ... - -class BaseContext: - ProcessError: ClassVar[type[ProcessError]] - BufferTooShort: ClassVar[type[BufferTooShort]] - TimeoutError: ClassVar[type[TimeoutError]] - AuthenticationError: ClassVar[type[AuthenticationError]] - - # N.B. The methods below are applied at runtime to generate - # multiprocessing.*, so the signatures should be identical (modulo self). - @staticmethod - def current_process() -> BaseProcess: ... - @staticmethod - def parent_process() -> BaseProcess | None: ... - @staticmethod - def active_children() -> list[BaseProcess]: ... - def cpu_count(self) -> int: ... - def Manager(self) -> SyncManager: ... - - # N.B. Keep this in sync with multiprocessing.connection.Pipe. - # _ConnectionBase is the common base class of Connection and PipeConnection - # and can be used in cross-platform code. - # - # The two connections should have the same generic types but inverted (Connection[_T1, _T2], Connection[_T2, _T1]). - # However, TypeVars scoped entirely within a return annotation is unspecified in the spec. - if sys.platform != "win32": - def Pipe(self, duplex: bool = True) -> tuple[Connection[Any, Any], Connection[Any, Any]]: ... - else: - def Pipe(self, duplex: bool = True) -> tuple[PipeConnection[Any, Any], PipeConnection[Any, Any]]: ... - - def Barrier( - self, parties: int, action: Callable[..., object] | None = None, timeout: float | None = None - ) -> synchronize.Barrier: ... - def BoundedSemaphore(self, value: int = 1) -> synchronize.BoundedSemaphore: ... - def Condition(self, lock: _LockLike | None = None) -> synchronize.Condition: ... - def Event(self) -> synchronize.Event: ... - def Lock(self) -> synchronize.Lock: ... - def RLock(self) -> synchronize.RLock: ... - def Semaphore(self, value: int = 1) -> synchronize.Semaphore: ... - def Queue(self, maxsize: int = 0) -> queues.Queue[Any]: ... - def JoinableQueue(self, maxsize: int = 0) -> queues.JoinableQueue[Any]: ... - def SimpleQueue(self) -> queues.SimpleQueue[Any]: ... - def Pool( - self, - processes: int | None = None, - initializer: Callable[..., object] | None = None, - initargs: Iterable[Any] = (), - maxtasksperchild: int | None = None, - ) -> _Pool: ... - - @overload - def RawValue(self, typecode_or_type: type[_CT], *args: Any) -> _CT: ... - @overload - def RawValue(self, typecode_or_type: str, *args: Any) -> Any: ... - - @overload - def RawArray(self, typecode_or_type: type[_CT], size_or_initializer: int | Sequence[Any]) -> ctypes.Array[_CT]: ... - @overload - def RawArray(self, typecode_or_type: str, size_or_initializer: int | Sequence[Any]) -> Any: ... - - @overload - def Value( - self, typecode_or_type: type[_SimpleCData[_T]], *args: Any, lock: Literal[True] | _LockLike = True - ) -> Synchronized[_T]: ... - @overload - def Value(self, typecode_or_type: type[_CT], *args: Any, lock: Literal[False]) -> Synchronized[_CT]: ... - @overload - def Value(self, typecode_or_type: type[_CT], *args: Any, lock: Literal[True] | _LockLike = True) -> Synchronized[_CT]: ... - @overload - def Value(self, typecode_or_type: str, *args: Any, lock: Literal[True] | _LockLike = True) -> Synchronized[Any]: ... - @overload - def Value(self, typecode_or_type: str | type[_CData], *args: Any, lock: bool | _LockLike = True) -> Any: ... - - @overload - def Array( - self, typecode_or_type: type[_SimpleCData[_T]], size_or_initializer: int | Sequence[Any], *, lock: Literal[False] - ) -> SynchronizedArray[_T]: ... - @overload - def Array( - self, typecode_or_type: type[c_char], size_or_initializer: int | Sequence[Any], *, lock: Literal[True] | _LockLike = True - ) -> SynchronizedString: ... - @overload - def Array( - self, - typecode_or_type: type[_SimpleCData[_T]], - size_or_initializer: int | Sequence[Any], - *, - lock: Literal[True] | _LockLike = True, - ) -> SynchronizedArray[_T]: ... - @overload - def Array( - self, typecode_or_type: str, size_or_initializer: int | Sequence[Any], *, lock: Literal[True] | _LockLike = True - ) -> SynchronizedArray[Any]: ... - @overload - def Array( - self, typecode_or_type: str | type[_CData], size_or_initializer: int | Sequence[Any], *, lock: bool | _LockLike = True - ) -> Any: ... - - def freeze_support(self) -> None: ... - def get_logger(self) -> Logger: ... - def log_to_stderr(self, level: _LoggingLevel | None = None) -> Logger: ... - def allow_connection_pickling(self) -> None: ... - def set_executable(self, executable: str) -> None: ... - if sys.version_info >= (3, 15): - def set_forkserver_preload( - self, module_names: list[str], *, on_error: Literal["ignore", "warn", "fail"] = "ignore" - ) -> None: ... - else: - def set_forkserver_preload(self, module_names: list[str]) -> None: ... - - @overload - def get_context(self, method: None = None) -> DefaultContext: ... - @overload - def get_context(self, method: Literal["spawn"]) -> SpawnContext: ... - if sys.platform != "win32": - @overload - def get_context(self, method: Literal["fork"]) -> ForkContext: ... - @overload - def get_context(self, method: Literal["forkserver"]) -> ForkServerContext: ... - - @overload - def get_context(self, method: str) -> BaseContext: ... - - @overload - def get_start_method(self, allow_none: Literal[False] = False) -> str: ... - @overload - def get_start_method(self, allow_none: bool) -> str | None: ... - - def set_start_method(self, method: str | None, force: bool = False) -> None: ... - - @property - def reducer(self) -> str: ... - @reducer.setter - def reducer(self, reduction: str) -> None: ... - - def _check_available(self) -> None: ... - -class Process(BaseProcess): - _start_method: str | None - @staticmethod - def _Popen(process_obj: BaseProcess) -> DefaultContext: ... - -class DefaultContext(BaseContext): - Process: ClassVar[type[Process]] - def __init__(self, context: BaseContext) -> None: ... - def get_start_method(self, allow_none: bool = False) -> str: ... - def get_all_start_methods(self) -> list[str]: ... - -_default_context: DefaultContext - -class SpawnProcess(BaseProcess): - _start_method: str - if sys.platform != "win32": - @staticmethod - def _Popen(process_obj: BaseProcess) -> popen_spawn_posix.Popen: ... - else: - @staticmethod - def _Popen(process_obj: BaseProcess) -> popen_spawn_win32.Popen: ... - -class SpawnContext(BaseContext): - _name: str - Process: ClassVar[type[SpawnProcess]] - -if sys.platform != "win32": - class ForkProcess(BaseProcess): - _start_method: str - @staticmethod - def _Popen(process_obj: BaseProcess) -> popen_fork.Popen: ... - - class ForkServerProcess(BaseProcess): - _start_method: str - @staticmethod - def _Popen(process_obj: BaseProcess) -> popen_forkserver.Popen: ... - - class ForkContext(BaseContext): - _name: str - Process: ClassVar[type[ForkProcess]] - - class ForkServerContext(BaseContext): - _name: str - Process: ClassVar[type[ForkServerProcess]] - -def _force_start_method(method: str) -> None: ... - -if sys.platform != "win32": - def get_spawning_popen() -> popen_forkserver.Popen | popen_spawn_posix.Popen | None: ... - def set_spawning_popen(popen: popen_forkserver.Popen | popen_spawn_posix.Popen | None) -> None: ... - -else: - def get_spawning_popen() -> popen_spawn_win32.Popen | None: ... - def set_spawning_popen(popen: popen_spawn_win32.Popen | None) -> None: ... - -def assert_spawning(obj: Any) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.vpi deleted file mode 100644 index 62fef2b0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/__init__.vpi +++ /dev/null @@ -1,89 +0,0 @@ -import array -import sys -import threading -import weakref -from collections.abc import Callable, Iterable, Mapping, Sequence -from queue import Queue as Queue -from threading import ( - Barrier as Barrier, - BoundedSemaphore as BoundedSemaphore, - Condition as Condition, - Event as Event, - Lock as Lock, - RLock as RLock, - Semaphore as Semaphore, -) -from typing import Any, Literal - -from .connection import Pipe as Pipe - -__all__ = [ - "Process", - "current_process", - "active_children", - "freeze_support", - "Lock", - "RLock", - "Semaphore", - "BoundedSemaphore", - "Condition", - "Event", - "Barrier", - "Queue", - "Manager", - "Pipe", - "Pool", - "JoinableQueue", -] - -JoinableQueue = Queue - -class DummyProcess(threading.Thread): - _children: weakref.WeakKeyDictionary[Any, Any] - _parent: threading.Thread - _pid: None - _start_called: int - @property - def exitcode(self) -> Literal[0] | None: ... - if sys.version_info >= (3, 14): - # Default changed in Python 3.14.1 - def __init__( - self, - group: Any = None, - target: Callable[..., object] | None = None, - name: str | None = None, - args: Iterable[Any] = (), - kwargs: Mapping[str, Any] | None = None, - ) -> None: ... - else: - def __init__( - self, - group: Any = None, - target: Callable[..., object] | None = None, - name: str | None = None, - args: Iterable[Any] = (), - kwargs: Mapping[str, Any] | None = {}, - ) -> None: ... - -Process = DummyProcess - -class Namespace: - def __init__(self, **kwds: Any) -> None: ... - def __getattr__(self, name: str, /) -> Any: ... - def __setattr__(self, name: str, value: Any, /) -> None: ... - -class Value: - _typecode: Any - _value: Any - value: Any - def __init__(self, typecode: Any, value: Any, lock: Any = True) -> None: ... - -def Array(typecode: Any, sequence: Sequence[Any], lock: Any = True) -> array.array[Any]: ... -def Manager() -> Any: ... -def Pool(processes: int | None = None, initializer: Callable[..., object] | None = None, initargs: Iterable[Any] = ()) -> Any: ... -def active_children() -> list[Any]: ... - -current_process = threading.current_thread - -def freeze_support() -> None: ... -def shutdown() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/connection.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/connection.vpi deleted file mode 100644 index d7e98212..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/dummy/connection.vpi +++ /dev/null @@ -1,39 +0,0 @@ -from multiprocessing.connection import _Address -from queue import Queue -from types import TracebackType -from typing import Any -from typing_extensions import Self - -__all__ = ["Client", "Listener", "Pipe"] - -families: list[None] - -class Connection: - _in: Any - _out: Any - recv: Any - recv_bytes: Any - send: Any - send_bytes: Any - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def __init__(self, _in: Any, _out: Any) -> None: ... - def close(self) -> None: ... - def poll(self, timeout: float = 0.0) -> bool: ... - -class Listener: - _backlog_queue: Queue[Any] | None - @property - def address(self) -> Queue[Any] | None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def __init__(self, address: _Address | None = None, family: int | None = None, backlog: int = 1) -> None: ... - def accept(self) -> Connection: ... - def close(self) -> None: ... - -def Client(address: _Address) -> Connection: ... -def Pipe(duplex: bool = True) -> tuple[Connection, Connection]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/forkserver.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/forkserver.vpi deleted file mode 100644 index e48be5f0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/forkserver.vpi +++ /dev/null @@ -1,78 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike, Unused -from collections.abc import Sequence -from struct import Struct -from typing import Any, Final, Literal - -__all__ = ["ensure_running", "get_inherited_fds", "connect_to_new_process", "set_forkserver_preload"] - -MAXFDS_TO_SEND: Final = 256 -SIGNED_STRUCT: Final[Struct] - -class ForkServer: - if sys.version_info >= (3, 15): - def set_forkserver_preload( - self, modules_names: list[str], *, on_error: Literal["ignore", "warn", "fail"] = "ignore" - ) -> None: ... - else: - def set_forkserver_preload(self, modules_names: list[str]) -> None: ... - - def get_inherited_fds(self) -> list[int] | None: ... - def connect_to_new_process(self, fds: Sequence[int]) -> tuple[int, int]: ... - def ensure_running(self) -> None: ... - -if sys.version_info >= (3, 15): - def main( - listener_fd: int | None, - alive_r: FileDescriptorLike, - preload: Sequence[str], - main_path: str | None = None, - sys_path: list[str] | None = None, - *, - sys_argv: list[str] | None = None, - authkey_r: int | None = None, - on_error: str = "ignore", - ) -> None: ... - -elif sys.version_info >= (3, 14): - # `sys_argv` parameter added in Python 3.14.3 - def main( - listener_fd: int | None, - alive_r: FileDescriptorLike, - preload: Sequence[str], - main_path: str | None = None, - sys_path: list[str] | None = None, - *, - sys_argv: list[str] | None = None, - authkey_r: int | None = None, - ) -> None: ... - -elif sys.version_info >= (3, 13): - # `sys_argv` parameter added in Python 3.13.12 - def main( - listener_fd: int | None, - alive_r: FileDescriptorLike, - preload: Sequence[str], - main_path: str | None = None, - sys_path: list[str] | None = None, - *, - sys_argv: list[str] | None = None, - ) -> None: ... - -else: - def main( - listener_fd: int | None, - alive_r: FileDescriptorLike, - preload: Sequence[str], - main_path: str | None = None, - sys_path: Unused = None, - ) -> None: ... - -def read_signed(fd: int) -> Any: ... -def write_signed(fd: int, n: int) -> None: ... - -_forkserver: ForkServer -ensure_running = _forkserver.ensure_running -get_inherited_fds = _forkserver.get_inherited_fds -connect_to_new_process = _forkserver.connect_to_new_process -set_forkserver_preload = _forkserver.set_forkserver_preload diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/heap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/heap.vpi deleted file mode 100644 index bf6f853a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/heap.vpi +++ /dev/null @@ -1,41 +0,0 @@ -import sys -from collections.abc import Callable -from mmap import mmap -from multiprocessing import popen_forkserver, popen_spawn_posix, resource_sharer -from typing import Protocol, TypeAlias, type_check_only - -__all__ = ["BufferWrapper"] - -class Arena: - size: int - buffer: mmap - if sys.platform == "win32": - name: str - def __init__(self, size: int) -> None: ... - else: - fd: int - def __init__(self, size: int, fd: int = -1) -> None: ... - -_Block: TypeAlias = tuple[Arena, int, int] - -if sys.platform != "win32": - @type_check_only - class _SupportsDetach(Protocol): - def detach(self) -> int: ... - - def reduce_arena( - a: Arena, - ) -> tuple[ - Callable[[int, _SupportsDetach], Arena], - tuple[int, popen_forkserver._DupFd | popen_spawn_posix._DupFd | resource_sharer.DupFd], - ]: ... - def rebuild_arena(size: int, dupfd: _SupportsDetach) -> Arena: ... - -class Heap: - def __init__(self, size: int = ...) -> None: ... - def free(self, block: _Block) -> None: ... - def malloc(self, size: int) -> _Block: ... - -class BufferWrapper: - def __init__(self, size: int) -> None: ... - def create_memoryview(self) -> memoryview: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/managers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/managers.vpi deleted file mode 100644 index 40639e86..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/managers.vpi +++ /dev/null @@ -1,389 +0,0 @@ -import queue -import sys -import threading -from _typeshed import SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT -from collections.abc import ( - Callable, - Iterable, - Iterator, - Mapping, - MutableMapping, - MutableSequence, - MutableSet, - Sequence, - Set as AbstractSet, -) -from types import GenericAlias, TracebackType -from typing import Any, AnyStr, ClassVar, Generic, SupportsIndex, TypeAlias, TypeVar, overload -from typing_extensions import Self - -from . import pool -from .connection import Connection, _Address -from .context import BaseContext -from .shared_memory import _SLT, ShareableList as _ShareableList, SharedMemory as _SharedMemory -from .util import Finalize as _Finalize - -__all__ = ["BaseManager", "SyncManager", "BaseProxy", "Token", "SharedMemoryManager"] - -_T = TypeVar("_T") -_T1 = TypeVar("_T1") -_T2 = TypeVar("_T2") -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") -_S = TypeVar("_S") - -class Namespace: - def __init__(self, **kwds: Any) -> None: ... - def __getattr__(self, name: str, /) -> Any: ... - def __setattr__(self, name: str, value: Any, /) -> None: ... - -_Namespace: TypeAlias = Namespace - -class Token: - __slots__ = ("typeid", "address", "id") - typeid: str | bytes | None - address: _Address | None - id: str | bytes | int | None - def __init__(self, typeid: bytes | str | None, address: _Address | None, id: str | bytes | int | None) -> None: ... - def __getstate__(self) -> tuple[str | bytes | None, tuple[str | bytes, int], str | bytes | int | None]: ... - def __setstate__(self, state: tuple[str | bytes | None, tuple[str | bytes, int], str | bytes | int | None]) -> None: ... - -class BaseProxy: - _address_to_local: dict[_Address, Any] - _mutex: Any - def __init__( - self, - token: Any, - serializer: str, - manager: Any = None, - authkey: AnyStr | None = None, - exposed: Any = None, - incref: bool = True, - manager_owned: bool = False, - ) -> None: ... - def __deepcopy__(self, memo: Any | None) -> Any: ... - def _callmethod(self, methodname: str, args: tuple[Any, ...] = (), kwds: dict[Any, Any] = {}) -> None: ... - def _getvalue(self) -> Any: ... - def __reduce__(self) -> tuple[Any, tuple[Any, Any, str, dict[Any, Any]]]: ... - -class ValueProxy(BaseProxy, Generic[_T]): - def get(self) -> _T: ... - def set(self, value: _T) -> None: ... - value: _T - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -if sys.version_info >= (3, 13): - class _BaseDictProxy(BaseProxy, MutableMapping[_KT, _VT]): - __builtins__: ClassVar[dict[str, Any]] - def __len__(self) -> int: ... - def __getitem__(self, key: _KT, /) -> _VT: ... - def __setitem__(self, key: _KT, value: _VT, /) -> None: ... - def __delitem__(self, key: _KT, /) -> None: ... - def __iter__(self) -> Iterator[_KT]: ... - def copy(self) -> dict[_KT, _VT]: ... - - @overload # type: ignore[override] - def get(self, key: _KT, /) -> _VT | None: ... - @overload - def get(self, key: _KT, default: _VT, /) -> _VT: ... - @overload - def get(self, key: _KT, default: _T, /) -> _VT | _T: ... - - @overload - def pop(self, key: _KT, /) -> _VT: ... - @overload - def pop(self, key: _KT, default: _VT, /) -> _VT: ... - @overload - def pop(self, key: _KT, default: _T, /) -> _VT | _T: ... - - def keys(self) -> list[_KT]: ... # type: ignore[override] - def items(self) -> list[tuple[_KT, _VT]]: ... # type: ignore[override] - def values(self) -> list[_VT]: ... # type: ignore[override] - if sys.version_info >= (3, 14): - # Next methods are copied from builtins.dict - @overload - def fromkeys(self, iterable: Iterable[_T], value: None = None, /) -> dict[_T, Any | None]: ... - @overload - def fromkeys(self, iterable: Iterable[_T], value: _S, /) -> dict[_T, _S]: ... - - def __reversed__(self) -> Iterator[_KT]: ... - - @overload - def __or__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ... - @overload - def __or__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ... - - @overload - def __ror__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ... - @overload - def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ... - - @overload # type: ignore[misc] - def __ior__(self, value: SupportsKeysAndGetItem[_KT, _VT], /) -> Self: ... - @overload - def __ior__(self, value: Iterable[tuple[_KT, _VT]], /) -> Self: ... - - class DictProxy(_BaseDictProxy[_KT, _VT]): - def __class_getitem__(cls, args: Any, /) -> GenericAlias: ... - -else: - class DictProxy(BaseProxy, MutableMapping[_KT, _VT]): - __builtins__: ClassVar[dict[str, Any]] - def __len__(self) -> int: ... - def __getitem__(self, key: _KT, /) -> _VT: ... - def __setitem__(self, key: _KT, value: _VT, /) -> None: ... - def __delitem__(self, key: _KT, /) -> None: ... - def __iter__(self) -> Iterator[_KT]: ... - def copy(self) -> dict[_KT, _VT]: ... - - @overload # type: ignore[override] - def get(self, key: _KT, /) -> _VT | None: ... - @overload - def get(self, key: _KT, default: _VT, /) -> _VT: ... - @overload - def get(self, key: _KT, default: _T, /) -> _VT | _T: ... - - @overload - def pop(self, key: _KT, /) -> _VT: ... - @overload - def pop(self, key: _KT, default: _VT, /) -> _VT: ... - @overload - def pop(self, key: _KT, default: _T, /) -> _VT | _T: ... - - def keys(self) -> list[_KT]: ... # type: ignore[override] - def items(self) -> list[tuple[_KT, _VT]]: ... # type: ignore[override] - def values(self) -> list[_VT]: ... # type: ignore[override] - -if sys.version_info >= (3, 14): - class _BaseSetProxy(BaseProxy, MutableSet[_T]): - __builtins__: ClassVar[dict[str, Any]] - # Copied from builtins.set - def add(self, element: _T, /) -> None: ... - def copy(self) -> set[_T]: ... - def clear(self) -> None: ... - def difference(self, *s: Iterable[Any]) -> set[_T]: ... - def difference_update(self, *s: Iterable[Any]) -> None: ... - def discard(self, element: _T, /) -> None: ... - def intersection(self, *s: Iterable[Any]) -> set[_T]: ... - def intersection_update(self, *s: Iterable[Any]) -> None: ... - def isdisjoint(self, s: Iterable[Any], /) -> bool: ... - def issubset(self, s: Iterable[Any], /) -> bool: ... - def issuperset(self, s: Iterable[Any], /) -> bool: ... - def pop(self) -> _T: ... - def remove(self, element: _T, /) -> None: ... - def symmetric_difference(self, s: Iterable[_T], /) -> set[_T]: ... - def symmetric_difference_update(self, s: Iterable[_T], /) -> None: ... - def union(self, *s: Iterable[_S]) -> set[_T | _S]: ... - def update(self, *s: Iterable[_T]) -> None: ... - def __len__(self) -> int: ... - def __contains__(self, o: object, /) -> bool: ... - def __iter__(self) -> Iterator[_T]: ... - def __and__(self, value: AbstractSet[object], /) -> set[_T]: ... - def __iand__(self, value: AbstractSet[object], /) -> Self: ... - def __or__(self, value: AbstractSet[_S], /) -> set[_T | _S]: ... - def __ior__(self, value: AbstractSet[_T], /) -> Self: ... # type: ignore[override,misc] - def __sub__(self, value: AbstractSet[_T | None], /) -> set[_T]: ... - def __isub__(self, value: AbstractSet[object], /) -> Self: ... - def __xor__(self, value: AbstractSet[_S], /) -> set[_T | _S]: ... - def __ixor__(self, value: AbstractSet[_T], /) -> Self: ... # type: ignore[override,misc] - def __le__(self, value: AbstractSet[object], /) -> bool: ... - def __lt__(self, value: AbstractSet[object], /) -> bool: ... - def __ge__(self, value: AbstractSet[object], /) -> bool: ... - def __gt__(self, value: AbstractSet[object], /) -> bool: ... - def __eq__(self, value: object, /) -> bool: ... - def __rand__(self, value: AbstractSet[object], /) -> set[_T]: ... - def __ror__(self, value: AbstractSet[_S], /) -> set[_T | _S]: ... # type: ignore[misc] - def __rsub__(self, value: AbstractSet[_T], /) -> set[_T]: ... - def __rxor__(self, value: AbstractSet[_S], /) -> set[_T | _S]: ... # type: ignore[misc] - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - - class SetProxy(_BaseSetProxy[_T]): ... - -class BaseListProxy(BaseProxy, MutableSequence[_T]): - __builtins__: ClassVar[dict[str, Any]] - def __len__(self) -> int: ... - def __add__(self, x: list[_T], /) -> list[_T]: ... - def __delitem__(self, i: SupportsIndex | slice[SupportsIndex | None], /) -> None: ... - - @overload - def __getitem__(self, i: SupportsIndex, /) -> _T: ... - @overload - def __getitem__(self, s: slice[SupportsIndex | None], /) -> list[_T]: ... - - @overload - def __setitem__(self, i: SupportsIndex, o: _T, /) -> None: ... - @overload - def __setitem__(self, s: slice[SupportsIndex | None], o: Iterable[_T], /) -> None: ... - - def __mul__(self, n: SupportsIndex, /) -> list[_T]: ... - def __rmul__(self, n: SupportsIndex, /) -> list[_T]: ... - def __imul__(self, value: SupportsIndex, /) -> Self: ... - def __reversed__(self) -> Iterator[_T]: ... - def append(self, object: _T, /) -> None: ... - def extend(self, iterable: Iterable[_T], /) -> None: ... - def pop(self, index: SupportsIndex = ..., /) -> _T: ... - def index(self, value: _T, start: SupportsIndex = ..., stop: SupportsIndex = ..., /) -> int: ... - def count(self, value: _T, /) -> int: ... - def insert(self, index: SupportsIndex, object: _T, /) -> None: ... - def remove(self, value: _T, /) -> None: ... - if sys.version_info >= (3, 14): - # Next methods are copied from builtins.list - def clear(self) -> None: ... - def copy(self) -> list[_T]: ... - - # Use BaseListProxy[SupportsRichComparisonT] for the first overload rather than [SupportsRichComparison] - # to work around invariance - @overload - def sort(self: BaseListProxy[SupportsRichComparisonT], *, key: None = None, reverse: bool = ...) -> None: ... - @overload - def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = ...) -> None: ... - -class ListProxy(BaseListProxy[_T]): - def __iadd__(self, value: Iterable[_T], /) -> Self: ... # type: ignore[override] - def __imul__(self, value: SupportsIndex, /) -> Self: ... # type: ignore[override] - if sys.version_info >= (3, 13): - def __class_getitem__(cls, args: Any, /) -> Any: ... - -# Send is (kind, result) -# Receive is (id, methodname, args, kwds) -_ServerConnection: TypeAlias = Connection[tuple[str, Any], tuple[str, str, Iterable[Any], Mapping[str, Any]]] - -# Returned by BaseManager.get_server() -class Server: - address: _Address | None - id_to_obj: dict[str, tuple[Any, set[str], dict[str, str]]] - fallback_mapping: dict[str, Callable[[_ServerConnection, str, Any], Any]] - public: list[str] - # Registry values are (callable, exposed, method_to_typeid, proxytype) - def __init__( - self, - registry: dict[str, tuple[Callable[..., Any], Iterable[str], dict[str, str], Any]], - address: _Address | None, - authkey: bytes, - serializer: str, - ) -> None: ... - def serve_forever(self) -> None: ... - def accepter(self) -> None: ... - def handle_request(self, conn: _ServerConnection) -> None: ... - def serve_client(self, conn: _ServerConnection) -> None: ... - def fallback_getvalue(self, conn: _ServerConnection, ident: str, obj: _T) -> _T: ... - def fallback_str(self, conn: _ServerConnection, ident: str, obj: Any) -> str: ... - def fallback_repr(self, conn: _ServerConnection, ident: str, obj: Any) -> str: ... - def dummy(self, c: _ServerConnection) -> None: ... - def debug_info(self, c: _ServerConnection) -> str: ... - def number_of_objects(self, c: _ServerConnection) -> int: ... - def shutdown(self, c: _ServerConnection) -> None: ... - def create(self, c: _ServerConnection, typeid: str, /, *args: Any, **kwds: Any) -> tuple[str, tuple[str, ...]]: ... - def get_methods(self, c: _ServerConnection, token: Token) -> set[str]: ... - def accept_connection(self, c: _ServerConnection, name: str) -> None: ... - def incref(self, c: _ServerConnection, ident: str) -> None: ... - def decref(self, c: _ServerConnection, ident: str) -> None: ... - -class BaseManager: - if sys.version_info >= (3, 11): - def __init__( - self, - address: _Address | None = None, - authkey: bytes | None = None, - serializer: str = "pickle", - ctx: BaseContext | None = None, - *, - shutdown_timeout: float = 1.0, - ) -> None: ... - else: - def __init__( - self, - address: _Address | None = None, - authkey: bytes | None = None, - serializer: str = "pickle", - ctx: BaseContext | None = None, - ) -> None: ... - - def get_server(self) -> Server: ... - def connect(self) -> None: ... - def start(self, initializer: Callable[..., object] | None = None, initargs: Iterable[Any] = ()) -> None: ... - shutdown: _Finalize # only available after start() was called - def join(self, timeout: float | None = None) -> None: ... # undocumented - @property - def address(self) -> _Address | None: ... - @classmethod - def register( - cls, - typeid: str, - callable: Callable[..., object] | None = None, - proxytype: Any = None, - exposed: Sequence[str] | None = None, - method_to_typeid: Mapping[str, str] | None = None, - create_method: bool = True, - ) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - -class SyncManager(BaseManager): - def Barrier( - self, parties: int, action: Callable[[], None] | None = None, timeout: float | None = None - ) -> threading.Barrier: ... - def BoundedSemaphore(self, value: int = 1) -> threading.BoundedSemaphore: ... - def Condition(self, lock: threading.Lock | threading._RLock | None = None) -> threading.Condition: ... - def Event(self) -> threading.Event: ... - def Lock(self) -> threading.Lock: ... - def Namespace(self) -> _Namespace: ... - def Pool( - self, - processes: int | None = None, - initializer: Callable[..., object] | None = None, - initargs: Iterable[Any] = (), - maxtasksperchild: int | None = None, - context: Any | None = None, - ) -> pool.Pool: ... - def Queue(self, maxsize: int = ...) -> queue.Queue[Any]: ... - def JoinableQueue(self, maxsize: int = ...) -> queue.Queue[Any]: ... - def RLock(self) -> threading.RLock: ... - def Semaphore(self, value: int = 1) -> threading.Semaphore: ... - def Array(self, typecode: Any, sequence: Sequence[_T]) -> Sequence[_T]: ... - def Value(self, typecode: Any, value: _T) -> ValueProxy[_T]: ... - - # Overloads are copied from builtins.dict.__init__ - @overload - def dict(self) -> DictProxy[Any, Any]: ... - @overload - def dict(self, **kwargs: _VT) -> DictProxy[str, _VT]: ... - @overload - def dict(self, map: SupportsKeysAndGetItem[_KT, _VT], /) -> DictProxy[_KT, _VT]: ... - @overload - def dict(self, map: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> DictProxy[str, _VT]: ... - @overload - def dict(self, iterable: Iterable[tuple[_KT, _VT]], /) -> DictProxy[_KT, _VT]: ... - @overload - def dict(self, iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> DictProxy[str, _VT]: ... - @overload - def dict(self, iterable: Iterable[list[str]], /) -> DictProxy[str, str]: ... - @overload - def dict(self, iterable: Iterable[list[bytes]], /) -> DictProxy[bytes, bytes]: ... - - # Overloads are copied from builtins.list.__init__ - @overload - def list(self, iterable: Iterable[_T], /) -> ListProxy[_T]: ... - @overload - def list(self) -> ListProxy[Any]: ... - - if sys.version_info >= (3, 14): - @overload - def set(self, iterable: Iterable[_T], /) -> SetProxy[_T]: ... - @overload - def set(self) -> SetProxy[Any]: ... - -class RemoteError(Exception): ... - -class SharedMemoryServer(Server): - def track_segment(self, c: _ServerConnection, segment_name: str) -> None: ... - def release_segment(self, c: _ServerConnection, segment_name: str) -> None: ... - def list_segments(self, c: _ServerConnection) -> list[str]: ... - -class SharedMemoryManager(BaseManager): - def get_server(self) -> SharedMemoryServer: ... - def SharedMemory(self, size: int) -> _SharedMemory: ... - def ShareableList(self, sequence: Iterable[_SLT] | None) -> _ShareableList[_SLT]: ... - def __del__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/pool.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/pool.vpi deleted file mode 100644 index b79f9e77..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/pool.vpi +++ /dev/null @@ -1,101 +0,0 @@ -from collections.abc import Callable, Iterable, Mapping -from multiprocessing.context import DefaultContext, Process -from types import GenericAlias, TracebackType -from typing import Any, Final, Generic, TypeVar -from typing_extensions import Self - -__all__ = ["Pool", "ThreadPool"] - -_S = TypeVar("_S") -_T = TypeVar("_T") - -class ApplyResult(Generic[_T]): - def __init__( - self, pool: Pool, callback: Callable[[_T], object] | None, error_callback: Callable[[BaseException], object] | None - ) -> None: ... - def get(self, timeout: float | None = None) -> _T: ... - def wait(self, timeout: float | None = None) -> None: ... - def ready(self) -> bool: ... - def successful(self) -> bool: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -# alias created during issue #17805 -AsyncResult = ApplyResult - -class MapResult(ApplyResult[list[_T]]): - def __init__( - self, - pool: Pool, - chunksize: int, - length: int, - callback: Callable[[list[_T]], object] | None, - error_callback: Callable[[BaseException], object] | None, - ) -> None: ... - -class IMapIterator(Generic[_T]): - def __init__(self, pool: Pool) -> None: ... - def __iter__(self) -> Self: ... - def next(self, timeout: float | None = None) -> _T: ... - def __next__(self, timeout: float | None = None) -> _T: ... - -class IMapUnorderedIterator(IMapIterator[_T]): ... - -class Pool: - def __init__( - self, - processes: int | None = None, - initializer: Callable[..., object] | None = None, - initargs: Iterable[Any] = (), - maxtasksperchild: int | None = None, - context: Any | None = None, - ) -> None: ... - @staticmethod - def Process(ctx: DefaultContext, *args: Any, **kwds: Any) -> Process: ... - def apply(self, func: Callable[..., _T], args: Iterable[Any] = (), kwds: Mapping[str, Any] = {}) -> _T: ... - def apply_async( - self, - func: Callable[..., _T], - args: Iterable[Any] = (), - kwds: Mapping[str, Any] = {}, - callback: Callable[[_T], object] | None = None, - error_callback: Callable[[BaseException], object] | None = None, - ) -> AsyncResult[_T]: ... - def map(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = None) -> list[_T]: ... - def map_async( - self, - func: Callable[[_S], _T], - iterable: Iterable[_S], - chunksize: int | None = None, - callback: Callable[[list[_T]], object] | None = None, - error_callback: Callable[[BaseException], object] | None = None, - ) -> MapResult[_T]: ... - def imap(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = 1) -> IMapIterator[_T]: ... - def imap_unordered(self, func: Callable[[_S], _T], iterable: Iterable[_S], chunksize: int | None = 1) -> IMapIterator[_T]: ... - def starmap(self, func: Callable[..., _T], iterable: Iterable[Iterable[Any]], chunksize: int | None = None) -> list[_T]: ... - def starmap_async( - self, - func: Callable[..., _T], - iterable: Iterable[Iterable[Any]], - chunksize: int | None = None, - callback: Callable[[list[_T]], object] | None = None, - error_callback: Callable[[BaseException], object] | None = None, - ) -> AsyncResult[list[_T]]: ... - def close(self) -> None: ... - def terminate(self) -> None: ... - def join(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... - -class ThreadPool(Pool): - def __init__( - self, processes: int | None = None, initializer: Callable[..., object] | None = None, initargs: Iterable[Any] = () - ) -> None: ... - -# undocumented -INIT: Final = "INIT" -RUN: Final = "RUN" -CLOSE: Final = "CLOSE" -TERMINATE: Final = "TERMINATE" diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_fork.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_fork.vpi deleted file mode 100644 index 5e53b055..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_fork.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import sys -from typing import ClassVar - -from .process import BaseProcess -from .util import Finalize - -if sys.platform != "win32": - __all__ = ["Popen"] - - class Popen: - finalizer: Finalize | None - method: ClassVar[str] - pid: int - returncode: int | None - sentinel: int # doesn't exist if os.fork in _launch returns 0 - - def __init__(self, process_obj: BaseProcess) -> None: ... - def duplicate_for_child(self, fd: int) -> int: ... - def poll(self, flag: int = 1) -> int | None: ... - def wait(self, timeout: float | None = None) -> int | None: ... - if sys.version_info >= (3, 14): - def interrupt(self) -> None: ... - - def terminate(self) -> None: ... - def kill(self) -> None: ... - def close(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_forkserver.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_forkserver.vpi deleted file mode 100644 index f7d53bbb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_forkserver.vpi +++ /dev/null @@ -1,16 +0,0 @@ -import sys -from typing import ClassVar - -from . import popen_fork -from .util import Finalize - -if sys.platform != "win32": - __all__ = ["Popen"] - - class _DupFd: - def __init__(self, ind: int) -> None: ... - def detach(self) -> int: ... - - class Popen(popen_fork.Popen): - DupFd: ClassVar[type[_DupFd]] - finalizer: Finalize diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_posix.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_posix.vpi deleted file mode 100644 index 7e81d396..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_posix.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from typing import ClassVar - -from . import popen_fork -from .util import Finalize - -if sys.platform != "win32": - __all__ = ["Popen"] - - class _DupFd: - fd: int - - def __init__(self, fd: int) -> None: ... - def detach(self) -> int: ... - - class Popen(popen_fork.Popen): - DupFd: ClassVar[type[_DupFd]] - finalizer: Finalize - pid: int # may not exist if _launch raises in second try / except - sentinel: int # may not exist if _launch raises in second try / except diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.vpi deleted file mode 100644 index 481b9eec..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/popen_spawn_win32.vpi +++ /dev/null @@ -1,30 +0,0 @@ -import sys -from multiprocessing.process import BaseProcess -from typing import ClassVar, Final - -from .util import Finalize - -if sys.platform == "win32": - __all__ = ["Popen"] - - TERMINATE: Final[int] - WINEXE: Final[bool] - WINSERVICE: Final[bool] - WINENV: Final[bool] - - class Popen: - finalizer: Finalize - method: ClassVar[str] - pid: int - returncode: int | None - sentinel: int - - def __init__(self, process_obj: BaseProcess) -> None: ... - def duplicate_for_child(self, handle: int) -> int: ... - def wait(self, timeout: float | None = None) -> int | None: ... - def poll(self) -> int | None: ... - def terminate(self) -> None: ... - - kill = terminate - - def close(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/process.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/process.vpi deleted file mode 100644 index c7d13b31..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/process.vpi +++ /dev/null @@ -1,43 +0,0 @@ -import sys -from collections.abc import Callable, Iterable, Mapping -from typing import Any - -__all__ = ["BaseProcess", "current_process", "active_children", "parent_process"] - -class BaseProcess: - name: str - daemon: bool - authkey: bytes - _identity: tuple[int, ...] # undocumented - def __init__( - self, - group: None = None, - target: Callable[..., object] | None = None, - name: str | None = None, - args: Iterable[Any] = (), - kwargs: Mapping[str, Any] = {}, - *, - daemon: bool | None = None, - ) -> None: ... - def run(self) -> None: ... - def start(self) -> None: ... - if sys.version_info >= (3, 14): - def interrupt(self) -> None: ... - - def terminate(self) -> None: ... - def kill(self) -> None: ... - def close(self) -> None: ... - def join(self, timeout: float | None = None) -> None: ... - def is_alive(self) -> bool: ... - @property - def exitcode(self) -> int | None: ... - @property - def ident(self) -> int | None: ... - @property - def pid(self) -> int | None: ... - @property - def sentinel(self) -> int: ... - -def current_process() -> BaseProcess: ... -def active_children() -> list[BaseProcess]: ... -def parent_process() -> BaseProcess | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/queues.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/queues.vpi deleted file mode 100644 index 8f0feb83..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/queues.vpi +++ /dev/null @@ -1,46 +0,0 @@ -import sys -from types import GenericAlias -from typing import Any, Generic, NewType, TypeVar - -__all__ = ["Queue", "SimpleQueue", "JoinableQueue"] - -_T = TypeVar("_T") - -_QueueState = NewType("_QueueState", object) -_JoinableQueueState = NewType("_JoinableQueueState", object) -_SimpleQueueState = NewType("_SimpleQueueState", object) - -class Queue(Generic[_T]): - # FIXME: `ctx` is a circular dependency and it's not actually optional. - # It's marked as such to be able to use the generic Queue in __init__.pyi. - def __init__(self, maxsize: int = 0, *, ctx: Any = ...) -> None: ... - def __getstate__(self) -> _QueueState: ... - def __setstate__(self, state: _QueueState) -> None: ... - def put(self, obj: _T, block: bool = True, timeout: float | None = None) -> None: ... - def get(self, block: bool = True, timeout: float | None = None) -> _T: ... - def qsize(self) -> int: ... - def empty(self) -> bool: ... - def full(self) -> bool: ... - def get_nowait(self) -> _T: ... - def put_nowait(self, obj: _T) -> None: ... - def close(self) -> None: ... - def join_thread(self) -> None: ... - def cancel_join_thread(self) -> None: ... - if sys.version_info >= (3, 12): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class JoinableQueue(Queue[_T]): - def __getstate__(self) -> _JoinableQueueState: ... # type: ignore[override] - def __setstate__(self, state: _JoinableQueueState) -> None: ... # type: ignore[override] - def task_done(self) -> None: ... - def join(self) -> None: ... - -class SimpleQueue(Generic[_T]): - def __init__(self, *, ctx: Any = ...) -> None: ... - def close(self) -> None: ... - def empty(self) -> bool: ... - def __getstate__(self) -> _SimpleQueueState: ... - def __setstate__(self, state: _SimpleQueueState) -> None: ... - def get(self) -> _T: ... - def put(self, obj: _T) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/reduction.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/reduction.vpi deleted file mode 100644 index 476cf9b2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/reduction.vpi +++ /dev/null @@ -1,95 +0,0 @@ -import pickle -import sys -from _pickle import _BufferCallback, _ReducedType -from _typeshed import HasFileno, SupportsWrite, Unused -from abc import ABCMeta -from builtins import type as Type # alias to avoid name clash -from collections.abc import Callable -from copyreg import _DispatchTableType -from multiprocessing import connection, popen_forkserver, popen_spawn_posix, resource_sharer -from socket import socket -from typing import Any, Final - -if sys.platform == "win32": - __all__ = ["send_handle", "recv_handle", "ForkingPickler", "register", "dump", "DupHandle", "duplicate", "steal_handle"] -else: - __all__ = ["send_handle", "recv_handle", "ForkingPickler", "register", "dump", "DupFd", "sendfds", "recvfds"] - -HAVE_SEND_HANDLE: Final[bool] - -class ForkingPickler(pickle.Pickler): - dispatch_table: _DispatchTableType - def __init__( - self, - file: SupportsWrite[bytes], - protocol: int | None = None, - fix_imports: bool = True, - buffer_callback: _BufferCallback = None, - /, - ) -> None: ... - @classmethod - def register(cls, type: Type, reduce: Callable[[Any], _ReducedType]) -> None: ... - @classmethod - def dumps(cls, obj: Any, protocol: int | None = None) -> memoryview: ... - loads = pickle.loads - -register = ForkingPickler.register - -def dump(obj: Any, file: SupportsWrite[bytes], protocol: int | None = None) -> None: ... - -if sys.platform == "win32": - def duplicate( - handle: int, target_process: int | None = None, inheritable: bool = False, *, source_process: int | None = None - ) -> int: ... - def steal_handle(source_pid: int, handle: int) -> int: ... - def send_handle(conn: connection.PipeConnection[DupHandle, Any], handle: int, destination_pid: int) -> None: ... - def recv_handle(conn: connection.PipeConnection[Any, DupHandle]) -> int: ... - - class DupHandle: - def __init__(self, handle: int, access: int, pid: int | None = None) -> None: ... - def detach(self) -> int: ... - -else: - if sys.version_info < (3, 14): - ACKNOWLEDGE: Final[bool] - - def recvfds(sock: socket, size: int) -> list[int]: ... - def send_handle(conn: HasFileno, handle: int, destination_pid: Unused) -> None: ... - def recv_handle(conn: HasFileno) -> int: ... - def sendfds(sock: socket, fds: list[int]) -> None: ... - def DupFd(fd: int) -> popen_forkserver._DupFd | popen_spawn_posix._DupFd | resource_sharer.DupFd: ... - -# These aliases are to work around pyright complaints. -# Pyright doesn't like it when a class object is defined as an alias -# of a global object with the same name. -_ForkingPickler = ForkingPickler -_register = register -_dump = dump -_send_handle = send_handle -_recv_handle = recv_handle - -if sys.platform == "win32": - _steal_handle = steal_handle - _duplicate = duplicate - _DupHandle = DupHandle -else: - _sendfds = sendfds - _recvfds = recvfds - _DupFd = DupFd - -class AbstractReducer(metaclass=ABCMeta): - ForkingPickler = _ForkingPickler - register = _register - dump = _dump - send_handle = _send_handle - recv_handle = _recv_handle - if sys.platform == "win32": - steal_handle = _steal_handle - duplicate = _duplicate - DupHandle = _DupHandle - else: - sendfds = _sendfds - recvfds = _recvfds - DupFd = _DupFd - - def __init__(self, *args: Unused) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_sharer.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_sharer.vpi deleted file mode 100644 index 5fee7cf3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_sharer.vpi +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from socket import socket - -__all__ = ["stop"] - -if sys.platform == "win32": - __all__ += ["DupSocket"] - - class DupSocket: - def __init__(self, sock: socket) -> None: ... - def detach(self) -> socket: ... - -else: - __all__ += ["DupFd"] - - class DupFd: - def __init__(self, fd: int) -> None: ... - def detach(self) -> int: ... - -def stop(timeout: float | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_tracker.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_tracker.vpi deleted file mode 100644 index cb2f27a6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/resource_tracker.vpi +++ /dev/null @@ -1,21 +0,0 @@ -import sys -from _typeshed import FileDescriptorOrPath -from collections.abc import Sized - -__all__ = ["ensure_running", "register", "unregister"] - -class ResourceTracker: - def getfd(self) -> int | None: ... - def ensure_running(self) -> None: ... - def register(self, name: Sized, rtype: str) -> None: ... - def unregister(self, name: Sized, rtype: str) -> None: ... - if sys.version_info >= (3, 12): - def __del__(self) -> None: ... - -_resource_tracker: ResourceTracker -ensure_running = _resource_tracker.ensure_running -register = _resource_tracker.register -unregister = _resource_tracker.unregister -getfd = _resource_tracker.getfd - -def main(fd: FileDescriptorOrPath) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/shared_memory.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/shared_memory.vpi deleted file mode 100644 index 90777a4e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/shared_memory.vpi +++ /dev/null @@ -1,43 +0,0 @@ -import sys -from collections.abc import Iterable -from types import GenericAlias -from typing import Any, Generic, TypeVar, overload -from typing_extensions import Self - -__all__ = ["SharedMemory", "ShareableList"] - -_SLT = TypeVar("_SLT", int, float, bool, str, bytes, None) - -class SharedMemory: - if sys.version_info >= (3, 13): - def __init__(self, name: str | None = None, create: bool = False, size: int = 0, *, track: bool = True) -> None: ... - else: - def __init__(self, name: str | None = None, create: bool = False, size: int = 0) -> None: ... - - @property - def buf(self) -> memoryview | None: ... - @property - def name(self) -> str: ... - @property - def size(self) -> int: ... - def close(self) -> None: ... - def unlink(self) -> None: ... - def __del__(self) -> None: ... - -class ShareableList(Generic[_SLT]): - shm: SharedMemory - - @overload - def __init__(self, sequence: None = None, *, name: str | None = None) -> None: ... - @overload - def __init__(self, sequence: Iterable[_SLT], *, name: str | None = None) -> None: ... - - def __getitem__(self, position: int) -> _SLT: ... - def __setitem__(self, position: int, value: _SLT) -> None: ... - def __reduce__(self) -> tuple[Self, tuple[_SLT, ...]]: ... - def __len__(self) -> int: ... - @property - def format(self) -> str: ... - def count(self, value: _SLT) -> int: ... - def index(self, value: _SLT) -> int: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/sharedctypes.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/sharedctypes.vpi deleted file mode 100644 index 693fd2f7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/sharedctypes.vpi +++ /dev/null @@ -1,140 +0,0 @@ -import ctypes -from _ctypes import _CData -from collections.abc import Callable, Iterable, Sequence -from ctypes import _SimpleCData, c_char -from multiprocessing.context import BaseContext -from multiprocessing.synchronize import _LockLike -from types import TracebackType -from typing import Any, Generic, Literal, Protocol, SupportsIndex, TypeVar, overload, type_check_only - -__all__ = ["RawValue", "RawArray", "Value", "Array", "copy", "synchronized"] - -_T = TypeVar("_T") -_CT = TypeVar("_CT", bound=_CData) - -@overload -def RawValue(typecode_or_type: type[_CT], *args: Any) -> _CT: ... -@overload -def RawValue(typecode_or_type: str, *args: Any) -> Any: ... - -@overload -def RawArray(typecode_or_type: type[_CT], size_or_initializer: int | Sequence[Any]) -> ctypes.Array[_CT]: ... -@overload -def RawArray(typecode_or_type: str, size_or_initializer: int | Sequence[Any]) -> Any: ... - -@overload -def Value(typecode_or_type: type[_CT], *args: Any, lock: Literal[False], ctx: BaseContext | None = None) -> _CT: ... -@overload -def Value( - typecode_or_type: type[_CT], *args: Any, lock: Literal[True] | _LockLike = True, ctx: BaseContext | None = None -) -> SynchronizedBase[_CT]: ... -@overload -def Value( - typecode_or_type: str, *args: Any, lock: Literal[True] | _LockLike = True, ctx: BaseContext | None = None -) -> SynchronizedBase[Any]: ... -@overload -def Value( - typecode_or_type: str | type[_CData], *args: Any, lock: bool | _LockLike = True, ctx: BaseContext | None = None -) -> Any: ... - -@overload -def Array( - typecode_or_type: type[_CT], size_or_initializer: int | Sequence[Any], *, lock: Literal[False], ctx: BaseContext | None = None -) -> _CT: ... -@overload -def Array( - typecode_or_type: type[c_char], - size_or_initializer: int | Sequence[Any], - *, - lock: Literal[True] | _LockLike = True, - ctx: BaseContext | None = None, -) -> SynchronizedString: ... -@overload -def Array( - typecode_or_type: type[_SimpleCData[_T]], - size_or_initializer: int | Sequence[Any], - *, - lock: Literal[True] | _LockLike = True, - ctx: BaseContext | None = None, -) -> SynchronizedArray[_T]: ... -@overload -def Array( - typecode_or_type: str, - size_or_initializer: int | Sequence[Any], - *, - lock: Literal[True] | _LockLike = True, - ctx: BaseContext | None = None, -) -> SynchronizedArray[Any]: ... -@overload -def Array( - typecode_or_type: str | type[_CData], - size_or_initializer: int | Sequence[Any], - *, - lock: bool | _LockLike = True, - ctx: BaseContext | None = None, -) -> Any: ... - -def copy(obj: _CT) -> _CT: ... - -@overload -def synchronized(obj: _SimpleCData[_T], lock: _LockLike | None = None, ctx: Any | None = None) -> Synchronized[_T]: ... -@overload -def synchronized(obj: ctypes.Array[c_char], lock: _LockLike | None = None, ctx: Any | None = None) -> SynchronizedString: ... -@overload -def synchronized( - obj: ctypes.Array[_SimpleCData[_T]], lock: _LockLike | None = None, ctx: Any | None = None -) -> SynchronizedArray[_T]: ... -@overload -def synchronized(obj: _CT, lock: _LockLike | None = None, ctx: Any | None = None) -> SynchronizedBase[_CT]: ... - -@type_check_only -class _AcquireFunc(Protocol): - def __call__(self, block: bool = ..., timeout: float | None = ..., /) -> bool: ... - -class SynchronizedBase(Generic[_CT]): - acquire: _AcquireFunc - release: Callable[[], None] - def __init__(self, obj: Any, lock: _LockLike | None = None, ctx: Any | None = None) -> None: ... - def __reduce__(self) -> tuple[Callable[[Any, _LockLike], SynchronizedBase[Any]], tuple[Any, _LockLike]]: ... - def get_obj(self) -> _CT: ... - def get_lock(self) -> _LockLike: ... - def __enter__(self) -> bool: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, / - ) -> None: ... - -class Synchronized(SynchronizedBase[_SimpleCData[_T]], Generic[_T]): - value: _T - -class SynchronizedArray(SynchronizedBase[ctypes.Array[_SimpleCData[_T]]], Generic[_T]): - def __len__(self) -> int: ... - - @overload - def __getitem__(self, i: slice[SupportsIndex | None]) -> list[_T]: ... - @overload - def __getitem__(self, i: SupportsIndex) -> _T: ... - - @overload - def __setitem__(self, i: slice[SupportsIndex | None], value: Iterable[_T]) -> None: ... - @overload - def __setitem__(self, i: SupportsIndex, value: _T) -> None: ... - - def __getslice__(self, start: SupportsIndex, stop: SupportsIndex) -> list[_T]: ... - def __setslice__(self, start: SupportsIndex, stop: SupportsIndex, values: Iterable[_T]) -> None: ... - -class SynchronizedString(SynchronizedArray[bytes]): - @overload # type: ignore[override] - def __getitem__(self, i: slice[SupportsIndex | None]) -> bytes: ... - @overload - def __getitem__(self, i: SupportsIndex) -> bytes: ... - - @overload # type: ignore[override] - def __setitem__(self, i: slice[SupportsIndex | None], value: bytes) -> None: ... - @overload - def __setitem__(self, i: SupportsIndex, value: bytes) -> None: ... - - def __getslice__(self, start: SupportsIndex, stop: SupportsIndex) -> bytes: ... # type: ignore[override] - def __setslice__(self, start: SupportsIndex, stop: SupportsIndex, values: bytes) -> None: ... # type: ignore[override] - - value: bytes - raw: bytes diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/spawn.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/spawn.vpi deleted file mode 100644 index 4a975322..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/spawn.vpi +++ /dev/null @@ -1,32 +0,0 @@ -from collections.abc import Mapping, Sequence -from types import ModuleType -from typing import Any, Final - -__all__ = [ - "_main", - "freeze_support", - "set_executable", - "get_executable", - "get_preparation_data", - "get_command_line", - "import_main_path", -] - -WINEXE: Final[bool] -WINSERVICE: Final[bool] - -def set_executable(exe: str) -> None: ... -def get_executable() -> str: ... -def is_forking(argv: Sequence[str]) -> bool: ... -def freeze_support() -> None: ... -def get_command_line(**kwds: Any) -> list[str]: ... -def spawn_main(pipe_handle: int, parent_pid: int | None = None, tracker_fd: int | None = None) -> None: ... - -# undocumented -def _main(fd: int, parent_sentinel: int) -> int: ... -def get_preparation_data(name: str) -> dict[str, Any]: ... - -old_main_modules: list[ModuleType] - -def prepare(data: Mapping[str, Any]) -> None: ... -def import_main_path(main_path: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/synchronize.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/synchronize.vpi deleted file mode 100644 index 889e71c0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/synchronize.vpi +++ /dev/null @@ -1,63 +0,0 @@ -import sys -import threading -from collections.abc import Callable -from multiprocessing.context import BaseContext -from types import TracebackType -from typing import TypeAlias - -__all__ = ["Lock", "RLock", "Semaphore", "BoundedSemaphore", "Condition", "Event"] - -_LockLike: TypeAlias = Lock | RLock - -class Barrier(threading.Barrier): - def __init__( - self, parties: int, action: Callable[[], object] | None = None, timeout: float | None = None, *, ctx: BaseContext - ) -> None: ... - -class Condition: - def __init__(self, lock: _LockLike | None = None, *, ctx: BaseContext) -> None: ... - def notify(self, n: int = 1) -> None: ... - def notify_all(self) -> None: ... - def wait(self, timeout: float | None = None) -> bool: ... - def wait_for(self, predicate: Callable[[], bool], timeout: float | None = None) -> bool: ... - def __enter__(self) -> bool: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, / - ) -> None: ... - # These methods are copied from the lock passed to the constructor, or an - # instance of ctx.RLock() if lock was None. - def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ... - def release(self) -> None: ... - -class Event: - def __init__(self, *, ctx: BaseContext) -> None: ... - def is_set(self) -> bool: ... - def set(self) -> None: ... - def clear(self) -> None: ... - def wait(self, timeout: float | None = None) -> bool: ... - -# Not part of public API -class SemLock: - def __init__(self, kind: int, value: int, maxvalue: int, *, ctx: BaseContext | None) -> None: ... - def __enter__(self) -> bool: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, / - ) -> None: ... - # These methods are copied from the wrapped _multiprocessing.SemLock object - def acquire(self, block: bool = True, timeout: float | None = None) -> bool: ... - def release(self) -> None: ... - if sys.version_info >= (3, 14): - def locked(self) -> bool: ... - -class Lock(SemLock): - def __init__(self, *, ctx: BaseContext) -> None: ... - -class RLock(SemLock): - def __init__(self, *, ctx: BaseContext) -> None: ... - -class Semaphore(SemLock): - def __init__(self, value: int = 1, *, ctx: BaseContext) -> None: ... - def get_value(self) -> int: ... - -class BoundedSemaphore(Semaphore): - def __init__(self, value: int = 1, *, ctx: BaseContext) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/util.vpi deleted file mode 100644 index 5eb31de7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/multiprocessing/util.vpi +++ /dev/null @@ -1,109 +0,0 @@ -import sys -import threading -from _typeshed import ConvertibleToInt, Incomplete, Unused -from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence -from logging import Logger, _Level as _LoggingLevel -from typing import Any, Final, Generic, TypeVar, overload - -__all__ = [ - "sub_debug", - "debug", - "info", - "sub_warning", - "get_logger", - "log_to_stderr", - "get_temp_dir", - "register_after_fork", - "is_exiting", - "Finalize", - "ForkAwareThreadLock", - "ForkAwareLocal", - "close_all_fds_except", - "SUBDEBUG", - "SUBWARNING", -] - -if sys.version_info >= (3, 14): - __all__ += ["warn"] - -_T = TypeVar("_T") -_R_co = TypeVar("_R_co", default=Any, covariant=True) - -NOTSET: Final = 0 -SUBDEBUG: Final = 5 -DEBUG: Final = 10 -INFO: Final = 20 -SUBWARNING: Final = 25 -if sys.version_info >= (3, 14): - WARNING: Final = 30 - -LOGGER_NAME: Final[str] -DEFAULT_LOGGING_FORMAT: Final[str] - -def sub_debug(msg: object, *args: object) -> None: ... -def debug(msg: object, *args: object) -> None: ... -def info(msg: object, *args: object) -> None: ... - -if sys.version_info >= (3, 14): - def warn(msg: object, *args: object) -> None: ... - -def sub_warning(msg: object, *args: object) -> None: ... -def get_logger() -> Logger: ... -def log_to_stderr(level: _LoggingLevel | None = None) -> Logger: ... -def is_abstract_socket_namespace(address: str | bytes | None) -> bool: ... - -abstract_sockets_supported: Final[bool] - -def get_temp_dir() -> str: ... -def register_after_fork(obj: _T, func: Callable[[_T], object]) -> None: ... - -class Finalize(Generic[_R_co]): - # "args" and "kwargs" are passed as arguments to "callback". - @overload - def __init__( - self, - obj: None, - callback: Callable[..., _R_co], - *, - args: Sequence[Any] = (), - kwargs: Mapping[str, Any] | None = None, - exitpriority: int, - ) -> None: ... - @overload - def __init__( - self, obj: None, callback: Callable[..., _R_co], args: Sequence[Any], kwargs: Mapping[str, Any] | None, exitpriority: int - ) -> None: ... - @overload - def __init__( - self, - obj: Any, - callback: Callable[..., _R_co], - args: Sequence[Any] = (), - kwargs: Mapping[str, Any] | None = None, - exitpriority: int | None = None, - ) -> None: ... - - def __call__( - self, - wr: Unused = None, - _finalizer_registry: MutableMapping[Incomplete, Incomplete] = {}, - sub_debug: Callable[..., object] = ..., - getpid: Callable[[], int] = ..., - ) -> _R_co: ... - def cancel(self) -> None: ... - def still_active(self) -> bool: ... - -def is_exiting() -> bool: ... - -class ForkAwareThreadLock: - acquire: Callable[[bool, float], bool] - release: Callable[[], None] - def __enter__(self) -> bool: ... - def __exit__(self, *args: Unused) -> None: ... - -class ForkAwareLocal(threading.local): ... - -MAXFD: Final[int] - -def close_all_fds_except(fds: Iterable[int]) -> None: ... -def spawnv_passfds(path: bytes, args: Sequence[ConvertibleToInt], passfds: Sequence[int]) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/netrc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/netrc.vpi deleted file mode 100644 index 4b7035c3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/netrc.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from typing import TypeAlias - -__all__ = ["netrc", "NetrcParseError"] - -class NetrcParseError(Exception): - filename: str | None - lineno: int | None - msg: str - def __init__(self, msg: str, filename: StrOrBytesPath | None = None, lineno: int | None = None) -> None: ... - -# (login, account, password) tuple -if sys.version_info >= (3, 11): - _NetrcTuple: TypeAlias = tuple[str, str, str] -else: - _NetrcTuple: TypeAlias = tuple[str, str | None, str | None] - -class netrc: - hosts: dict[str, _NetrcTuple] - macros: dict[str, list[str]] - def __init__(self, file: StrOrBytesPath | None = None) -> None: ... - def authenticators(self, host: str) -> _NetrcTuple | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/nis.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/nis.vpi deleted file mode 100644 index 10eef233..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/nis.vpi +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -if sys.platform != "win32": - def cat(map: str, domain: str = ...) -> dict[str, str]: ... - def get_default_domain() -> str: ... - def maps(domain: str = ...) -> list[str]: ... - def match(key: str, map: str, domain: str = ...) -> str: ... - - class error(Exception): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/nntplib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/nntplib.vpi deleted file mode 100644 index 50b633ce..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/nntplib.vpi +++ /dev/null @@ -1,120 +0,0 @@ -import datetime -import socket -import ssl -from _typeshed import Unused -from builtins import list as _list # conflicts with a method named "list" -from collections.abc import Iterable -from typing import IO, Any, Final, NamedTuple, TypeAlias -from typing_extensions import Self - -__all__ = [ - "NNTP", - "NNTPError", - "NNTPReplyError", - "NNTPTemporaryError", - "NNTPPermanentError", - "NNTPProtocolError", - "NNTPDataError", - "decode_header", - "NNTP_SSL", -] - -_File: TypeAlias = IO[bytes] | bytes | str | None - -class NNTPError(Exception): - response: str - -class NNTPReplyError(NNTPError): ... -class NNTPTemporaryError(NNTPError): ... -class NNTPPermanentError(NNTPError): ... -class NNTPProtocolError(NNTPError): ... -class NNTPDataError(NNTPError): ... - -NNTP_PORT: Final = 119 -NNTP_SSL_PORT: Final = 563 - -class GroupInfo(NamedTuple): - group: str - last: str - first: str - flag: str - -class ArticleInfo(NamedTuple): - number: int - message_id: str - lines: list[bytes] - -def decode_header(header_str: str) -> str: ... - -class NNTP: - encoding: str - errors: str - - host: str - port: int - sock: socket.socket - file: IO[bytes] - debugging: int - welcome: str - readermode_afterauth: bool - tls_on: bool - authenticated: bool - nntp_implementation: str - nntp_version: int - def __init__( - self, - host: str, - port: int = 119, - user: str | None = None, - password: str | None = None, - readermode: bool | None = None, - usenetrc: bool = False, - timeout: float = ..., - ) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def getwelcome(self) -> str: ... - def getcapabilities(self) -> dict[str, _list[str]]: ... - def set_debuglevel(self, level: int) -> None: ... - def debug(self, level: int) -> None: ... - def capabilities(self) -> tuple[str, dict[str, _list[str]]]: ... - def newgroups(self, date: datetime.date | datetime.datetime, *, file: _File = None) -> tuple[str, _list[str]]: ... - def newnews(self, group: str, date: datetime.date | datetime.datetime, *, file: _File = None) -> tuple[str, _list[str]]: ... - def list(self, group_pattern: str | None = None, *, file: _File = None) -> tuple[str, _list[str]]: ... - def description(self, group: str) -> str: ... - def descriptions(self, group_pattern: str) -> tuple[str, dict[str, str]]: ... - def group(self, name: str) -> tuple[str, int, int, int, str]: ... - def help(self, *, file: _File = None) -> tuple[str, _list[str]]: ... - def stat(self, message_spec: Any = None) -> tuple[str, int, str]: ... - def next(self) -> tuple[str, int, str]: ... - def last(self) -> tuple[str, int, str]: ... - def head(self, message_spec: Any = None, *, file: _File = None) -> tuple[str, ArticleInfo]: ... - def body(self, message_spec: Any = None, *, file: _File = None) -> tuple[str, ArticleInfo]: ... - def article(self, message_spec: Any = None, *, file: _File = None) -> tuple[str, ArticleInfo]: ... - def slave(self) -> str: ... - def xhdr(self, hdr: str, str: Any, *, file: _File = None) -> tuple[str, _list[str]]: ... - def xover(self, start: int, end: int, *, file: _File = None) -> tuple[str, _list[tuple[int, dict[str, str]]]]: ... - def over( - self, message_spec: None | str | _list[Any] | tuple[Any, ...], *, file: _File = None - ) -> tuple[str, _list[tuple[int, dict[str, str]]]]: ... - def date(self) -> tuple[str, datetime.datetime]: ... - def post(self, data: bytes | Iterable[bytes]) -> str: ... - def ihave(self, message_id: Any, data: bytes | Iterable[bytes]) -> str: ... - def quit(self) -> str: ... - def login(self, user: str | None = None, password: str | None = None, usenetrc: bool = True) -> None: ... - def starttls(self, context: ssl.SSLContext | None = None) -> None: ... - -class NNTP_SSL(NNTP): - ssl_context: ssl.SSLContext | None - sock: ssl.SSLSocket - def __init__( - self, - host: str, - port: int = 563, - user: str | None = None, - password: str | None = None, - ssl_context: ssl.SSLContext | None = None, - readermode: bool | None = None, - usenetrc: bool = False, - timeout: float = ..., - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/nt.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/nt.vpi deleted file mode 100644 index 0c87444d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/nt.vpi +++ /dev/null @@ -1,116 +0,0 @@ -import sys - -if sys.platform == "win32": - # Actually defined here and re-exported from os at runtime, - # but this leads to less code duplication - from os import ( - F_OK as F_OK, - O_APPEND as O_APPEND, - O_BINARY as O_BINARY, - O_CREAT as O_CREAT, - O_EXCL as O_EXCL, - O_NOINHERIT as O_NOINHERIT, - O_RANDOM as O_RANDOM, - O_RDONLY as O_RDONLY, - O_RDWR as O_RDWR, - O_SEQUENTIAL as O_SEQUENTIAL, - O_SHORT_LIVED as O_SHORT_LIVED, - O_TEMPORARY as O_TEMPORARY, - O_TEXT as O_TEXT, - O_TRUNC as O_TRUNC, - O_WRONLY as O_WRONLY, - P_DETACH as P_DETACH, - P_NOWAIT as P_NOWAIT, - P_NOWAITO as P_NOWAITO, - P_OVERLAY as P_OVERLAY, - P_WAIT as P_WAIT, - R_OK as R_OK, - TMP_MAX as TMP_MAX, - W_OK as W_OK, - X_OK as X_OK, - DirEntry as DirEntry, - abort as abort, - access as access, - chdir as chdir, - chmod as chmod, - close as close, - closerange as closerange, - cpu_count as cpu_count, - device_encoding as device_encoding, - dup as dup, - dup2 as dup2, - error as error, - execv as execv, - execve as execve, - fspath as fspath, - fstat as fstat, - fsync as fsync, - ftruncate as ftruncate, - get_handle_inheritable as get_handle_inheritable, - get_inheritable as get_inheritable, - get_terminal_size as get_terminal_size, - getcwd as getcwd, - getcwdb as getcwdb, - getlogin as getlogin, - getpid as getpid, - getppid as getppid, - isatty as isatty, - kill as kill, - link as link, - listdir as listdir, - lseek as lseek, - lstat as lstat, - mkdir as mkdir, - open as open, - pipe as pipe, - putenv as putenv, - read as read, - readlink as readlink, - remove as remove, - rename as rename, - replace as replace, - rmdir as rmdir, - scandir as scandir, - set_handle_inheritable as set_handle_inheritable, - set_inheritable as set_inheritable, - spawnv as spawnv, - spawnve as spawnve, - startfile as startfile, - stat as stat, - stat_result as stat_result, - statvfs_result as statvfs_result, - strerror as strerror, - symlink as symlink, - system as system, - terminal_size as terminal_size, - times as times, - times_result as times_result, - truncate as truncate, - umask as umask, - uname_result as uname_result, - unlink as unlink, - unsetenv as unsetenv, - urandom as urandom, - utime as utime, - waitpid as waitpid, - waitstatus_to_exitcode as waitstatus_to_exitcode, - write as write, - ) - - if sys.version_info >= (3, 11): - from os import EX_OK as EX_OK - if sys.version_info >= (3, 12): - from os import ( - get_blocking as get_blocking, - listdrives as listdrives, - listmounts as listmounts, - listvolumes as listvolumes, - set_blocking as set_blocking, - ) - if sys.version_info >= (3, 13): - from os import fchmod as fchmod, lchmod as lchmod - - if sys.version_info >= (3, 14): - from os import readinto as readinto - - environ: dict[str, str] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ntpath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ntpath.vpi deleted file mode 100644 index c912d771..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ntpath.vpi +++ /dev/null @@ -1,134 +0,0 @@ -import sys -from _typeshed import BytesPath, StrOrBytesPath, StrPath -from genericpath import ( - ALLOW_MISSING as ALLOW_MISSING, - _AllowMissingType, - commonprefix as commonprefix, - exists as exists, - getatime as getatime, - getctime as getctime, - getmtime as getmtime, - getsize as getsize, - isdir as isdir, - isfile as isfile, - samefile as samefile, - sameopenfile as sameopenfile, - samestat as samestat, -) -from os import PathLike - -# Re-export common definitions from posixpath to reduce duplication -from posixpath import ( - abspath as abspath, - basename as basename, - commonpath as commonpath, - curdir as curdir, - defpath as defpath, - devnull as devnull, - dirname as dirname, - expanduser as expanduser, - expandvars as expandvars, - extsep as extsep, - isabs as isabs, - islink as islink, - ismount as ismount, - lexists as lexists, - normcase as normcase, - normpath as normpath, - pardir as pardir, - pathsep as pathsep, - relpath as relpath, - sep as sep, - split as split, - splitdrive as splitdrive, - splitext as splitext, - supports_unicode_filenames as supports_unicode_filenames, -) -from typing import AnyStr, overload -from typing_extensions import LiteralString - -if sys.version_info >= (3, 12): - from posixpath import isjunction as isjunction, splitroot as splitroot -if sys.version_info >= (3, 13): - from genericpath import isdevdrive as isdevdrive -if sys.version_info >= (3, 15): - from genericpath import ALL_BUT_LAST as ALL_BUT_LAST - -__all__ = [ - "normcase", - "isabs", - "join", - "splitdrive", - "split", - "splitext", - "basename", - "dirname", - "commonprefix", - "getsize", - "getmtime", - "getatime", - "getctime", - "islink", - "exists", - "lexists", - "isdir", - "isfile", - "ismount", - "expanduser", - "expandvars", - "normpath", - "abspath", - "curdir", - "pardir", - "sep", - "pathsep", - "defpath", - "altsep", - "extsep", - "devnull", - "realpath", - "supports_unicode_filenames", - "relpath", - "samefile", - "sameopenfile", - "samestat", - "commonpath", - "ALLOW_MISSING", -] -if sys.version_info >= (3, 12): - __all__ += ["isjunction", "splitroot"] -if sys.version_info >= (3, 13): - __all__ += ["isdevdrive", "isreserved"] -if sys.version_info >= (3, 15): - __all__ += ["ALL_BUT_LAST"] - -altsep: LiteralString - -# First parameter is not actually pos-only, -# but must be defined as pos-only in the stub or cross-platform code doesn't type-check, -# as the parameter name is different in posixpath.join() -@overload -def join(path: LiteralString, /, *paths: LiteralString) -> LiteralString: ... -@overload -def join(path: StrPath, /, *paths: StrPath) -> str: ... -@overload -def join(path: BytesPath, /, *paths: BytesPath) -> bytes: ... - -if sys.version_info >= (3, 15): - @overload - def realpath(path: PathLike[AnyStr], /, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - @overload - def realpath(path: AnyStr, /, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - -else: - if sys.platform == "win32": - @overload - def realpath(path: PathLike[AnyStr], *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - @overload - def realpath(path: AnyStr, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - - else: - realpath = abspath - -if sys.version_info >= (3, 13): - def isreserved(path: StrOrBytesPath) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/nturl2path.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/nturl2path.vpi deleted file mode 100644 index 98686ed6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/nturl2path.vpi +++ /dev/null @@ -1,6 +0,0 @@ -from typing_extensions import deprecated - -@deprecated("The `nturl2path` module is deprecated since Python 3.14.") -def url2pathname(url: str) -> str: ... -@deprecated("The `nturl2path` module is deprecated since Python 3.14.") -def pathname2url(p: str) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/numbers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/numbers.vpi deleted file mode 100644 index 434e52c4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/numbers.vpi +++ /dev/null @@ -1,220 +0,0 @@ -# Note: these stubs are incomplete. The more complex type -# signatures are currently omitted. -# -# Use _ComplexLike, _RealLike and _IntegralLike for return types in this module -# rather than `numbers.Complex`, `numbers.Real` and `numbers.Integral`, -# to avoid an excessive number of `type: ignore`s in subclasses of these ABCs -# (since type checkers don't see `complex` as a subtype of `numbers.Complex`, -# nor `float` as a subtype of `numbers.Real`, etc.) - -from abc import ABCMeta, abstractmethod -from typing import ClassVar, Literal, Protocol, overload, type_check_only - -__all__ = ["Number", "Complex", "Real", "Rational", "Integral"] - -############################ -# Protocols for return types -############################ - -# `_ComplexLike` is a structural-typing approximation -# of the `Complex` ABC, which is not (and cannot be) a protocol -# -# NOTE: We can't include `__complex__` here, -# as we want `int` to be seen as a subtype of `_ComplexLike`, -# and `int.__complex__` does not exist :( -@type_check_only -class _ComplexLike(Protocol): - def __neg__(self) -> _ComplexLike: ... - def __pos__(self) -> _ComplexLike: ... - def __abs__(self) -> _RealLike: ... - -# _RealLike is a structural-typing approximation -# of the `Real` ABC, which is not (and cannot be) a protocol -@type_check_only -class _RealLike(_ComplexLike, Protocol): - def __trunc__(self) -> _IntegralLike: ... - def __floor__(self) -> _IntegralLike: ... - def __ceil__(self) -> _IntegralLike: ... - def __float__(self) -> float: ... - # Overridden from `_ComplexLike` - # for a more precise return type: - def __neg__(self) -> _RealLike: ... - def __pos__(self) -> _RealLike: ... - -# _IntegralLike is a structural-typing approximation -# of the `Integral` ABC, which is not (and cannot be) a protocol -@type_check_only -class _IntegralLike(_RealLike, Protocol): - def __invert__(self) -> _IntegralLike: ... - def __int__(self) -> int: ... - def __index__(self) -> int: ... - # Overridden from `_ComplexLike` - # for a more precise return type: - def __abs__(self) -> _IntegralLike: ... - # Overridden from `RealLike` - # for a more precise return type: - def __neg__(self) -> _IntegralLike: ... - def __pos__(self) -> _IntegralLike: ... - -################# -# Module "proper" -################# - -class Number(metaclass=ABCMeta): - __slots__ = () - @abstractmethod - def __hash__(self) -> int: ... - -# See comment at the top of the file -# for why some of these return types are purposefully vague -class Complex(Number, _ComplexLike): - __slots__ = () - @abstractmethod - def __complex__(self) -> complex: ... - def __bool__(self) -> bool: ... - @property - @abstractmethod - def real(self) -> _RealLike: ... - @property - @abstractmethod - def imag(self) -> _RealLike: ... - @abstractmethod - def __add__(self, other) -> _ComplexLike: ... - @abstractmethod - def __radd__(self, other) -> _ComplexLike: ... - @abstractmethod - def __neg__(self) -> _ComplexLike: ... - @abstractmethod - def __pos__(self) -> _ComplexLike: ... - def __sub__(self, other) -> _ComplexLike: ... - def __rsub__(self, other) -> _ComplexLike: ... - @abstractmethod - def __mul__(self, other) -> _ComplexLike: ... - @abstractmethod - def __rmul__(self, other) -> _ComplexLike: ... - @abstractmethod - def __truediv__(self, other) -> _ComplexLike: ... - @abstractmethod - def __rtruediv__(self, other) -> _ComplexLike: ... - @abstractmethod - def __pow__(self, exponent) -> _ComplexLike: ... - @abstractmethod - def __rpow__(self, base) -> _ComplexLike: ... - @abstractmethod - def __abs__(self) -> _RealLike: ... - @abstractmethod - def conjugate(self) -> _ComplexLike: ... - @abstractmethod - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -# See comment at the top of the file -# for why some of these return types are purposefully vague -class Real(Complex, _RealLike): - __slots__ = () - @abstractmethod - def __float__(self) -> float: ... - @abstractmethod - def __trunc__(self) -> _IntegralLike: ... - @abstractmethod - def __floor__(self) -> _IntegralLike: ... - @abstractmethod - def __ceil__(self) -> _IntegralLike: ... - - @abstractmethod - @overload - def __round__(self, ndigits: None = None) -> _IntegralLike: ... - @abstractmethod - @overload - def __round__(self, ndigits: int) -> _RealLike: ... - - def __divmod__(self, other) -> tuple[_RealLike, _RealLike]: ... - def __rdivmod__(self, other) -> tuple[_RealLike, _RealLike]: ... - @abstractmethod - def __floordiv__(self, other) -> _RealLike: ... - @abstractmethod - def __rfloordiv__(self, other) -> _RealLike: ... - @abstractmethod - def __mod__(self, other) -> _RealLike: ... - @abstractmethod - def __rmod__(self, other) -> _RealLike: ... - @abstractmethod - def __lt__(self, other) -> bool: ... - @abstractmethod - def __le__(self, other) -> bool: ... - def __complex__(self) -> complex: ... - @property - def real(self) -> _RealLike: ... - @property - def imag(self) -> Literal[0]: ... - def conjugate(self) -> _RealLike: ... - # Not actually overridden at runtime, - # but we override these in the stub to give them more precise return types: - @abstractmethod - def __pos__(self) -> _RealLike: ... - @abstractmethod - def __neg__(self) -> _RealLike: ... - -# See comment at the top of the file -# for why some of these return types are purposefully vague -class Rational(Real): - __slots__ = () - @property - @abstractmethod - def numerator(self) -> _IntegralLike: ... - @property - @abstractmethod - def denominator(self) -> _IntegralLike: ... - def __float__(self) -> float: ... - -# See comment at the top of the file -# for why some of these return types are purposefully vague -class Integral(Rational, _IntegralLike): - __slots__ = () - @abstractmethod - def __int__(self) -> int: ... - def __index__(self) -> int: ... - @abstractmethod - def __pow__(self, exponent, modulus=None) -> _IntegralLike: ... - @abstractmethod - def __lshift__(self, other) -> _IntegralLike: ... - @abstractmethod - def __rlshift__(self, other) -> _IntegralLike: ... - @abstractmethod - def __rshift__(self, other) -> _IntegralLike: ... - @abstractmethod - def __rrshift__(self, other) -> _IntegralLike: ... - @abstractmethod - def __and__(self, other) -> _IntegralLike: ... - @abstractmethod - def __rand__(self, other) -> _IntegralLike: ... - @abstractmethod - def __xor__(self, other) -> _IntegralLike: ... - @abstractmethod - def __rxor__(self, other) -> _IntegralLike: ... - @abstractmethod - def __or__(self, other) -> _IntegralLike: ... - @abstractmethod - def __ror__(self, other) -> _IntegralLike: ... - @abstractmethod - def __invert__(self) -> _IntegralLike: ... - def __float__(self) -> float: ... - @property - def numerator(self) -> _IntegralLike: ... - @property - def denominator(self) -> Literal[1]: ... - # Not actually overridden at runtime, - # but we override these in the stub to give them more precise return types: - @abstractmethod - def __pos__(self) -> _IntegralLike: ... - @abstractmethod - def __neg__(self) -> _IntegralLike: ... - @abstractmethod - def __abs__(self) -> _IntegralLike: ... - - @abstractmethod - @overload - def __round__(self, ndigits: None = None) -> _IntegralLike: ... - @abstractmethod - @overload - def __round__(self, ndigits: int) -> _IntegralLike: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/opcode.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/opcode.vpi deleted file mode 100644 index 3bc41db4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/opcode.vpi +++ /dev/null @@ -1,53 +0,0 @@ -import sys -from typing import Final, Literal - -if sys.version_info >= (3, 15): - from builtins import frozendict - -__all__ = [ - "cmp_op", - "hasconst", - "hasname", - "hasjrel", - "hasjabs", - "haslocal", - "hascompare", - "hasfree", - "opname", - "opmap", - "HAVE_ARGUMENT", - "EXTENDED_ARG", - "stack_effect", -] -if sys.version_info >= (3, 12): - __all__ += ["hasarg", "hasexc"] -else: - __all__ += ["hasnargs"] -if sys.version_info >= (3, 13): - __all__ += ["hasjump"] - -cmp_op: tuple[Literal["<"], Literal["<="], Literal["=="], Literal["!="], Literal[">"], Literal[">="]] -hasconst: Final[list[int]] -hasname: Final[list[int]] -hasjrel: Final[list[int]] -hasjabs: Final[list[int]] -haslocal: Final[list[int]] -hascompare: Final[list[int]] -hasfree: Final[list[int]] -if sys.version_info >= (3, 12): - hasarg: Final[list[int]] - hasexc: Final[list[int]] -else: - hasnargs: Final[list[int]] -if sys.version_info >= (3, 13): - hasjump: Final[list[int]] -opname: Final[list[str]] - -if sys.version_info >= (3, 15): - opmap: Final[frozendict[str, int]] -else: - opmap: Final[dict[str, int]] -HAVE_ARGUMENT: Final[int] -EXTENDED_ARG: Final[int] - -def stack_effect(opcode: int, oparg: int | None = None, /, *, jump: bool | None = None) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/optparse.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/optparse.vpi deleted file mode 100644 index 9e553661..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/optparse.vpi +++ /dev/null @@ -1,312 +0,0 @@ -import builtins -from _typeshed import MaybeNone, SupportsWrite -from abc import abstractmethod -from collections.abc import Callable, Iterable, Mapping, Sequence -from typing import Any, ClassVar, Final, Literal, NoReturn, overload -from typing_extensions import Self - -__all__ = [ - "Option", - "make_option", - "SUPPRESS_HELP", - "SUPPRESS_USAGE", - "Values", - "OptionContainer", - "OptionGroup", - "OptionParser", - "HelpFormatter", - "IndentedHelpFormatter", - "TitledHelpFormatter", - "OptParseError", - "OptionError", - "OptionConflictError", - "OptionValueError", - "BadOptionError", - "check_choice", -] -NO_DEFAULT: Final = ("NO", "DEFAULT") -SUPPRESS_HELP: Final = "SUPPRESSHELP" -SUPPRESS_USAGE: Final = "SUPPRESSUSAGE" - -# Can return complex, float, or int depending on the option's type -def check_builtin(option: Option, opt: str, value: str) -> complex: ... -def check_choice(option: Option, opt: str, value: str) -> str: ... - -class OptParseError(Exception): - msg: str - def __init__(self, msg: str) -> None: ... - -class BadOptionError(OptParseError): - opt_str: str - def __init__(self, opt_str: str) -> None: ... - -class AmbiguousOptionError(BadOptionError): - possibilities: Iterable[str] - def __init__(self, opt_str: str, possibilities: Sequence[str]) -> None: ... - -class OptionError(OptParseError): - option_id: str - def __init__(self, msg: str, option: Option) -> None: ... - -class OptionConflictError(OptionError): ... -class OptionValueError(OptParseError): ... - -class HelpFormatter: - NO_DEFAULT_VALUE: str - _long_opt_fmt: str - _short_opt_fmt: str - current_indent: int - default_tag: str - help_position: int - help_width: int | MaybeNone # initialized as None and computed later as int when storing option strings - indent_increment: int - level: int - max_help_position: int - option_strings: dict[Option, str] - parser: OptionParser - short_first: bool | Literal[0, 1] - width: int - def __init__( - self, indent_increment: int, max_help_position: int, width: int | None, short_first: bool | Literal[0, 1] - ) -> None: ... - def dedent(self) -> None: ... - def expand_default(self, option: Option) -> str: ... - def format_description(self, description: str | None) -> str: ... - def format_epilog(self, epilog: str | None) -> str: ... - @abstractmethod - def format_heading(self, heading: str) -> str: ... - def format_option(self, option: Option) -> str: ... - def format_option_strings(self, option: Option) -> str: ... - @abstractmethod - def format_usage(self, usage: str) -> str: ... - def indent(self) -> None: ... - def set_long_opt_delimiter(self, delim: str) -> None: ... - def set_parser(self, parser: OptionParser) -> None: ... - def set_short_opt_delimiter(self, delim: str) -> None: ... - def store_option_strings(self, parser: OptionParser) -> None: ... - -class IndentedHelpFormatter(HelpFormatter): - def __init__( - self, - indent_increment: int = 2, - max_help_position: int = 24, - width: int | None = None, - short_first: bool | Literal[0, 1] = 1, - ) -> None: ... - def format_heading(self, heading: str) -> str: ... - def format_usage(self, usage: str) -> str: ... - -class TitledHelpFormatter(HelpFormatter): - def __init__( - self, - indent_increment: int = 0, - max_help_position: int = 24, - width: int | None = None, - short_first: bool | Literal[0, 1] = 0, - ) -> None: ... - def format_heading(self, heading: str) -> str: ... - def format_usage(self, usage: str) -> str: ... - -class Option: - ACTIONS: tuple[str, ...] - ALWAYS_TYPED_ACTIONS: tuple[str, ...] - ATTRS: list[str] - CHECK_METHODS: list[Callable[[Self], object]] | None - CONST_ACTIONS: tuple[str, ...] - STORE_ACTIONS: tuple[str, ...] - TYPED_ACTIONS: tuple[str, ...] - TYPES: tuple[str, ...] - TYPE_CHECKER: dict[str, Callable[[Option, str, str], object]] - _long_opts: list[str] - _short_opts: list[str] - action: str - type: str | None - dest: str | None - default: Any # default can be "any" type - nargs: int - const: Any | None # const can be "any" type - choices: list[str] | tuple[str, ...] | None - # Callback args and kwargs cannot be expressed in Python's type system. - # Revisit if ParamSpec is ever changed to work with packed args/kwargs. - callback: Callable[..., object] | None - callback_args: tuple[Any, ...] | None - callback_kwargs: dict[str, Any] | None - help: str | None - metavar: str | None - def __init__( - self, - *opts: str | None, - # The following keywords are handled by the _set_attrs method. All default to - # `None` except for `default`, which defaults to `NO_DEFAULT`. - action: str | None = None, - type: str | builtins.type | None = None, - dest: str | None = None, - default: Any = ..., # = NO_DEFAULT - nargs: int | None = None, - const: Any | None = None, - choices: list[str] | tuple[str, ...] | None = None, - callback: Callable[..., object] | None = None, - callback_args: tuple[Any, ...] | None = None, - callback_kwargs: dict[str, Any] | None = None, - help: str | None = None, - metavar: str | None = None, - ) -> None: ... - def _check_action(self) -> None: ... - def _check_callback(self) -> None: ... - def _check_choice(self) -> None: ... - def _check_const(self) -> None: ... - def _check_dest(self) -> None: ... - def _check_nargs(self) -> None: ... - def _check_opt_strings(self, opts: Iterable[str | None]) -> list[str]: ... - def _check_type(self) -> None: ... - def _set_attrs(self, attrs: dict[str, Any]) -> None: ... # accepted attrs depend on the ATTRS attribute - def _set_opt_strings(self, opts: Iterable[str]) -> None: ... - def check_value(self, opt: str, value: str) -> Any: ... # return type cannot be known statically - def convert_value(self, opt: str, value: str | tuple[str, ...] | None) -> Any: ... # return type cannot be known statically - def get_opt_string(self) -> str: ... - def process(self, opt: str, value: str | tuple[str, ...] | None, values: Values, parser: OptionParser) -> int: ... - # value of take_action can be "any" type - def take_action(self, action: str, dest: str, opt: str, value: Any, values: Values, parser: OptionParser) -> int: ... - def takes_value(self) -> bool: ... - -make_option = Option - -class OptionContainer: - _long_opt: dict[str, Option] - _short_opt: dict[str, Option] - conflict_handler: str - defaults: dict[str, Any] # default values can be "any" type - description: str | None - option_class: type[Option] - def __init__( - self, option_class: type[Option], conflict_handler: Literal["error", "resolve"], description: str | None - ) -> None: ... - def _check_conflict(self, option: Option) -> None: ... - def _create_option_mappings(self) -> None: ... - def _share_option_mappings(self, parser: OptionParser) -> None: ... - - @overload - def add_option(self, opt: Option, /) -> Option: ... - @overload - def add_option( - self, - opt_str: str, - /, - *opts: str | None, - action: str | None = None, - type: str | builtins.type | None = None, - dest: str | None = None, - default: Any = ..., # = NO_DEFAULT - nargs: int | None = None, - const: Any | None = None, - choices: list[str] | tuple[str, ...] | None = None, - callback: Callable[..., object] | None = None, - callback_args: tuple[Any, ...] | None = None, - callback_kwargs: dict[str, Any] | None = None, - help: str | None = None, - metavar: str | None = None, - **kwargs: Any, # Allow arbitrary keyword arguments for user defined option_class - ) -> Option: ... - - def add_options(self, option_list: Iterable[Option]) -> None: ... - def destroy(self) -> None: ... - def format_option_help(self, formatter: HelpFormatter) -> str: ... - def format_description(self, formatter: HelpFormatter) -> str: ... - def format_help(self, formatter: HelpFormatter) -> str: ... - def get_description(self) -> str | None: ... - def get_option(self, opt_str: str) -> Option | None: ... - def has_option(self, opt_str: str) -> bool: ... - def remove_option(self, opt_str: str) -> None: ... - def set_conflict_handler(self, handler: Literal["error", "resolve"]) -> None: ... - def set_description(self, description: str | None) -> None: ... - -class OptionGroup(OptionContainer): - option_list: list[Option] - parser: OptionParser - title: str - def __init__(self, parser: OptionParser, title: str, description: str | None = None) -> None: ... - def _create_option_list(self) -> None: ... - def set_title(self, title: str) -> None: ... - -class Values: - def __init__(self, defaults: Mapping[str, object] | None = None) -> None: ... - def _update(self, dict: Mapping[str, object], mode: Literal["careful", "loose"]) -> None: ... - def _update_careful(self, dict: Mapping[str, object]) -> None: ... - def _update_loose(self, dict: Mapping[str, object]) -> None: ... - def ensure_value(self, attr: str, value: object) -> Any: ... # return type cannot be known statically - def read_file(self, filename: str, mode: Literal["careful", "loose"] = "careful") -> None: ... - def read_module(self, modname: str, mode: Literal["careful", "loose"] = "careful") -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - # __getattr__ doesn't exist, but anything passed as a default to __init__ - # is set on the instance. - def __getattr__(self, name: str) -> Any: ... - # TODO: mypy infers -> object for __getattr__ if __setattr__ has `value: object` - def __setattr__(self, name: str, value: Any, /) -> None: ... - def __eq__(self, other: object) -> bool: ... - -class OptionParser(OptionContainer): - allow_interspersed_args: bool - epilog: str | None - formatter: HelpFormatter - largs: list[str] | None - option_groups: list[OptionGroup] - option_list: list[Option] - process_default_values: bool - prog: str | None - rargs: list[str] | None - standard_option_list: list[Option] - usage: str | None - values: Values | None - version: str - def __init__( - self, - usage: str | None = None, - option_list: Iterable[Option] | None = None, - option_class: type[Option] = ..., - version: str | None = None, - conflict_handler: str = "error", - description: str | None = None, - formatter: HelpFormatter | None = None, - add_help_option: bool = True, - prog: str | None = None, - epilog: str | None = None, - ) -> None: ... - def _add_help_option(self) -> None: ... - def _add_version_option(self) -> None: ... - def _create_option_list(self) -> None: ... - def _get_all_options(self) -> list[Option]: ... - def _get_args(self, args: list[str] | None) -> list[str]: ... - def _init_parsing_state(self) -> None: ... - def _match_long_opt(self, opt: str) -> str: ... - def _populate_option_list(self, option_list: Iterable[Option] | None, add_help: bool = True) -> None: ... - def _process_args(self, largs: list[str], rargs: list[str], values: Values) -> None: ... - def _process_long_opt(self, rargs: list[str], values: Values) -> None: ... - def _process_short_opts(self, rargs: list[str], values: Values) -> None: ... - - @overload - def add_option_group(self, opt_group: OptionGroup, /) -> OptionGroup: ... - @overload - def add_option_group(self, title: str, /, description: str | None = None) -> OptionGroup: ... - - def check_values(self, values: Values, args: list[str]) -> tuple[Values, list[str]]: ... - def disable_interspersed_args(self) -> None: ... - def enable_interspersed_args(self) -> None: ... - def error(self, msg: str) -> NoReturn: ... - def exit(self, status: int = 0, msg: str | None = None) -> NoReturn: ... - def expand_prog_name(self, s: str) -> str: ... - def format_epilog(self, formatter: HelpFormatter) -> str: ... - def format_help(self, formatter: HelpFormatter | None = None) -> str: ... - def format_option_help(self, formatter: HelpFormatter | None = None) -> str: ... - def get_default_values(self) -> Values: ... - def get_option_group(self, opt_str: str) -> OptionGroup | None: ... - def get_prog_name(self) -> str: ... - def get_usage(self) -> str: ... - def get_version(self) -> str: ... - def parse_args(self, args: list[str] | None = None, values: Values | None = None) -> tuple[Values, list[str]]: ... - def print_usage(self, file: SupportsWrite[str] | None = None) -> None: ... - def print_help(self, file: SupportsWrite[str] | None = None) -> None: ... - def print_version(self, file: SupportsWrite[str] | None = None) -> None: ... - def set_default(self, dest: str, value: Any) -> None: ... # default value can be "any" type - def set_defaults(self, **kwargs: Any) -> None: ... # default values can be "any" type - def set_process_default_values(self, process: bool) -> None: ... - def set_usage(self, usage: str | None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ossaudiodev.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ossaudiodev.vpi deleted file mode 100644 index f8230b4f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ossaudiodev.vpi +++ /dev/null @@ -1,132 +0,0 @@ -import sys -from typing import Any, Final, Literal, overload - -if sys.platform != "win32" and sys.platform != "darwin": - # Depends on soundcard.h - AFMT_AC3: Final[int] - AFMT_A_LAW: Final[int] - AFMT_IMA_ADPCM: Final[int] - AFMT_MPEG: Final[int] - AFMT_MU_LAW: Final[int] - AFMT_QUERY: Final[int] - AFMT_S16_BE: Final[int] - AFMT_S16_LE: Final[int] - AFMT_S16_NE: Final[int] - AFMT_S8: Final[int] - AFMT_U16_BE: Final[int] - AFMT_U16_LE: Final[int] - AFMT_U8: Final[int] - SNDCTL_COPR_HALT: Final[int] - SNDCTL_COPR_LOAD: Final[int] - SNDCTL_COPR_RCODE: Final[int] - SNDCTL_COPR_RCVMSG: Final[int] - SNDCTL_COPR_RDATA: Final[int] - SNDCTL_COPR_RESET: Final[int] - SNDCTL_COPR_RUN: Final[int] - SNDCTL_COPR_SENDMSG: Final[int] - SNDCTL_COPR_WCODE: Final[int] - SNDCTL_COPR_WDATA: Final[int] - SNDCTL_DSP_BIND_CHANNEL: Final[int] - SNDCTL_DSP_CHANNELS: Final[int] - SNDCTL_DSP_GETBLKSIZE: Final[int] - SNDCTL_DSP_GETCAPS: Final[int] - SNDCTL_DSP_GETCHANNELMASK: Final[int] - SNDCTL_DSP_GETFMTS: Final[int] - SNDCTL_DSP_GETIPTR: Final[int] - SNDCTL_DSP_GETISPACE: Final[int] - SNDCTL_DSP_GETODELAY: Final[int] - SNDCTL_DSP_GETOPTR: Final[int] - SNDCTL_DSP_GETOSPACE: Final[int] - SNDCTL_DSP_GETSPDIF: Final[int] - SNDCTL_DSP_GETTRIGGER: Final[int] - SNDCTL_DSP_MAPINBUF: Final[int] - SNDCTL_DSP_MAPOUTBUF: Final[int] - SNDCTL_DSP_NONBLOCK: Final[int] - SNDCTL_DSP_POST: Final[int] - SNDCTL_DSP_PROFILE: Final[int] - SNDCTL_DSP_RESET: Final[int] - SNDCTL_DSP_SAMPLESIZE: Final[int] - SNDCTL_DSP_SETDUPLEX: Final[int] - SNDCTL_DSP_SETFMT: Final[int] - SNDCTL_DSP_SETFRAGMENT: Final[int] - SNDCTL_DSP_SETSPDIF: Final[int] - SNDCTL_DSP_SETSYNCRO: Final[int] - SNDCTL_DSP_SETTRIGGER: Final[int] - SNDCTL_DSP_SPEED: Final[int] - SNDCTL_DSP_STEREO: Final[int] - SNDCTL_DSP_SUBDIVIDE: Final[int] - SNDCTL_DSP_SYNC: Final[int] - SNDCTL_FM_4OP_ENABLE: Final[int] - SNDCTL_FM_LOAD_INSTR: Final[int] - SNDCTL_MIDI_INFO: Final[int] - SNDCTL_MIDI_MPUCMD: Final[int] - SNDCTL_MIDI_MPUMODE: Final[int] - SNDCTL_MIDI_PRETIME: Final[int] - SNDCTL_SEQ_CTRLRATE: Final[int] - SNDCTL_SEQ_GETINCOUNT: Final[int] - SNDCTL_SEQ_GETOUTCOUNT: Final[int] - SNDCTL_SEQ_GETTIME: Final[int] - SNDCTL_SEQ_NRMIDIS: Final[int] - SNDCTL_SEQ_NRSYNTHS: Final[int] - SNDCTL_SEQ_OUTOFBAND: Final[int] - SNDCTL_SEQ_PANIC: Final[int] - SNDCTL_SEQ_PERCMODE: Final[int] - SNDCTL_SEQ_RESET: Final[int] - SNDCTL_SEQ_RESETSAMPLES: Final[int] - SNDCTL_SEQ_SYNC: Final[int] - SNDCTL_SEQ_TESTMIDI: Final[int] - SNDCTL_SEQ_THRESHOLD: Final[int] - SNDCTL_SYNTH_CONTROL: Final[int] - SNDCTL_SYNTH_ID: Final[int] - SNDCTL_SYNTH_INFO: Final[int] - SNDCTL_SYNTH_MEMAVL: Final[int] - SNDCTL_SYNTH_REMOVESAMPLE: Final[int] - SNDCTL_TMR_CONTINUE: Final[int] - SNDCTL_TMR_METRONOME: Final[int] - SNDCTL_TMR_SELECT: Final[int] - SNDCTL_TMR_SOURCE: Final[int] - SNDCTL_TMR_START: Final[int] - SNDCTL_TMR_STOP: Final[int] - SNDCTL_TMR_TEMPO: Final[int] - SNDCTL_TMR_TIMEBASE: Final[int] - SOUND_MIXER_ALTPCM: Final[int] - SOUND_MIXER_BASS: Final[int] - SOUND_MIXER_CD: Final[int] - SOUND_MIXER_DIGITAL1: Final[int] - SOUND_MIXER_DIGITAL2: Final[int] - SOUND_MIXER_DIGITAL3: Final[int] - SOUND_MIXER_IGAIN: Final[int] - SOUND_MIXER_IMIX: Final[int] - SOUND_MIXER_LINE: Final[int] - SOUND_MIXER_LINE1: Final[int] - SOUND_MIXER_LINE2: Final[int] - SOUND_MIXER_LINE3: Final[int] - SOUND_MIXER_MIC: Final[int] - SOUND_MIXER_MONITOR: Final[int] - SOUND_MIXER_NRDEVICES: Final[int] - SOUND_MIXER_OGAIN: Final[int] - SOUND_MIXER_PCM: Final[int] - SOUND_MIXER_PHONEIN: Final[int] - SOUND_MIXER_PHONEOUT: Final[int] - SOUND_MIXER_RADIO: Final[int] - SOUND_MIXER_RECLEV: Final[int] - SOUND_MIXER_SPEAKER: Final[int] - SOUND_MIXER_SYNTH: Final[int] - SOUND_MIXER_TREBLE: Final[int] - SOUND_MIXER_VIDEO: Final[int] - SOUND_MIXER_VOLUME: Final[int] - - control_labels: list[str] - control_names: list[str] - - # TODO: oss_audio_device return type - @overload - def open(mode: Literal["r", "w", "rw"]) -> Any: ... - @overload - def open(device: str, mode: Literal["r", "w", "rw"]) -> Any: ... - - # TODO: oss_mixer_device return type - def openmixer(device: str = ...) -> Any: ... - - class OSSAudioError(Exception): ... - error = OSSAudioError diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/__init__.vpi deleted file mode 100644 index 7890d00b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/__init__.vpi +++ /dev/null @@ -1,358 +0,0 @@ -import sys -import types -from _typeshed import ( - OpenBinaryMode, - OpenBinaryModeReading, - OpenBinaryModeUpdating, - OpenBinaryModeWriting, - OpenTextMode, - ReadableBuffer, - StrOrBytesPath, - StrPath, - Unused, -) -from collections.abc import Callable, Generator, Iterator, Sequence -from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper -from os import PathLike, stat_result -from types import GenericAlias, TracebackType -from typing import IO, Any, BinaryIO, ClassVar, Literal, TypeVar, overload -from typing_extensions import Never, Self, deprecated - -_PathT = TypeVar("_PathT", bound=PurePath) - -__all__ = ["PurePath", "PurePosixPath", "PureWindowsPath", "Path", "PosixPath", "WindowsPath"] - -if sys.version_info >= (3, 14): - from pathlib.types import PathInfo - -if sys.version_info >= (3, 13): - __all__ += ["UnsupportedOperation"] - -class PurePath(PathLike[str]): - if sys.version_info < (3, 15): - if sys.version_info >= (3, 13): - __slots__ = ( - "_raw_paths", - "_drv", - "_root", - "_tail_cached", - "_str", - "_str_normcase_cached", - "_parts_normcase_cached", - "_hash", - ) - elif sys.version_info >= (3, 12): - __slots__ = ( - "_raw_paths", - "_drv", - "_root", - "_tail_cached", - "_str", - "_str_normcase_cached", - "_parts_normcase_cached", - "_lines_cached", - "_hash", - ) - else: - __slots__ = ("_drv", "_root", "_parts", "_str", "_hash", "_pparts", "_cached_cparts") - if sys.version_info >= (3, 13): - parser: ClassVar[types.ModuleType] - def full_match(self, pattern: StrPath, *, case_sensitive: bool | None = None) -> bool: ... - - @property - def parts(self) -> tuple[str, ...]: ... - @property - def drive(self) -> str: ... - @property - def root(self) -> str: ... - @property - def anchor(self) -> str: ... - @property - def name(self) -> str: ... - @property - def suffix(self) -> str: ... - @property - def suffixes(self) -> list[str]: ... - @property - def stem(self) -> str: ... - if sys.version_info >= (3, 12): - def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ... - def __init__(self, *args: StrPath) -> None: ... # viper: ignore[reportInconsistentConstructor] - else: - def __new__(cls, *args: StrPath) -> Self: ... - - def __hash__(self) -> int: ... - def __fspath__(self) -> str: ... - if sys.version_info >= (3, 15): - def __vfspath__(self) -> str: ... - - def __lt__(self, other: PurePath) -> bool: ... - def __le__(self, other: PurePath) -> bool: ... - def __gt__(self, other: PurePath) -> bool: ... - def __ge__(self, other: PurePath) -> bool: ... - def __truediv__(self, key: StrPath) -> Self: ... - def __rtruediv__(self, key: StrPath) -> Self: ... - def __bytes__(self) -> bytes: ... - def as_posix(self) -> str: ... - @deprecated("Deprecated since Python 3.14; will be removed in Python 3.19. Use `Path.as_uri()` instead.") - def as_uri(self) -> str: ... - def is_absolute(self) -> bool: ... - if sys.version_info < (3, 15): - if sys.version_info >= (3, 13): - @deprecated( - "Deprecated since Python 3.13; will be removed in Python 3.15. " - "Use `os.path.isreserved()` to detect reserved paths on Windows." - ) - def is_reserved(self) -> bool: ... - else: - def is_reserved(self) -> bool: ... - if sys.version_info >= (3, 14): - def is_relative_to(self, other: StrPath) -> bool: ... - else: - @overload - def is_relative_to(self, other: StrPath, /) -> bool: ... - @overload - @deprecated("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14.") - def is_relative_to(self, other: StrPath, /, *_deprecated: StrPath) -> bool: ... - - if sys.version_info >= (3, 12): - def match(self, path_pattern: str, *, case_sensitive: bool | None = None) -> bool: ... - else: - def match(self, path_pattern: str) -> bool: ... - - if sys.version_info >= (3, 14): - def relative_to(self, other: StrPath, *, walk_up: bool = False) -> Self: ... - elif sys.version_info >= (3, 12): - @overload - def relative_to(self, other: StrPath, /, *, walk_up: bool = False) -> Self: ... - @overload - @deprecated("Passing additional arguments is deprecated since Python 3.12; removed in Python 3.14.") - def relative_to(self, other: StrPath, /, *_deprecated: StrPath, walk_up: bool = False) -> Self: ... - else: - def relative_to(self, *other: StrPath) -> Self: ... - - def with_name(self, name: str) -> Self: ... - def with_stem(self, stem: str) -> Self: ... - def with_suffix(self, suffix: str) -> Self: ... - def joinpath(self, *other: StrPath) -> Self: ... - @property - def parents(self) -> Sequence[Self]: ... - @property - def parent(self) -> Self: ... - if sys.version_info < (3, 11): - def __class_getitem__(cls, type: Any) -> GenericAlias: ... - - if sys.version_info >= (3, 12): - def with_segments(self, *args: StrPath) -> Self: ... - -class PurePosixPath(PurePath): - __slots__ = () - -class PureWindowsPath(PurePath): - __slots__ = () - -class Path(PurePath): - if sys.version_info >= (3, 14): - __slots__ = ("_info",) - else: - __slots__ = () - - if sys.version_info >= (3, 12): - def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ... # viper: ignore[reportInconsistentConstructor] - else: - def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ... - - @classmethod - def cwd(cls) -> Self: ... - def stat(self, *, follow_symlinks: bool = True) -> stat_result: ... - def chmod(self, mode: int, *, follow_symlinks: bool = True) -> None: ... - - if sys.version_info >= (3, 13): - @classmethod - def from_uri(cls, uri: str) -> Self: ... - def is_dir(self, *, follow_symlinks: bool = True) -> bool: ... - def is_file(self, *, follow_symlinks: bool = True) -> bool: ... - def read_text(self, encoding: str | None = None, errors: str | None = None, newline: str | None = None) -> str: ... - else: - def __enter__(self) -> Self: ... - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - def is_dir(self) -> bool: ... - def is_file(self) -> bool: ... - def read_text(self, encoding: str | None = None, errors: str | None = None) -> str: ... - - if sys.version_info >= (3, 13): - def glob(self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False) -> Iterator[Self]: ... - def rglob( - self, pattern: str, *, case_sensitive: bool | None = None, recurse_symlinks: bool = False - ) -> Iterator[Self]: ... - elif sys.version_info >= (3, 12): - def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self]: ... - def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self]: ... - else: - def glob(self, pattern: str) -> Generator[Self]: ... - def rglob(self, pattern: str) -> Generator[Self]: ... - - if sys.version_info >= (3, 12): - def exists(self, *, follow_symlinks: bool = True) -> bool: ... - else: - def exists(self) -> bool: ... - - def is_symlink(self) -> bool: ... - def is_socket(self) -> bool: ... - def is_fifo(self) -> bool: ... - def is_block_device(self) -> bool: ... - def is_char_device(self) -> bool: ... - if sys.version_info >= (3, 12): - def is_junction(self) -> bool: ... - - def iterdir(self) -> Generator[Self]: ... - def lchmod(self, mode: int) -> None: ... - def lstat(self) -> stat_result: ... - if sys.version_info >= (3, 15): - def mkdir( - self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False, *, parent_mode: int | None = None - ) -> None: ... - else: - def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ... - - if sys.version_info >= (3, 14): - @property - def info(self) -> PathInfo: ... - - @overload - def move_into(self, target_dir: _PathT) -> _PathT: ... # type: ignore[overload-overlap] - @overload - def move_into(self, target_dir: StrPath) -> Self: ... # type: ignore[overload-overlap] - - @overload - def move(self, target: _PathT) -> _PathT: ... # type: ignore[overload-overlap] - @overload - def move(self, target: StrPath) -> Self: ... # type: ignore[overload-overlap] - - @overload - def copy_into(self, target_dir: _PathT, *, follow_symlinks: bool = True, preserve_metadata: bool = False) -> _PathT: ... # type: ignore[overload-overlap] - @overload - def copy_into(self, target_dir: StrPath, *, follow_symlinks: bool = True, preserve_metadata: bool = False) -> Self: ... # type: ignore[overload-overlap] - - @overload - def copy(self, target: _PathT, *, follow_symlinks: bool = True, preserve_metadata: bool = False) -> _PathT: ... # type: ignore[overload-overlap] - @overload - def copy(self, target: StrPath, *, follow_symlinks: bool = True, preserve_metadata: bool = False) -> Self: ... # type: ignore[overload-overlap] - - # Adapted from builtins.open - # Text mode: always returns a TextIOWrapper - # The Traversable .open in stdlib/importlib/abc.pyi should be kept in sync with this. - @overload - def open( - self, - mode: OpenTextMode = "r", - buffering: int = -1, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - ) -> TextIOWrapper: ... - # Unbuffered binary mode: returns a FileIO - @overload - def open( - self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None - ) -> FileIO: ... - # Buffering is on: return BufferedRandom, BufferedReader, or BufferedWriter - @overload - def open( - self, - mode: OpenBinaryModeUpdating, - buffering: Literal[-1, 1] = -1, - encoding: None = None, - errors: None = None, - newline: None = None, - ) -> BufferedRandom: ... - @overload - def open( - self, - mode: OpenBinaryModeWriting, - buffering: Literal[-1, 1] = -1, - encoding: None = None, - errors: None = None, - newline: None = None, - ) -> BufferedWriter: ... - @overload - def open( - self, - mode: OpenBinaryModeReading, - buffering: Literal[-1, 1] = -1, - encoding: None = None, - errors: None = None, - newline: None = None, - ) -> BufferedReader: ... - # Buffering cannot be determined: fall back to BinaryIO - @overload - def open( - self, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None - ) -> BinaryIO: ... - # Fallback if mode is not specified - @overload - def open( - self, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None - ) -> IO[Any]: ... - - # These methods do "exist" on Windows, but they always raise NotImplementedError. - if sys.platform == "win32": - if sys.version_info >= (3, 13): - # raises UnsupportedOperation: - def owner(self: Never, *, follow_symlinks: bool = True) -> str: ... # type: ignore[misc] - def group(self: Never, *, follow_symlinks: bool = True) -> str: ... # type: ignore[misc] - else: - def owner(self: Never) -> str: ... # type: ignore[misc] - def group(self: Never) -> str: ... # type: ignore[misc] - else: - if sys.version_info >= (3, 13): - def owner(self, *, follow_symlinks: bool = True) -> str: ... - def group(self, *, follow_symlinks: bool = True) -> str: ... - else: - def owner(self) -> str: ... - def group(self) -> str: ... - - # This method does "exist" on Windows on <3.12, but always raises NotImplementedError - # On py312+, it works properly on Windows, as with all other platforms - if sys.platform == "win32" and sys.version_info < (3, 12): - def is_mount(self: Never) -> bool: ... # type: ignore[misc] - else: - def is_mount(self) -> bool: ... - - def readlink(self) -> Self: ... - def rename(self, target: StrPath) -> Self: ... - def replace(self, target: StrPath) -> Self: ... - def resolve(self, strict: bool = False) -> Self: ... - def rmdir(self) -> None: ... - def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None: ... - def hardlink_to(self, target: StrOrBytesPath) -> None: ... - def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None: ... - def unlink(self, missing_ok: bool = False) -> None: ... - @classmethod - def home(cls) -> Self: ... - def absolute(self) -> Self: ... - def expanduser(self) -> Self: ... - def read_bytes(self) -> bytes: ... - def samefile(self, other_path: StrPath) -> bool: ... - def write_bytes(self, data: ReadableBuffer) -> int: ... - def write_text( - self, data: str, encoding: str | None = None, errors: str | None = None, newline: str | None = None - ) -> int: ... - if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `hardlink_to()` instead.") - def link_to(self, target: StrOrBytesPath) -> None: ... - if sys.version_info >= (3, 12): - def walk( - self, top_down: bool = True, on_error: Callable[[OSError], object] | None = None, follow_symlinks: bool = False - ) -> Iterator[tuple[Self, list[str], list[str]]]: ... - - def as_uri(self) -> str: ... - -class PosixPath(Path, PurePosixPath): - __slots__ = () - -class WindowsPath(Path, PureWindowsPath): - __slots__ = () - -if sys.version_info >= (3, 13): - class UnsupportedOperation(NotImplementedError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/types.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/types.vpi deleted file mode 100644 index 9f9a6508..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pathlib/types.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Protocol, runtime_checkable - -@runtime_checkable -class PathInfo(Protocol): - def exists(self, *, follow_symlinks: bool = True) -> bool: ... - def is_dir(self, *, follow_symlinks: bool = True) -> bool: ... - def is_file(self, *, follow_symlinks: bool = True) -> bool: ... - def is_symlink(self) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pdb.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pdb.vpi deleted file mode 100644 index 289637cb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pdb.vpi +++ /dev/null @@ -1,275 +0,0 @@ -import signal -import sys -from _typeshed import ReadableBuffer -from bdb import Bdb, _Backend -from cmd import Cmd -from collections.abc import Callable, Iterable, Mapping, Sequence -from linecache import _ModuleGlobals -from rlcompleter import Completer -from types import CodeType, FrameType, TracebackType -from typing import IO, Any, ClassVar, Final, Literal, ParamSpec, TypeAlias, TypeVar -from typing_extensions import Self, deprecated - -__all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace", "post_mortem", "help"] -if sys.version_info >= (3, 14): - __all__ += ["set_default_backend", "get_default_backend"] - -_T = TypeVar("_T") -_P = ParamSpec("_P") -_Mode: TypeAlias = Literal["inline", "cli"] - -line_prefix: Final[str] # undocumented - -class Restart(Exception): ... - -def run( # matches `builtins.exec` - statement: str | ReadableBuffer | CodeType, globals: dict[str, Any] | None = None, locals: Mapping[str, object] | None = None -) -> None: ... -def runctx( # matches `builtins.exec` - statement: str | ReadableBuffer | CodeType, globals: dict[str, Any], locals: Mapping[str, object] -) -> None: ... -def runeval( # matches `builtins.eval` - expression: str | ReadableBuffer | CodeType, globals: dict[str, Any] | None = None, locals: Mapping[str, object] | None = None -) -> Any: ... -def runcall(func: Callable[_P, _T], *args: _P.args, **kwds: _P.kwargs) -> _T | None: ... - -if sys.version_info >= (3, 14): - def set_default_backend(backend: _Backend) -> None: ... - def get_default_backend() -> _Backend: ... - def set_trace(*, header: str | None = None, commands: Iterable[str] | None = None) -> None: ... - async def set_trace_async(*, header: str | None = None, commands: Iterable[str] | None = None) -> None: ... - -else: - def set_trace(*, header: str | None = None) -> None: ... - -def post_mortem(t: TracebackType | None = None) -> None: ... -def pm() -> None: ... - -class Pdb(Bdb, Cmd): - # Everything here is undocumented, except for __init__ - - commands_resuming: ClassVar[list[str]] - - if sys.version_info >= (3, 13): - MAX_CHAINED_EXCEPTION_DEPTH: Final = 999 - - aliases: dict[str, str] - mainpyfile: str - _wait_for_mainpyfile: bool - rcLines: list[str] - commands: dict[int, list[str]] - commands_doprompt: dict[int, bool] - commands_silent: dict[int, bool] - commands_defining: bool - commands_bnum: int | None - lineno: int | None - stack: list[tuple[FrameType, int]] - curindex: int - curframe: FrameType | None - if sys.version_info >= (3, 13): - @property - @deprecated("The frame locals reference is no longer cached. Use 'curframe.f_locals' instead.") - def curframe_locals(self) -> Mapping[str, Any]: ... - @curframe_locals.setter - @deprecated( - "Setting 'curframe_locals' no longer has any effect as of 3.14. Update the contents of 'curframe.f_locals' instead." - ) - def curframe_locals(self, value: Mapping[str, Any]) -> None: ... - else: - curframe_locals: Mapping[str, Any] - if sys.version_info >= (3, 14): - mode: _Mode | None - colorize: bool - def __init__( - self, - completekey: str = "tab", - stdin: IO[str] | None = None, - stdout: IO[str] | None = None, - skip: Iterable[str] | None = None, - nosigint: bool = False, - readrc: bool = True, - mode: _Mode | None = None, - backend: _Backend | None = None, - colorize: bool = False, - ) -> None: ... - else: - def __init__( - self, - completekey: str = "tab", - stdin: IO[str] | None = None, - stdout: IO[str] | None = None, - skip: Iterable[str] | None = None, - nosigint: bool = False, - readrc: bool = True, - ) -> None: ... - if sys.version_info >= (3, 14): - def set_trace(self, frame: FrameType | None = None, *, commands: Iterable[str] | None = None) -> None: ... - async def set_trace_async(self, frame: FrameType | None = None, *, commands: Iterable[str] | None = None) -> None: ... - - def forget(self) -> None: ... - def setup(self, f: FrameType | None, tb: TracebackType | None) -> None: ... - if sys.version_info < (3, 11): - def execRcLines(self) -> None: ... - - if sys.version_info >= (3, 13): - user_opcode = Bdb.user_line - - def bp_commands(self, frame: FrameType) -> bool: ... - - if sys.version_info >= (3, 13): - def interaction(self, frame: FrameType | None, tb_or_exc: TracebackType | BaseException | None) -> None: ... - else: - def interaction(self, frame: FrameType | None, traceback: TracebackType | None) -> None: ... - - def displayhook(self, obj: object) -> None: ... - def handle_command_def(self, line: str) -> bool: ... - def defaultFile(self) -> str: ... - def lineinfo(self, identifier: str) -> tuple[None, None, None] | tuple[str, str, int]: ... - if sys.version_info >= (3, 14): - def checkline(self, filename: str, lineno: int, module_globals: _ModuleGlobals | None = None) -> int: ... - else: - def checkline(self, filename: str, lineno: int) -> int: ... - - def _getval(self, arg: str) -> object: ... - if sys.version_info >= (3, 14): - def print_stack_trace(self, count: int | None = None) -> None: ... - else: - def print_stack_trace(self) -> None: ... - - if sys.version_info >= (3, 15): - def print_stack_entry(self, frame_lineno: tuple[FrameType, int], prompt_prefix: str | None = None) -> None: ... - else: - def print_stack_entry(self, frame_lineno: tuple[FrameType, int], prompt_prefix: str = "\n-> ") -> None: ... - - def lookupmodule(self, filename: str) -> str | None: ... - if sys.version_info < (3, 11): - def _runscript(self, filename: str) -> None: ... - - if sys.version_info >= (3, 14): - def complete_multiline_names(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - - if sys.version_info >= (3, 13): - def completedefault(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - - def do_commands(self, arg: str) -> bool | None: ... - if sys.version_info >= (3, 14): - def do_break(self, arg: str, temporary: bool = False) -> bool | None: ... - else: - def do_break(self, arg: str, temporary: bool | Literal[0, 1] = 0) -> bool | None: ... - - def do_tbreak(self, arg: str) -> bool | None: ... - def do_enable(self, arg: str) -> bool | None: ... - def do_disable(self, arg: str) -> bool | None: ... - def do_condition(self, arg: str) -> bool | None: ... - def do_ignore(self, arg: str) -> bool | None: ... - def do_clear(self, arg: str) -> bool | None: ... - def do_where(self, arg: str) -> bool | None: ... - if sys.version_info >= (3, 13): - def do_exceptions(self, arg: str) -> bool | None: ... - - def do_up(self, arg: str) -> bool | None: ... - def do_down(self, arg: str) -> bool | None: ... - def do_until(self, arg: str) -> bool | None: ... - def do_step(self, arg: str) -> bool | None: ... - def do_next(self, arg: str) -> bool | None: ... - def do_run(self, arg: str) -> bool | None: ... - def do_return(self, arg: str) -> bool | None: ... - def do_continue(self, arg: str) -> bool | None: ... - def do_jump(self, arg: str) -> bool | None: ... - def do_debug(self, arg: str) -> bool | None: ... - def do_quit(self, arg: str) -> bool | None: ... - def do_EOF(self, arg: str) -> bool | None: ... - def do_args(self, arg: str) -> bool | None: ... - def do_retval(self, arg: str) -> bool | None: ... - def do_p(self, arg: str) -> bool | None: ... - def do_pp(self, arg: str) -> bool | None: ... - def do_list(self, arg: str) -> bool | None: ... - def do_whatis(self, arg: str) -> bool | None: ... - def do_alias(self, arg: str) -> bool | None: ... - def do_unalias(self, arg: str) -> bool | None: ... - def do_help(self, arg: str) -> bool | None: ... - do_b = do_break - do_cl = do_clear - do_w = do_where - do_bt = do_where - do_u = do_up - do_d = do_down - do_unt = do_until - do_s = do_step - do_n = do_next - do_restart = do_run - do_r = do_return - do_c = do_continue - do_cont = do_continue - do_j = do_jump - do_q = do_quit - do_exit = do_quit - do_a = do_args - do_rv = do_retval - do_l = do_list - do_h = do_help - def help_exec(self) -> None: ... - def help_pdb(self) -> None: ... - def sigint_handler(self, signum: signal.Signals, frame: FrameType) -> None: ... - if sys.version_info >= (3, 13): - def message(self, msg: str, end: str = "\n") -> None: ... - else: - def message(self, msg: str) -> None: ... - - def error(self, msg: str) -> None: ... - if sys.version_info >= (3, 13): - def completenames(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... # type: ignore[override] - if sys.version_info >= (3, 12): - def set_convenience_variable(self, frame: FrameType, name: str, value: Any) -> None: ... - if sys.version_info >= (3, 13): - # Added in 3.13.8 and 3.14.1 - @property - def rlcompleter(self) -> type[Completer]: ... - - def _select_frame(self, number: int) -> None: ... - def _getval_except(self, arg: str, frame: FrameType | None = None) -> object: ... - def _print_lines( - self, lines: Sequence[str], start: int, breaks: Sequence[int] = (), frame: FrameType | None = None - ) -> None: ... - def _cmdloop(self) -> None: ... - def do_display(self, arg: str) -> bool | None: ... - def do_interact(self, arg: str) -> bool | None: ... - def do_longlist(self, arg: str) -> bool | None: ... - def do_source(self, arg: str) -> bool | None: ... - def do_undisplay(self, arg: str) -> bool | None: ... - do_ll = do_longlist - def _complete_location(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - def _complete_bpnumber(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - def _complete_expression(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - def complete_undisplay(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - def complete_unalias(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... - complete_commands = _complete_bpnumber - complete_break = _complete_location - complete_b = _complete_location - complete_tbreak = _complete_location - complete_enable = _complete_bpnumber - complete_disable = _complete_bpnumber - complete_condition = _complete_bpnumber - complete_ignore = _complete_bpnumber - complete_clear = _complete_location - complete_cl = _complete_location - complete_debug = _complete_expression - complete_print = _complete_expression - complete_p = _complete_expression - complete_pp = _complete_expression - complete_source = _complete_expression - complete_whatis = _complete_expression - complete_display = _complete_expression - - if sys.version_info < (3, 11): - def _runmodule(self, module_name: str) -> None: ... - -# undocumented - -def find_function(funcname: str, filename: str) -> tuple[str, str, int] | None: ... -def main() -> None: ... -def help() -> None: ... -def lasti2lineno(code: CodeType, lasti: int) -> int: ... - -class _rstr(str): - def __repr__(self) -> Self: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pickle.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pickle.vpi deleted file mode 100644 index 03ba6c12..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pickle.vpi +++ /dev/null @@ -1,240 +0,0 @@ -import sys -from _pickle import ( - PickleError as PickleError, - Pickler as Pickler, - PicklingError as PicklingError, - Unpickler as Unpickler, - UnpicklingError as UnpicklingError, - _BufferCallback, - _ReadableFileobj, - _ReducedType, - dump as dump, - dumps as dumps, - load as load, - loads as loads, -) -from _typeshed import ReadableBuffer, SupportsWrite -from collections.abc import Callable, Iterable, Mapping -from typing import Any, ClassVar, Final, SupportsBytes, SupportsIndex, final -from typing_extensions import Self - -__all__ = [ - "PickleBuffer", - "PickleError", - "PicklingError", - "UnpicklingError", - "Pickler", - "Unpickler", - "dump", - "dumps", - "load", - "loads", - "ADDITEMS", - "APPEND", - "APPENDS", - "BINBYTES", - "BINBYTES8", - "BINFLOAT", - "BINGET", - "BININT", - "BININT1", - "BININT2", - "BINPERSID", - "BINPUT", - "BINSTRING", - "BINUNICODE", - "BINUNICODE8", - "BUILD", - "BYTEARRAY8", - "DEFAULT_PROTOCOL", - "DICT", - "DUP", - "EMPTY_DICT", - "EMPTY_LIST", - "EMPTY_SET", - "EMPTY_TUPLE", - "EXT1", - "EXT2", - "EXT4", - "FALSE", - "FLOAT", - "FRAME", - "FROZENSET", - "GET", - "GLOBAL", - "HIGHEST_PROTOCOL", - "INST", - "INT", - "LIST", - "LONG", - "LONG1", - "LONG4", - "LONG_BINGET", - "LONG_BINPUT", - "MARK", - "MEMOIZE", - "NEWFALSE", - "NEWOBJ", - "NEWOBJ_EX", - "NEWTRUE", - "NEXT_BUFFER", - "NONE", - "OBJ", - "PERSID", - "POP", - "POP_MARK", - "PROTO", - "PUT", - "READONLY_BUFFER", - "REDUCE", - "SETITEM", - "SETITEMS", - "SHORT_BINBYTES", - "SHORT_BINSTRING", - "SHORT_BINUNICODE", - "STACK_GLOBAL", - "STOP", - "STRING", - "TRUE", - "TUPLE", - "TUPLE1", - "TUPLE2", - "TUPLE3", - "UNICODE", -] - -HIGHEST_PROTOCOL: Final = 5 -if sys.version_info >= (3, 14): - DEFAULT_PROTOCOL: Final = 5 -else: - DEFAULT_PROTOCOL: Final = 4 - -bytes_types: tuple[type[Any], ...] # undocumented - -@final -class PickleBuffer: - def __new__(cls, buffer: ReadableBuffer) -> Self: ... - def raw(self) -> memoryview: ... - def release(self) -> None: ... - def __buffer__(self, flags: int, /) -> memoryview: ... - def __release_buffer__(self, buffer: memoryview, /) -> None: ... - -MARK: Final = b"(" -STOP: Final = b"." -POP: Final = b"0" -POP_MARK: Final = b"1" -DUP: Final = b"2" -FLOAT: Final = b"F" -INT: Final = b"I" -BININT: Final = b"J" -BININT1: Final = b"K" -LONG: Final = b"L" -BININT2: Final = b"M" -NONE: Final = b"N" -PERSID: Final = b"P" -BINPERSID: Final = b"Q" -REDUCE: Final = b"R" -STRING: Final = b"S" -BINSTRING: Final = b"T" -SHORT_BINSTRING: Final = b"U" -UNICODE: Final = b"V" -BINUNICODE: Final = b"X" -APPEND: Final = b"a" -BUILD: Final = b"b" -GLOBAL: Final = b"c" -DICT: Final = b"d" -EMPTY_DICT: Final = b"}" -APPENDS: Final = b"e" -GET: Final = b"g" -BINGET: Final = b"h" -INST: Final = b"i" -LONG_BINGET: Final = b"j" -LIST: Final = b"l" -EMPTY_LIST: Final = b"]" -OBJ: Final = b"o" -PUT: Final = b"p" -BINPUT: Final = b"q" -LONG_BINPUT: Final = b"r" -SETITEM: Final = b"s" -TUPLE: Final = b"t" -EMPTY_TUPLE: Final = b")" -SETITEMS: Final = b"u" -BINFLOAT: Final = b"G" - -TRUE: Final = b"I01\n" -FALSE: Final = b"I00\n" - -# protocol 2 -PROTO: Final = b"\x80" -NEWOBJ: Final = b"\x81" -EXT1: Final = b"\x82" -EXT2: Final = b"\x83" -EXT4: Final = b"\x84" -TUPLE1: Final = b"\x85" -TUPLE2: Final = b"\x86" -TUPLE3: Final = b"\x87" -NEWTRUE: Final = b"\x88" -NEWFALSE: Final = b"\x89" -LONG1: Final = b"\x8a" -LONG4: Final = b"\x8b" - -# protocol 3 -BINBYTES: Final = b"B" -SHORT_BINBYTES: Final = b"C" - -# protocol 4 -SHORT_BINUNICODE: Final = b"\x8c" -BINUNICODE8: Final = b"\x8d" -BINBYTES8: Final = b"\x8e" -EMPTY_SET: Final = b"\x8f" -ADDITEMS: Final = b"\x90" -FROZENSET: Final = b"\x91" -NEWOBJ_EX: Final = b"\x92" -STACK_GLOBAL: Final = b"\x93" -MEMOIZE: Final = b"\x94" -FRAME: Final = b"\x95" - -# protocol 5 -BYTEARRAY8: Final = b"\x96" -NEXT_BUFFER: Final = b"\x97" -READONLY_BUFFER: Final = b"\x98" - -def encode_long(x: int) -> bytes: ... # undocumented -def decode_long(data: Iterable[SupportsIndex] | SupportsBytes | ReadableBuffer) -> int: ... # undocumented - -# undocumented pure-Python implementations -class _Pickler: - fast: bool - dispatch_table: Mapping[type, Callable[[Any], _ReducedType]] - bin: bool # undocumented - dispatch: ClassVar[dict[type, Callable[[Unpickler, Any], None]]] # undocumented, _Pickler only - def __init__( - self, - file: SupportsWrite[bytes], - protocol: int | None = None, - *, - fix_imports: bool = True, - buffer_callback: _BufferCallback = None, - ) -> None: ... - def dump(self, obj: Any) -> None: ... - def clear_memo(self) -> None: ... - def persistent_id(self, obj: Any) -> Any: ... - # The following method is not defined on _Pickler, but can be defined on - # sub-classes. Should return `NotImplemented` if pickling the supplied - # object is not supported and returns the same types as `__reduce__()`. - def reducer_override(self, obj: object, /) -> _ReducedType: ... - -class _Unpickler: - dispatch: ClassVar[dict[int, Callable[[Unpickler], None]]] # undocumented, _Unpickler only - def __init__( - self, - file: _ReadableFileobj, - *, - fix_imports: bool = True, - encoding: str = "ASCII", - errors: str = "strict", - buffers: Iterable[Any] | None = None, - ) -> None: ... - def load(self) -> Any: ... - def find_class(self, module: str, name: str) -> Any: ... - def persistent_load(self, pid: Any) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pickletools.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pickletools.vpi deleted file mode 100644 index 98353d96..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pickletools.vpi +++ /dev/null @@ -1,176 +0,0 @@ -import sys -from collections.abc import Callable, Iterator, MutableMapping -from typing import IO, Any, Final, TypeAlias - -__all__ = ["dis", "genops", "optimize"] - -_Reader: TypeAlias = Callable[[IO[bytes]], Any] -bytes_types: tuple[type[Any], ...] - -UP_TO_NEWLINE: Final = -1 -TAKEN_FROM_ARGUMENT1: Final = -2 -TAKEN_FROM_ARGUMENT4: Final = -3 -TAKEN_FROM_ARGUMENT4U: Final = -4 -TAKEN_FROM_ARGUMENT8U: Final = -5 - -class ArgumentDescriptor: - __slots__ = ("name", "n", "reader", "doc") - name: str - n: int - reader: _Reader - doc: str - def __init__(self, name: str, n: int, reader: _Reader, doc: str) -> None: ... - -def read_uint1(f: IO[bytes]) -> int: ... - -uint1: ArgumentDescriptor - -def read_uint2(f: IO[bytes]) -> int: ... - -uint2: ArgumentDescriptor - -def read_int4(f: IO[bytes]) -> int: ... - -int4: ArgumentDescriptor - -def read_uint4(f: IO[bytes]) -> int: ... - -uint4: ArgumentDescriptor - -def read_uint8(f: IO[bytes]) -> int: ... - -uint8: ArgumentDescriptor - -if sys.version_info >= (3, 12): - def read_stringnl( - f: IO[bytes], decode: bool = True, stripquotes: bool = True, *, encoding: str = "latin-1" - ) -> bytes | str: ... - -else: - def read_stringnl(f: IO[bytes], decode: bool = True, stripquotes: bool = True) -> bytes | str: ... - -stringnl: ArgumentDescriptor - -def read_stringnl_noescape(f: IO[bytes]) -> str: ... - -stringnl_noescape: ArgumentDescriptor - -def read_stringnl_noescape_pair(f: IO[bytes]) -> str: ... - -stringnl_noescape_pair: ArgumentDescriptor - -def read_string1(f: IO[bytes]) -> str: ... - -string1: ArgumentDescriptor - -def read_string4(f: IO[bytes]) -> str: ... - -string4: ArgumentDescriptor - -def read_bytes1(f: IO[bytes]) -> bytes: ... - -bytes1: ArgumentDescriptor - -def read_bytes4(f: IO[bytes]) -> bytes: ... - -bytes4: ArgumentDescriptor - -def read_bytes8(f: IO[bytes]) -> bytes: ... - -bytes8: ArgumentDescriptor - -def read_unicodestringnl(f: IO[bytes]) -> str: ... - -unicodestringnl: ArgumentDescriptor - -def read_unicodestring1(f: IO[bytes]) -> str: ... - -unicodestring1: ArgumentDescriptor - -def read_unicodestring4(f: IO[bytes]) -> str: ... - -unicodestring4: ArgumentDescriptor - -def read_unicodestring8(f: IO[bytes]) -> str: ... - -unicodestring8: ArgumentDescriptor - -def read_decimalnl_short(f: IO[bytes]) -> int: ... -def read_decimalnl_long(f: IO[bytes]) -> int: ... - -decimalnl_short: ArgumentDescriptor -decimalnl_long: ArgumentDescriptor - -def read_floatnl(f: IO[bytes]) -> float: ... - -floatnl: ArgumentDescriptor - -def read_float8(f: IO[bytes]) -> float: ... - -float8: ArgumentDescriptor - -def read_long1(f: IO[bytes]) -> int: ... - -long1: ArgumentDescriptor - -def read_long4(f: IO[bytes]) -> int: ... - -long4: ArgumentDescriptor - -class StackObject: - __slots__ = ("name", "obtype", "doc") - name: str - obtype: type[Any] | tuple[type[Any], ...] - doc: str - def __init__(self, name: str, obtype: type[Any] | tuple[type[Any], ...], doc: str) -> None: ... - -pyint: StackObject -pylong: StackObject -pyinteger_or_bool: StackObject -pybool: StackObject -pyfloat: StackObject -pybytes_or_str: StackObject -pystring: StackObject -pybytes: StackObject -pyunicode: StackObject -pynone: StackObject -pytuple: StackObject -pylist: StackObject -pydict: StackObject -pyset: StackObject -pyfrozenset: StackObject -anyobject: StackObject -markobject: StackObject -stackslice: StackObject - -class OpcodeInfo: - __slots__ = ("name", "code", "arg", "stack_before", "stack_after", "proto", "doc") - name: str - code: str - arg: ArgumentDescriptor | None - stack_before: list[StackObject] - stack_after: list[StackObject] - proto: int - doc: str - def __init__( - self, - name: str, - code: str, - arg: ArgumentDescriptor | None, - stack_before: list[StackObject], - stack_after: list[StackObject], - proto: int, - doc: str, - ) -> None: ... - -opcodes: list[OpcodeInfo] - -def genops(pickle: bytes | bytearray | IO[bytes]) -> Iterator[tuple[OpcodeInfo, Any | None, int | None]]: ... -def optimize(p: bytes | bytearray | IO[bytes]) -> bytes: ... -def dis( - pickle: bytes | bytearray | IO[bytes], - out: IO[str] | None = None, - memo: MutableMapping[int, Any] | None = None, - indentlevel: int = 4, - annotate: int = 0, -) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pipes.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pipes.vpi deleted file mode 100644 index fe680bfd..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pipes.vpi +++ /dev/null @@ -1,16 +0,0 @@ -import os - -__all__ = ["Template"] - -class Template: - def reset(self) -> None: ... - def clone(self) -> Template: ... - def debug(self, flag: bool) -> None: ... - def append(self, cmd: str, kind: str) -> None: ... - def prepend(self, cmd: str, kind: str) -> None: ... - def open(self, file: str, rw: str) -> os._wrap_close: ... - def copy(self, infile: str, outfile: str) -> int: ... - -# Not documented, but widely used. -# Documented as shlex.quote since 3.3. -def quote(s: str) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pkgutil.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pkgutil.vpi deleted file mode 100644 index 365792be..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pkgutil.vpi +++ /dev/null @@ -1,60 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath, SupportsRead -from _typeshed.importlib import LoaderProtocol, MetaPathFinderProtocol, PathEntryFinderProtocol -from collections.abc import Callable, Iterable, Iterator -from typing import IO, Any, NamedTuple, TypeVar -from typing_extensions import deprecated - -__all__ = [ - "get_importer", - "iter_importers", - "walk_packages", - "iter_modules", - "get_data", - "read_code", - "extend_path", - "ModuleInfo", -] -if sys.version_info < (3, 14): - __all__ += ["get_loader", "find_loader"] -if sys.version_info < (3, 12): - __all__ += ["ImpImporter", "ImpLoader"] - -_PathT = TypeVar("_PathT", bound=Iterable[str]) - -class ModuleInfo(NamedTuple): - module_finder: MetaPathFinderProtocol | PathEntryFinderProtocol - name: str - ispkg: bool - -def extend_path(path: _PathT, name: str) -> _PathT: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.") - class ImpImporter: - def __init__(self, path: StrOrBytesPath | None = None) -> None: ... - - @deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.") - class ImpLoader: - def __init__(self, fullname: str, file: IO[str], filename: StrOrBytesPath, etc: tuple[str, str, int]) -> None: ... - -if sys.version_info < (3, 14): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `importlib.util.find_spec()` instead.") - def find_loader(fullname: str) -> LoaderProtocol | None: ... - @deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `importlib.util.find_spec()` instead.") - def get_loader(module_or_name: str) -> LoaderProtocol | None: ... - -def get_importer(path_item: StrOrBytesPath) -> PathEntryFinderProtocol | None: ... -def iter_importers(fullname: str = "") -> Iterator[MetaPathFinderProtocol | PathEntryFinderProtocol]: ... -def iter_modules(path: Iterable[StrOrBytesPath] | None = None, prefix: str = "") -> Iterator[ModuleInfo]: ... -def read_code(stream: SupportsRead[bytes]) -> Any: ... # undocumented -def walk_packages( - path: Iterable[StrOrBytesPath] | None = None, prefix: str = "", onerror: Callable[[str], object] | None = None -) -> Iterator[ModuleInfo]: ... -def get_data(package: str, resource: str) -> bytes | None: ... - -if sys.version_info >= (3, 15): - def resolve_name(name: str, *, strict: bool = False) -> Any: ... - -else: - def resolve_name(name: str) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/platform.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/platform.vpi deleted file mode 100644 index b7b99608..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/platform.vpi +++ /dev/null @@ -1,100 +0,0 @@ -import sys -from typing import NamedTuple, type_check_only -from typing_extensions import Self, deprecated, disjoint_base - -def libc_ver(executable: str | None = None, lib: str = "", version: str = "", chunksize: int = 16384) -> tuple[str, str]: ... -def win32_ver(release: str = "", version: str = "", csd: str = "", ptype: str = "") -> tuple[str, str, str, str]: ... -def win32_edition() -> str: ... -def win32_is_iot() -> bool: ... -def mac_ver( - release: str = "", versioninfo: tuple[str, str, str] = ("", "", ""), machine: str = "" -) -> tuple[str, tuple[str, str, str], str]: ... - -if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def java_ver( - release: str = "", - vendor: str = "", - vminfo: tuple[str, str, str] = ("", "", ""), - osinfo: tuple[str, str, str] = ("", "", ""), - ) -> tuple[str, str, tuple[str, str, str], tuple[str, str, str]]: ... - -def system_alias(system: str, release: str, version: str) -> tuple[str, str, str]: ... -def architecture(executable: str = sys.executable, bits: str = "", linkage: str = "") -> tuple[str, str]: ... - -# This class is not exposed. It calls itself platform.uname_result_base. -# At runtime it only has 5 fields. -@type_check_only -class _uname_result_base(NamedTuple): - system: str - node: str - release: str - version: str - machine: str - # This base class doesn't have this field at runtime, but claiming it - # does is the least bad way to handle the situation. Nobody really - # sees this class anyway. See #13068 - processor: str - -# uname_result emulates a 6-field named tuple, but the processor field -# is lazily evaluated rather than being passed in to the constructor. -if sys.version_info >= (3, 12): - class uname_result(_uname_result_base): - __match_args__ = ("system", "node", "release", "version", "machine") # viper: ignore[reportAssignmentType] - - def __new__(_cls, system: str, node: str, release: str, version: str, machine: str) -> Self: ... - @property - def processor(self) -> str: ... - -else: - @disjoint_base - class uname_result(_uname_result_base): - __match_args__ = ("system", "node", "release", "version", "machine") # viper: ignore[reportAssignmentType] - def __new__(_cls, system: str, node: str, release: str, version: str, machine: str) -> Self: ... - @property - def processor(self) -> str: ... - -def uname() -> uname_result: ... -def system() -> str: ... -def node() -> str: ... -def release() -> str: ... -def version() -> str: ... -def machine() -> str: ... -def processor() -> str: ... -def python_implementation() -> str: ... -def python_version() -> str: ... -def python_version_tuple() -> tuple[str, str, str]: ... -def python_branch() -> str: ... -def python_revision() -> str: ... -def python_build() -> tuple[str, str]: ... -def python_compiler() -> str: ... -def platform(aliased: bool = False, terse: bool = False) -> str: ... -def freedesktop_os_release() -> dict[str, str]: ... - -if sys.version_info >= (3, 13): - class AndroidVer(NamedTuple): - release: str - api_level: int - manufacturer: str - model: str - device: str - is_emulator: bool - - class IOSVersionInfo(NamedTuple): - system: str - release: str - model: str - is_simulator: bool - - def android_ver( - release: str = "", - api_level: int = 0, - manufacturer: str = "", - model: str = "", - device: str = "", - is_emulator: bool = False, - ) -> AndroidVer: ... - def ios_ver(system: str = "", release: str = "", model: str = "", is_simulator: bool = False) -> IOSVersionInfo: ... - -if sys.version_info >= (3, 14): - def invalidate_caches() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/plistlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/plistlib.vpi deleted file mode 100644 index dc3247ee..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/plistlib.vpi +++ /dev/null @@ -1,84 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from collections.abc import Mapping, MutableMapping -from datetime import datetime -from enum import Enum -from typing import IO, Any, Final -from typing_extensions import Self - -__all__ = ["InvalidFileException", "FMT_XML", "FMT_BINARY", "load", "dump", "loads", "dumps", "UID"] - -class PlistFormat(Enum): - FMT_XML = 1 - FMT_BINARY = 2 - -FMT_XML: Final = PlistFormat.FMT_XML -FMT_BINARY: Final = PlistFormat.FMT_BINARY -if sys.version_info >= (3, 13): - def load( - fp: IO[bytes], - *, - fmt: PlistFormat | None = None, - dict_type: type[MutableMapping[str, Any]] = ..., - aware_datetime: bool = False, - ) -> Any: ... - def loads( - value: ReadableBuffer | str, - *, - fmt: PlistFormat | None = None, - dict_type: type[MutableMapping[str, Any]] = ..., - aware_datetime: bool = False, - ) -> Any: ... - -else: - def load(fp: IO[bytes], *, fmt: PlistFormat | None = None, dict_type: type[MutableMapping[str, Any]] = ...) -> Any: ... - def loads( - value: ReadableBuffer, *, fmt: PlistFormat | None = None, dict_type: type[MutableMapping[str, Any]] = ... - ) -> Any: ... - -if sys.version_info >= (3, 13): - def dump( - value: Mapping[str, Any] | list[Any] | tuple[Any, ...] | str | bool | float | bytes | bytearray | datetime, - fp: IO[bytes], - *, - fmt: PlistFormat = ..., - sort_keys: bool = True, - skipkeys: bool = False, - aware_datetime: bool = False, - ) -> None: ... - def dumps( - value: Mapping[str, Any] | list[Any] | tuple[Any, ...] | str | bool | float | bytes | bytearray | datetime, - *, - fmt: PlistFormat = ..., - skipkeys: bool = False, - sort_keys: bool = True, - aware_datetime: bool = False, - ) -> bytes: ... - -else: - def dump( - value: Mapping[str, Any] | list[Any] | tuple[Any, ...] | str | bool | float | bytes | bytearray | datetime, - fp: IO[bytes], - *, - fmt: PlistFormat = ..., - sort_keys: bool = True, - skipkeys: bool = False, - ) -> None: ... - def dumps( - value: Mapping[str, Any] | list[Any] | tuple[Any, ...] | str | bool | float | bytes | bytearray | datetime, - *, - fmt: PlistFormat = ..., - skipkeys: bool = False, - sort_keys: bool = True, - ) -> bytes: ... - -class UID: - data: int - def __init__(self, data: int) -> None: ... - def __index__(self) -> int: ... - def __reduce__(self) -> tuple[type[Self], tuple[int]]: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - -class InvalidFileException(ValueError): - def __init__(self, message: str = "Invalid file") -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/poplib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/poplib.vpi deleted file mode 100644 index d4555a6b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/poplib.vpi +++ /dev/null @@ -1,93 +0,0 @@ -import socket -import ssl -import sys -from _typeshed import StrOrBytesPath -from builtins import list as _list # conflicts with a method named "list" -from re import Pattern -from typing import Any, BinaryIO, Final, NoReturn, TypeAlias, overload -from typing_extensions import deprecated - -__all__ = ["POP3", "error_proto", "POP3_SSL"] - -_LongResp: TypeAlias = tuple[bytes, list[bytes], int] - -class error_proto(Exception): ... - -POP3_PORT: Final = 110 -POP3_SSL_PORT: Final = 995 -CR: Final = b"\r" -LF: Final = b"\n" -CRLF: Final = b"\r\n" -HAVE_SSL: Final[bool] - -class POP3: - encoding: str - host: str - port: int - sock: socket.socket - file: BinaryIO - welcome: bytes - def __init__(self, host: str, port: int = 110, timeout: float = ...) -> None: ... - def getwelcome(self) -> bytes: ... - def set_debuglevel(self, level: int) -> None: ... - def user(self, user: str) -> bytes: ... - def pass_(self, pswd: str) -> bytes: ... - def stat(self) -> tuple[int, int]: ... - def list(self, which: Any | None = None) -> _LongResp: ... - def retr(self, which: Any) -> _LongResp: ... - def dele(self, which: Any) -> bytes: ... - def noop(self) -> bytes: ... - def rset(self) -> bytes: ... - def quit(self) -> bytes: ... - def close(self) -> None: ... - def rpop(self, user: str) -> bytes: ... - timestamp: Pattern[str] - def apop(self, user: str, password: str) -> bytes: ... - def top(self, which: Any, howmuch: int) -> _LongResp: ... - - @overload - def uidl(self) -> _LongResp: ... - @overload - def uidl(self, which: Any) -> bytes: ... - - def utf8(self) -> bytes: ... - def capa(self) -> dict[str, _list[str]]: ... - def stls(self, context: ssl.SSLContext | None = None) -> bytes: ... - -class POP3_SSL(POP3): - if sys.version_info >= (3, 12): - def __init__( - self, host: str, port: int = 995, *, timeout: float = ..., context: ssl.SSLContext | None = None - ) -> None: ... - def stls(self, context: Any = None) -> NoReturn: ... - else: - @overload - def __init__( - self, - host: str, - port: int = 995, - keyfile: None = None, - certfile: None = None, - timeout: float = ..., - context: ssl.SSLContext | None = None, - ) -> None: ... - @overload - @deprecated( - "The `keyfile`, `certfile` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `context` parameter instead." - ) - def __init__( - self, - host: str, - port: int = 995, - keyfile: StrOrBytesPath | None = None, - certfile: StrOrBytesPath | None = None, - timeout: float = ..., - context: None = None, - ) -> None: ... - - keyfile: StrOrBytesPath | None - certfile: StrOrBytesPath | None - # "context" is actually the last argument, - # but that breaks LSP and it doesn't really matter because all the arguments are ignored - def stls(self, context: Any = None, keyfile: Any = None, certfile: Any = None) -> NoReturn: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/posixpath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/posixpath.vpi deleted file mode 100644 index b4068629..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/posixpath.vpi +++ /dev/null @@ -1,230 +0,0 @@ -import sys -from _typeshed import AnyOrLiteralStr, BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath -from collections.abc import Iterable -from genericpath import ( - ALLOW_MISSING as ALLOW_MISSING, - _AllowMissingType, - commonprefix as commonprefix, - exists as exists, - getatime as getatime, - getctime as getctime, - getmtime as getmtime, - getsize as getsize, - isdir as isdir, - isfile as isfile, - samefile as samefile, - sameopenfile as sameopenfile, - samestat as samestat, -) - -if sys.version_info >= (3, 15): - from genericpath import ALL_BUT_LAST as ALL_BUT_LAST - -if sys.version_info >= (3, 13): - from genericpath import isdevdrive as isdevdrive -from os import PathLike -from typing import AnyStr, overload -from typing_extensions import LiteralString - -__all__ = [ - "normcase", - "isabs", - "join", - "splitdrive", - "split", - "splitext", - "basename", - "dirname", - "commonprefix", - "getsize", - "getmtime", - "getatime", - "getctime", - "islink", - "exists", - "lexists", - "isdir", - "isfile", - "ismount", - "expanduser", - "expandvars", - "normpath", - "abspath", - "samefile", - "sameopenfile", - "samestat", - "curdir", - "pardir", - "sep", - "pathsep", - "defpath", - "altsep", - "extsep", - "devnull", - "realpath", - "supports_unicode_filenames", - "relpath", - "commonpath", -] -__all__ += ["ALLOW_MISSING"] -if sys.version_info >= (3, 15): - __all__ += ["ALL_BUT_LAST"] -if sys.version_info >= (3, 12): - __all__ += ["isjunction", "splitroot"] -if sys.version_info >= (3, 13): - __all__ += ["isdevdrive"] - -supports_unicode_filenames: bool -# aliases (also in os) -curdir: LiteralString -pardir: LiteralString -sep: LiteralString -altsep: LiteralString | None -extsep: LiteralString -pathsep: LiteralString -defpath: LiteralString -devnull: LiteralString - -# Overloads are necessary to work around python/mypy#17952 & python/mypy#11880 -@overload -def abspath(path: PathLike[AnyStr]) -> AnyStr: ... -@overload -def abspath(path: AnyStr) -> AnyStr: ... - -if sys.version_info >= (3, 15): - @overload - def basename(p: PathLike[AnyStr], /) -> AnyStr: ... - @overload - def basename(p: AnyOrLiteralStr, /) -> AnyOrLiteralStr: ... - - @overload - def dirname(p: PathLike[AnyStr], /) -> AnyStr: ... - @overload - def dirname(p: AnyOrLiteralStr, /) -> AnyOrLiteralStr: ... -else: - @overload - def basename(p: PathLike[AnyStr]) -> AnyStr: ... - @overload - def basename(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ... - - @overload - def dirname(p: PathLike[AnyStr]) -> AnyStr: ... - @overload - def dirname(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ... - -@overload -def expanduser(path: PathLike[AnyStr]) -> AnyStr: ... -@overload -def expanduser(path: AnyStr) -> AnyStr: ... - -@overload -def expandvars(path: PathLike[AnyStr]) -> AnyStr: ... -@overload -def expandvars(path: AnyStr) -> AnyStr: ... - -if sys.version_info >= (3, 15): - @overload - def normcase(s: PathLike[AnyStr], /) -> AnyStr: ... - @overload - def normcase(s: AnyOrLiteralStr, /) -> AnyOrLiteralStr: ... -else: - @overload - def normcase(s: PathLike[AnyStr]) -> AnyStr: ... - @overload - def normcase(s: AnyOrLiteralStr) -> AnyOrLiteralStr: ... - -@overload -def normpath(path: PathLike[AnyStr]) -> AnyStr: ... -@overload -def normpath(path: AnyOrLiteralStr) -> AnyOrLiteralStr: ... - -@overload -def commonpath(paths: Iterable[LiteralString]) -> LiteralString: ... -@overload -def commonpath(paths: Iterable[StrPath]) -> str: ... -@overload -def commonpath(paths: Iterable[BytesPath]) -> bytes: ... - -# First parameter is not actually pos-only before Python 3.15, -# but must be defined as pos-only in the stub or cross-platform code doesn't type-check, -# as the parameter name is different in ntpath.join() -@overload -def join(a: LiteralString, /, *paths: LiteralString) -> LiteralString: ... -@overload -def join(a: StrPath, /, *paths: StrPath) -> str: ... -@overload -def join(a: BytesPath, /, *paths: BytesPath) -> bytes: ... - -if sys.version_info >= (3, 15): - @overload - def realpath(filename: PathLike[AnyStr], /, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - @overload - def realpath(filename: AnyStr, /, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... -else: - @overload - def realpath(filename: PathLike[AnyStr], *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - @overload - def realpath(filename: AnyStr, *, strict: bool | _AllowMissingType = False) -> AnyStr: ... - -@overload -def relpath(path: LiteralString, start: LiteralString | None = None) -> LiteralString: ... -@overload -def relpath(path: BytesPath, start: BytesPath | None = None) -> bytes: ... -@overload -def relpath(path: StrPath, start: StrPath | None = None) -> str: ... - -if sys.version_info >= (3, 15): - @overload - def split(p: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr]: ... - @overload - def split(p: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... - - @overload - def splitdrive(p: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr]: ... - @overload - def splitdrive(p: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... -else: - @overload - def split(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ... - @overload - def split(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... - - @overload - def splitdrive(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ... - @overload - def splitdrive(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... - -if sys.version_info >= (3, 15): - @overload - def splitext(p: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr]: ... - @overload - def splitext(p: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... -else: - @overload - def splitext(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ... - @overload - def splitext(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr]: ... - -if sys.version_info >= (3, 15): - def isabs(s: StrOrBytesPath, /) -> bool: ... - -else: - def isabs(s: StrOrBytesPath) -> bool: ... - -def islink(path: FileDescriptorOrPath) -> bool: ... -def ismount(path: FileDescriptorOrPath) -> bool: ... -def lexists(path: FileDescriptorOrPath) -> bool: ... - -if sys.version_info >= (3, 12): - def isjunction(path: StrOrBytesPath) -> bool: ... - - if sys.version_info >= (3, 15): - @overload - def splitroot(path: AnyOrLiteralStr, /) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... - @overload - def splitroot(path: PathLike[AnyStr], /) -> tuple[AnyStr, AnyStr, AnyStr]: ... - else: - @overload - def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... - @overload - def splitroot(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pprint.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pprint.vpi deleted file mode 100644 index dd290202..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pprint.vpi +++ /dev/null @@ -1,170 +0,0 @@ -import sys -from _typeshed import SupportsWrite -from collections import deque -from typing import IO - -__all__ = ["pprint", "pformat", "isreadable", "isrecursive", "saferepr", "PrettyPrinter", "pp"] - -if sys.version_info >= (3, 15): - # The `expand` parameter was added in Python 3.15. - def pformat( - object: object, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - expand: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> str: ... - -else: - def pformat( - object: object, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> str: ... - -if sys.version_info >= (3, 15): - # The `expand` parameter was added in Python 3.15. - def pp( - object: object, - stream: IO[str] | None = None, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - expand: bool = False, - sort_dicts: bool = False, - underscore_numbers: bool = False, - ) -> None: ... - -else: - def pp( - object: object, - stream: IO[str] | None = None, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - sort_dicts: bool = False, - underscore_numbers: bool = False, - ) -> None: ... - -if sys.version_info >= (3, 15): - # The `expand` parameter was added in Python 3.15. - def pprint( - object: object, - stream: IO[str] | None = None, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - expand: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> None: ... - -else: - def pprint( - object: object, - stream: IO[str] | None = None, - indent: int = 1, - width: int = 80, - depth: int | None = None, - *, - compact: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> None: ... - -def isreadable(object: object) -> bool: ... -def isrecursive(object: object) -> bool: ... -def saferepr(object: object) -> str: ... - -class PrettyPrinter: - if sys.version_info >= (3, 15): - # The `expand` parameter was added in Python 3.15. - def __init__( - self, - indent: int = 1, - width: int = 80, - depth: int | None = None, - stream: IO[str] | None = None, - *, - compact: bool = False, - expand: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> None: ... - else: - def __init__( - self, - indent: int = 1, - width: int = 80, - depth: int | None = None, - stream: IO[str] | None = None, - *, - compact: bool = False, - sort_dicts: bool = True, - underscore_numbers: bool = False, - ) -> None: ... - - def pformat(self, object: object) -> str: ... - def pprint(self, object: object) -> None: ... - def isreadable(self, object: object) -> bool: ... - def isrecursive(self, object: object) -> bool: ... - def format(self, object: object, context: dict[int, int], maxlevels: int, level: int) -> tuple[str, bool, bool]: ... - def _format( - self, object: object, stream: SupportsWrite[str], indent: int, allowance: int, context: dict[int, int], level: int - ) -> None: ... - def _pprint_dict( - self, - object: dict[object, object], - stream: SupportsWrite[str], - indent: int, - allowance: int, - context: dict[int, int], - level: int, - ) -> None: ... - def _pprint_list( - self, object: list[object], stream: SupportsWrite[str], indent: int, allowance: int, context: dict[int, int], level: int - ) -> None: ... - def _pprint_tuple( - self, - object: tuple[object, ...], - stream: SupportsWrite[str], - indent: int, - allowance: int, - context: dict[int, int], - level: int, - ) -> None: ... - def _pprint_set( - self, object: set[object], stream: SupportsWrite[str], indent: int, allowance: int, context: dict[int, int], level: int - ) -> None: ... - def _pprint_deque( - self, object: deque[object], stream: SupportsWrite[str], indent: int, allowance: int, context: dict[int, int], level: int - ) -> None: ... - def _format_dict_items( - self, - items: list[tuple[object, object]], - stream: SupportsWrite[str], - indent: int, - allowance: int, - context: dict[int, int], - level: int, - ) -> None: ... - def _format_items( - self, items: list[object], stream: SupportsWrite[str], indent: int, allowance: int, context: dict[int, int], level: int - ) -> None: ... - def _repr(self, object: object, context: dict[int, int], level: int) -> str: ... - def _safe_repr(self, object: object, context: dict[int, int], maxlevels: int, level: int) -> tuple[str, bool, bool]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profile.vpi deleted file mode 100644 index 06ce9a0e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profile.vpi +++ /dev/null @@ -1,31 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Mapping -from typing import Any, ParamSpec, TypeAlias, TypeVar -from typing_extensions import Self - -__all__ = ["run", "runctx", "Profile"] - -def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ... -def runctx( - statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1 -) -> None: ... - -_T = TypeVar("_T") -_P = ParamSpec("_P") -_Label: TypeAlias = tuple[str, int, str] - -class Profile: - bias: int - stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented - def __init__(self, timer: Callable[[], float] | None = None, bias: int | None = None) -> None: ... - def set_cmd(self, cmd: str) -> None: ... - def simulate_call(self, name: str) -> None: ... - def simulate_cmd_complete(self) -> None: ... - def print_stats(self, sort: str | int = -1) -> None: ... - def dump_stats(self, file: StrOrBytesPath) -> None: ... - def create_stats(self) -> None: ... - def snapshot_stats(self) -> None: ... - def run(self, cmd: str) -> Self: ... - def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ... - def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ... - def calibrate(self, m: int, verbose: int = 0) -> float: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/__init__.vpi deleted file mode 100644 index 435f5a6c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/__init__.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from . import sampling as sampling, tracing as tracing - -__all__ = ("tracing", "sampling") diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/__init__.vpi deleted file mode 100644 index 1f8b3f7d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/__init__.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from .collector import Collector as Collector -from .gecko_collector import GeckoCollector as GeckoCollector -from .heatmap_collector import HeatmapCollector as HeatmapCollector -from .jsonl_collector import JsonlCollector as JsonlCollector -from .pstats_collector import PstatsCollector as PstatsCollector -from .stack_collector import CollapsedStackCollector as CollapsedStackCollector -from .string_table import StringTable as StringTable - -__all__ = ( - "Collector", - "PstatsCollector", - "CollapsedStackCollector", - "HeatmapCollector", - "GeckoCollector", - "JsonlCollector", - "StringTable", -) diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/collector.vpi deleted file mode 100644 index a72a185a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/collector.vpi +++ /dev/null @@ -1,25 +0,0 @@ -from _typeshed import StrOrBytesPath -from abc import ABC, abstractmethod -from collections.abc import Sequence -from typing import ClassVar, TypeAlias - -from _remote_debugging import AwaitedInfo, FrameInfo, InterpreterInfo, LocationInfo - -_Location: TypeAlias = int | tuple[int, int, int, int] | LocationInfo | None -_Frame: TypeAlias = FrameInfo | tuple[str, _Location, str, int | None] -_Timestamps: TypeAlias = Sequence[int] | None - -def normalize_location(location: _Location) -> tuple[int, int, int, int]: ... -def extract_lineno(location: _Location) -> int: ... -def filter_internal_frames(frames: Sequence[_Frame]) -> list[_Frame]: ... -def iter_async_frames(awaited_info_list: Sequence[AwaitedInfo]) -> object: ... - -class Collector(ABC): - aggregating: ClassVar[bool] # undocumented - @abstractmethod - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def collect_failed_sample(self) -> None: ... - @abstractmethod - def export(self, filename: StrOrBytesPath) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.vpi deleted file mode 100644 index 666fd42c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/gecko_collector.vpi +++ /dev/null @@ -1,111 +0,0 @@ -from _typeshed import Incomplete, StrOrBytesPath, StrPath -from collections.abc import Generator, Sequence -from tempfile import TemporaryDirectory -from typing import Any, ClassVar, Final, TypedDict, type_check_only - -from _remote_debugging import AwaitedInfo, InterpreterInfo - -from .collector import Collector, _Timestamps - -@type_check_only -class _GeckoCategory(TypedDict): - name: str - color: str - subcategories: list[str] - -THREAD_STATUS_HAS_GIL: Final[int] -THREAD_STATUS_ON_CPU: Final[int] -THREAD_STATUS_UNKNOWN: Final[int] -THREAD_STATUS_GIL_REQUESTED: Final[int] -THREAD_STATUS_HAS_EXCEPTION: Final[int] -THREAD_STATUS_MAIN_THREAD: Final[int] - -GECKO_CATEGORIES: Final[list[_GeckoCategory]] - -CATEGORY_OTHER: Final = 0 -CATEGORY_PYTHON: Final = 1 -CATEGORY_NATIVE: Final = 2 -CATEGORY_GC: Final = 3 -CATEGORY_GIL: Final = 4 -CATEGORY_CPU: Final = 5 -CATEGORY_CODE_TYPE: Final = 6 -CATEGORY_OPCODES: Final = 7 -CATEGORY_EXCEPTION: Final = 8 - -DEFAULT_SUBCATEGORY: Final = 0 - -GECKO_FORMAT_VERSION: Final = 32 -GECKO_PREPROCESSED_VERSION: Final = 57 - -RESOURCE_TYPE_LIBRARY: Final = 1 - -FRAME_ADDRESS_NONE: Final = -1 -FRAME_INLINE_DEPTH_ROOT: Final = 0 - -PROCESS_TYPE_MAIN: Final = 0 -STACKWALK_DISABLED: Final = 0 - -DEFAULT_SPILL_BUFFER_BYTES: Final[int] - -class SpillColumn: - path: str - buffer: bytearray - - def __init__(self, directory: StrPath, basename: StrPath, *, buffer_bytes: int | None = None) -> None: ... - # "value" accepts the same types as json.JSONEncoder.encode() - def append(self, value: Any) -> None: ... - def flush(self) -> None: ... - def iter_tokens(self) -> Generator[str]: ... - -class GeckoThreadSpill: - sample_count: int - marker_count: int - def __init__(self, directory: StrPath, tid: int) -> None: ... - def append_sample(self, stack_index: int, time_ms: float) -> None: ... - def append_marker( - self, name_idx: int, start_time: float, end_time: float, phase: int, category: int, data: dict[str, Any] - ) -> None: ... - def prepare_read(self) -> None: ... - -class GeckoCollector(Collector): - aggregating: ClassVar[bool] - - sample_interval_usec: int - skip_idle: bool - opcodes_enabled: bool - start_time: float - - global_strings: list[str] - global_string_map: dict[str, int] - - threads: dict[int, dict[str, Any]] - spill_dir: TemporaryDirectory[str] | None - exported: bool - - libs: list[Incomplete] - - sample_count: int - last_sample_time: float - interval: float - - has_gil_start: dict[Incomplete, Incomplete] - no_gil_start: dict[Incomplete, Incomplete] - on_cpu_start: dict[Incomplete, Incomplete] - off_cpu_start: dict[Incomplete, Incomplete] - python_code_start: dict[Incomplete, Incomplete] - native_code_start: dict[Incomplete, Incomplete] - gil_wait_start: dict[Incomplete, Incomplete] - exception_start: dict[Incomplete, Incomplete] - no_exception_start: dict[Incomplete, Incomplete] - - gc_start_per_thread: dict[int, float] - - initialized_threads: set[Incomplete] - - opcode_state: dict[int, tuple[Incomplete, int, int, str, str, float]] - - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, opcodes: bool = False) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def export(self, filename: StrOrBytesPath) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.vpi deleted file mode 100644 index bd523bc3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/heatmap_collector.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Sequence - -from _remote_debugging import AwaitedInfo, InterpreterInfo - -from .collector import Collector, _Frame, _Timestamps - -class HeatmapCollector(Collector): - FILE_INDEX_FORMAT: str - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def export(self, output_path: StrOrBytesPath) -> None: ... - def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... - def set_stats( - self, - sample_interval_usec: int, - duration_sec: float, - sample_rate: float, - error_rate: float | None = None, - missed_samples: float | None = None, - **kwargs: object, - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.vpi deleted file mode 100644 index 3bdc4b81..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/jsonl_collector.vpi +++ /dev/null @@ -1,15 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Sequence - -from _remote_debugging import AwaitedInfo, InterpreterInfo - -from .collector import _Frame, _Timestamps -from .stack_collector import StackTraceCollector - -class JsonlCollector(StackTraceCollector): - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, mode: int | None = None) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def export(self, filename: StrOrBytesPath) -> None: ... - def process_frames(self, frames: Sequence[_Frame], _thread_id: int, weight: int = 1) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.vpi deleted file mode 100644 index 178d55a7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/pstats_collector.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Sequence - -from _remote_debugging import AwaitedInfo, InterpreterInfo - -from .collector import Collector, _Timestamps - -class PstatsCollector(Collector): - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def export(self, filename: StrOrBytesPath) -> None: ... - def create_stats(self) -> None: ... - def print_stats( - self, sort: int = -1, limit: int | None = None, show_summary: bool = True, mode: int | None = None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/stack_collector.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/stack_collector.vpi deleted file mode 100644 index 0788e082..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/stack_collector.vpi +++ /dev/null @@ -1,39 +0,0 @@ -from _typeshed import StrOrBytesPath -from abc import ABCMeta -from collections.abc import Sequence - -from _remote_debugging import AwaitedInfo, InterpreterInfo - -from .collector import Collector, _Frame, _Timestamps - -class StackTraceCollector(Collector, metaclass=ABCMeta): - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... - -class CollapsedStackCollector(StackTraceCollector): - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... - def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... - def export(self, filename: StrOrBytesPath) -> None: ... - -class FlamegraphCollector(StackTraceCollector): - def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... - def collect( - self, stack_frames: Sequence[InterpreterInfo] | Sequence[AwaitedInfo], timestamps_us: _Timestamps = None - ) -> None: ... - def set_stats( - self, - sample_interval_usec: int, - duration_sec: float, - sample_rate: float, - error_rate: float | None = None, - missed_samples: float | None = None, - mode: int | None = None, - ) -> None: ... - def export(self, filename: StrOrBytesPath) -> None: ... - def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... - -class DiffFlamegraphCollector(FlamegraphCollector): - def __init__(self, sample_interval_usec: int, *, baseline_binary_path: StrOrBytesPath, skip_idle: bool = False) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/string_table.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/string_table.vpi deleted file mode 100644 index cb71e82e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/sampling/string_table.vpi +++ /dev/null @@ -1,5 +0,0 @@ -class StringTable: - def intern(self, string: object) -> int: ... - def get_string(self, index: int) -> str: ... - def get_strings(self) -> list[str]: ... - def __len__(self) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/tracing.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/tracing.vpi deleted file mode 100644 index af4ab508..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/profiling/tracing.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from cProfile import Profile as Profile, run as run, runctx as runctx -from types import CodeType -from typing import TypeAlias - -__all__ = ("run", "runctx", "Profile") - -_Label: TypeAlias = tuple[str, int, str] - -def label(code: str | CodeType) -> _Label: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pstats.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pstats.vpi deleted file mode 100644 index 19eb683d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pstats.vpi +++ /dev/null @@ -1,96 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Iterable -from cProfile import Profile as _cProfile -from dataclasses import dataclass -from profile import Profile -from typing import IO, Any, Literal, TypeAlias, overload -from typing_extensions import Self - -if sys.version_info >= (3, 11): - from enum import StrEnum -else: - from enum import Enum - -__all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] - -_Selector: TypeAlias = str | float | int - -if sys.version_info >= (3, 11): - class SortKey(StrEnum): - CALLS = "calls" - CUMULATIVE = "cumulative" - FILENAME = "filename" - LINE = "line" - NAME = "name" - NFL = "nfl" - PCALLS = "pcalls" - STDNAME = "stdname" - TIME = "time" - -else: - class SortKey(str, Enum): - CALLS = "calls" - CUMULATIVE = "cumulative" - FILENAME = "filename" - LINE = "line" - NAME = "name" - NFL = "nfl" - PCALLS = "pcalls" - STDNAME = "stdname" - TIME = "time" - -@dataclass(unsafe_hash=True) -class FunctionProfile: - ncalls: str - tottime: float - percall_tottime: float - cumtime: float - percall_cumtime: float - file_name: str - line_number: int - -@dataclass(unsafe_hash=True) -class StatsProfile: - total_tt: float - func_profiles: dict[str, FunctionProfile] - -_SortArgDict: TypeAlias = dict[str, tuple[tuple[tuple[int, int], ...], str]] - -class Stats: - sort_arg_dict_default: _SortArgDict - def __init__( - self, - arg: None | str | Profile | _cProfile = None, - /, - *args: None | str | Profile | _cProfile | Self, - stream: IO[Any] | None = None, - ) -> None: ... - def init(self, arg: None | str | Profile | _cProfile) -> None: ... - def load_stats(self, arg: None | str | Profile | _cProfile) -> None: ... - def get_top_level_stats(self) -> None: ... - def add(self, *arg_list: None | str | Profile | _cProfile | Self) -> Self: ... - def dump_stats(self, filename: StrOrBytesPath) -> None: ... - def get_sort_arg_defs(self) -> _SortArgDict: ... - - @overload - def sort_stats(self, field: Literal[-1, 0, 1, 2]) -> Self: ... - @overload - def sort_stats(self, *field: str) -> Self: ... - - def reverse_order(self) -> Self: ... - def strip_dirs(self) -> Self: ... - def calc_callees(self) -> None: ... - def eval_print_amount(self, sel: _Selector, list: list[str], msg: str) -> tuple[list[str], str]: ... - def get_stats_profile(self) -> StatsProfile: ... - def get_print_list(self, sel_list: Iterable[_Selector]) -> tuple[int, list[str]]: ... - def print_stats(self, *amount: _Selector) -> Self: ... - def print_callees(self, *amount: _Selector) -> Self: ... - def print_callers(self, *amount: _Selector) -> Self: ... - def print_call_heading(self, name_size: int, column_title: str) -> None: ... - if sys.version_info >= (3, 15): - def print_call_subheading(self, name_size: int) -> None: ... - - def print_call_line(self, name_size: int, source: str, call_dict: dict[str, Any], arrow: str = "->") -> None: ... - def print_title(self) -> None: ... - def print_line(self, func: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pty.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pty.vpi deleted file mode 100644 index e74c02ab..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pty.vpi +++ /dev/null @@ -1,24 +0,0 @@ -import sys -from collections.abc import Callable, Iterable -from typing import Final, TypeAlias -from typing_extensions import deprecated - -if sys.platform != "win32": - __all__ = ["openpty", "fork", "spawn"] - _Reader: TypeAlias = Callable[[int], bytes] - - STDIN_FILENO: Final = 0 - STDOUT_FILENO: Final = 1 - STDERR_FILENO: Final = 2 - - CHILD: Final = 0 - def openpty() -> tuple[int, int]: ... - - if sys.version_info < (3, 14): - @deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `openpty()` instead.") - def master_open() -> tuple[int, str]: ... - @deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `openpty()` instead.") - def slave_open(tty_name: str) -> int: ... - - def fork() -> tuple[int, int]: ... - def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pwd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pwd.vpi deleted file mode 100644 index 6a7e24f7..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pwd.vpi +++ /dev/null @@ -1,27 +0,0 @@ -import sys -from _typeshed import structseq -from typing import Any, Final, final - -if sys.platform != "win32": - @final - class struct_passwd(structseq[Any], tuple[str, str, int, int, str, str, str]): - __match_args__: Final = ("pw_name", "pw_passwd", "pw_uid", "pw_gid", "pw_gecos", "pw_dir", "pw_shell") - - @property - def pw_name(self) -> str: ... - @property - def pw_passwd(self) -> str: ... - @property - def pw_uid(self) -> int: ... - @property - def pw_gid(self) -> int: ... - @property - def pw_gecos(self) -> str: ... - @property - def pw_dir(self) -> str: ... - @property - def pw_shell(self) -> str: ... - - def getpwall() -> list[struct_passwd]: ... - def getpwuid(uid: int, /) -> struct_passwd: ... - def getpwnam(name: str, /) -> struct_passwd: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/py_compile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/py_compile.vpi deleted file mode 100644 index e0ee67c5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/py_compile.vpi +++ /dev/null @@ -1,28 +0,0 @@ -import enum -from typing import AnyStr - -__all__ = ["compile", "main", "PyCompileError", "PycInvalidationMode"] - -class PyCompileError(Exception): - exc_type_name: str - exc_value: BaseException - file: str - msg: str - def __init__(self, exc_type: type[BaseException], exc_value: BaseException, file: str, msg: str = "") -> None: ... - -class PycInvalidationMode(enum.Enum): - TIMESTAMP = 1 - CHECKED_HASH = 2 - UNCHECKED_HASH = 3 - -def _get_default_invalidation_mode() -> PycInvalidationMode: ... -def compile( - file: AnyStr, - cfile: AnyStr | None = None, - dfile: AnyStr | None = None, - doraise: bool = False, - optimize: int = -1, - invalidation_mode: PycInvalidationMode | None = None, - quiet: int = 0, -) -> AnyStr | None: ... -def main() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pyclbr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pyclbr.vpi deleted file mode 100644 index 541f962d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pyclbr.vpi +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Mapping, Sequence - -__all__ = ["readmodule", "readmodule_ex", "Class", "Function"] - -class _Object: - module: str - name: str - file: int - lineno: int - end_lineno: int | None - parent: _Object | None - - # This is a dict at runtime, but we're typing it as Mapping to - # avoid variance issues in the subclasses - children: Mapping[str, _Object] - - def __init__( - self, module: str, name: str, file: str, lineno: int, end_lineno: int | None, parent: _Object | None - ) -> None: ... - -class Function(_Object): - is_async: bool - parent: Function | Class | None - children: dict[str, Class | Function] - - def __init__( - self, - module: str, - name: str, - file: str, - lineno: int, - parent: Function | Class | None = None, - is_async: bool = False, - *, - end_lineno: int | None = None, - ) -> None: ... - -class Class(_Object): - super: list[Class | str] | None - methods: dict[str, int] - parent: Class | None - children: dict[str, Class | Function] - - def __init__( - self, - module: str, - name: str, - super_: list[Class | str] | None, - file: str, - lineno: int, - parent: Class | None = None, - *, - end_lineno: int | None = None, - ) -> None: ... - -def readmodule(module: str, path: Sequence[str] | None = None) -> dict[str, Class]: ... -def readmodule_ex(module: str, path: Sequence[str] | None = None) -> dict[str, Class | Function | list[str]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc.vpi deleted file mode 100644 index 2e423dd3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc.vpi +++ /dev/null @@ -1,348 +0,0 @@ -import sys -from _typeshed import OptExcInfo, StrPath, SupportsWrite, Unused -from abc import abstractmethod -from builtins import list as _list # "list" conflicts with method name -from collections.abc import Callable, Container, Mapping, MutableMapping -from reprlib import Repr -from types import MethodType, ModuleType, TracebackType -from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeGuard, TypeVar, overload, type_check_only -from typing_extensions import deprecated - -__all__ = ["help"] - -_T = TypeVar("_T") - -__author__: Final[str] -__date__: Final[str] -__version__: Final[str] -__credits__: Final[str] - -@type_check_only -class _Pager(Protocol): - def __call__(self, text: str, title: str = "") -> None: ... - -def pathdirs() -> list[str]: ... -def getdoc(object: object) -> str: ... -def splitdoc(doc: AnyStr) -> tuple[AnyStr, AnyStr]: ... -def classname(object: object, modname: str) -> str: ... -def isdata(object: object) -> bool: ... -def replace(text: AnyStr, *pairs: AnyStr) -> AnyStr: ... -def cram(text: str, maxlen: int) -> str: ... -def stripid(text: str) -> str: ... -def allmethods(cl: type) -> MutableMapping[str, MethodType]: ... -def visiblename(name: str, all: Container[str] | None = None, obj: object = None) -> bool: ... -def classify_class_attrs(object: object) -> list[tuple[str, str, type, str]]: ... -@deprecated("Deprecated since Python 3.13.") -def ispackage(path: StrPath) -> bool: ... # undocumented -def source_synopsis(file: IO[AnyStr]) -> AnyStr | None: ... -def synopsis(filename: str, cache: MutableMapping[str, tuple[int, str]] = {}) -> str | None: ... - -class ErrorDuringImport(Exception): - filename: str - exc: type[BaseException] | None - value: BaseException | None - tb: TracebackType | None - if sys.version_info >= (3, 12): - @overload - def __init__(self, filename: str, exc_info: BaseException) -> None: ... - @overload - @deprecated("A tuple value for `exc_info` parameter is deprecated since Python 3.12. Use an exception instance.") - def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ... - else: - def __init__(self, filename: str, exc_info: OptExcInfo) -> None: ... - -def importfile(path: str) -> ModuleType: ... -def safeimport(path: str, forceload: bool = ..., cache: MutableMapping[str, ModuleType] = {}) -> ModuleType | None: ... - -class Doc: - PYTHONDOCS: str - if sys.version_info >= (3, 15): - STDLIB_DIR: str - - def document(self, object: object, name: str | None = None, *args: Any) -> str: ... - def fail(self, object: object, name: str | None = None, *args: Any) -> NoReturn: ... - @abstractmethod - def docmodule(self, object: object, name: str | None = None, *args: Any) -> str: ... - @abstractmethod - def docclass(self, object: object, name: str | None = None, *args: Any) -> str: ... - @abstractmethod - def docroutine(self, object: object, name: str | None = None, *args: Any) -> str: ... - @abstractmethod - def docother(self, object: object, name: str | None = None, *args: Any) -> str: ... - @abstractmethod - def docproperty(self, object: object, name: str | None = None, *args: Any) -> str: ... - @abstractmethod - def docdata(self, object: object, name: str | None = None, *args: Any) -> str: ... - if sys.version_info >= (3, 15): - def getdocloc(self, object: object, basedir: str | None = None) -> str | None: ... - else: - def getdocloc(self, object: object, basedir: str = ...) -> str | None: ... - -class HTMLRepr(Repr): - def __init__(self) -> None: ... - def escape(self, text: str) -> str: ... - def repr(self, object: object) -> str: ... - def repr1(self, x: object, level: complex) -> str: ... - def repr_string(self, x: str, level: complex) -> str: ... - def repr_str(self, x: str, level: complex) -> str: ... - def repr_instance(self, x: object, level: complex) -> str: ... - def repr_unicode(self, x: AnyStr, level: complex) -> str: ... - -class HTMLDoc(Doc): - _repr_instance: HTMLRepr - repr = _repr_instance.repr - escape = _repr_instance.escape - def page(self, title: str, contents: str) -> str: ... - if sys.version_info >= (3, 11): - def heading(self, title: str, extras: str = "") -> str: ... - def section( - self, - title: str, - cls: str, - contents: str, - width: int = 6, - prelude: str = "", - marginalia: str | None = None, - gap: str = " ", - ) -> str: ... - def multicolumn(self, list: list[_T], format: Callable[[_T], str]) -> str: ... - else: - def heading(self, title: str, fgcol: str, bgcol: str, extras: str = "") -> str: ... - def section( - self, - title: str, - fgcol: str, - bgcol: str, - contents: str, - width: int = 6, - prelude: str = "", - marginalia: str | None = None, - gap: str = " ", - ) -> str: ... - def multicolumn(self, list: list[_T], format: Callable[[_T], str], cols: int = 4) -> str: ... - - def bigsection(self, title: str, *args: Any) -> str: ... - def preformat(self, text: str) -> str: ... - def grey(self, text: str) -> str: ... - def namelink(self, name: str, *dicts: MutableMapping[str, str]) -> str: ... - def classlink(self, object: object, modname: str) -> str: ... - def modulelink(self, object: object) -> str: ... - def modpkglink(self, modpkginfo: tuple[str, str, bool, bool]) -> str: ... - def markup( - self, - text: str, - escape: Callable[[str], str] | None = None, - funcs: Mapping[str, str] = {}, - classes: Mapping[str, str] = {}, - methods: Mapping[str, str] = {}, - ) -> str: ... - def formattree( - self, tree: list[tuple[type, tuple[type, ...]] | list[Any]], modname: str, parent: type | None = None - ) -> str: ... - def docmodule(self, object: object, name: str | None = None, mod: str | None = None, *ignored: Unused) -> str: ... - def docclass( - self, - object: object, - name: str | None = None, - mod: str | None = None, - funcs: Mapping[str, str] = {}, - classes: Mapping[str, str] = {}, - *ignored: Unused, - ) -> str: ... - def formatvalue(self, object: object) -> str: ... - def docother(self, object: object, name: str | None = None, mod: Any | None = None, *ignored: Unused) -> str: ... - if sys.version_info >= (3, 11): - def docroutine( # type: ignore[override] - self, - object: object, - name: str | None = None, - mod: str | None = None, - funcs: Mapping[str, str] = {}, - classes: Mapping[str, str] = {}, - methods: Mapping[str, str] = {}, - cl: type | None = None, - homecls: type | None = None, - ) -> str: ... - def docproperty( - self, object: object, name: str | None = None, mod: str | None = None, cl: Any | None = None, *ignored: Unused - ) -> str: ... - def docdata( - self, object: object, name: str | None = None, mod: Any | None = None, cl: Any | None = None, *ignored: Unused - ) -> str: ... - else: - def docroutine( # type: ignore[override] - self, - object: object, - name: str | None = None, - mod: str | None = None, - funcs: Mapping[str, str] = {}, - classes: Mapping[str, str] = {}, - methods: Mapping[str, str] = {}, - cl: type | None = None, - ) -> str: ... - def docproperty(self, object: object, name: str | None = None, mod: str | None = None, cl: Any | None = None) -> str: ... # type: ignore[override] - def docdata(self, object: object, name: str | None = None, mod: Any | None = None, cl: Any | None = None) -> str: ... # type: ignore[override] - if sys.version_info >= (3, 11): - def parentlink(self, object: type | ModuleType, modname: str) -> str: ... - - def index(self, dir: str, shadowed: MutableMapping[str, bool] | None = None) -> str: ... - def filelink(self, url: str, path: str) -> str: ... - -class TextRepr(Repr): - def __init__(self) -> None: ... - def repr1(self, x: object, level: complex) -> str: ... - def repr_string(self, x: str, level: complex) -> str: ... - def repr_str(self, x: str, level: complex) -> str: ... - def repr_instance(self, x: object, level: complex) -> str: ... - -class TextDoc(Doc): - _repr_instance: TextRepr - repr = _repr_instance.repr - def bold(self, text: str) -> str: ... - def indent(self, text: str, prefix: str = " ") -> str: ... - def section(self, title: str, contents: str) -> str: ... - def formattree( - self, tree: list[tuple[type, tuple[type, ...]] | list[Any]], modname: str, parent: type | None = None, prefix: str = "" - ) -> str: ... - def docclass(self, object: object, name: str | None = None, mod: str | None = None, *ignored: Unused) -> str: ... - def formatvalue(self, object: object) -> str: ... - if sys.version_info >= (3, 11): - def docroutine( # type: ignore[override] - self, - object: object, - name: str | None = None, - mod: str | None = None, - cl: Any | None = None, - homecls: Any | None = None, - ) -> str: ... - def docmodule(self, object: object, name: str | None = None, mod: Any | None = None, *ignored: Unused) -> str: ... - def docproperty( - self, object: object, name: str | None = None, mod: Any | None = None, cl: Any | None = None, *ignored: Unused - ) -> str: ... - def docdata( - self, object: object, name: str | None = None, mod: str | None = None, cl: Any | None = None, *ignored: Unused - ) -> str: ... - def docother( - self, - object: object, - name: str | None = None, - mod: str | None = None, - parent: str | None = None, - *ignored: Unused, - maxlen: int | None = None, - doc: Any | None = None, - ) -> str: ... - else: - def docroutine(self, object: object, name: str | None = None, mod: str | None = None, cl: Any | None = None) -> str: ... # type: ignore[override] - def docmodule(self, object: object, name: str | None = None, mod: Any | None = None) -> str: ... # type: ignore[override] - def docproperty(self, object: object, name: str | None = None, mod: Any | None = None, cl: Any | None = None) -> str: ... # type: ignore[override] - def docdata(self, object: object, name: str | None = None, mod: str | None = None, cl: Any | None = None) -> str: ... # type: ignore[override] - def docother( # type: ignore[override] - self, - object: object, - name: str | None = None, - mod: str | None = None, - parent: str | None = None, - maxlen: int | None = None, - doc: Any | None = None, - ) -> str: ... - -if sys.version_info >= (3, 13): - def pager(text: str, title: str = "") -> None: ... - -else: - def pager(text: str) -> None: ... - -def plain(text: str) -> str: ... -def describe(thing: Any) -> str: ... -def locate(path: str, forceload: bool = ...) -> object: ... - -if sys.version_info >= (3, 13): - def get_pager() -> _Pager: ... - def pipe_pager(text: str, cmd: str, title: str = "") -> None: ... - def tempfile_pager(text: str, cmd: str, title: str = "") -> None: ... - def tty_pager(text: str, title: str = "") -> None: ... - def plain_pager(text: str, title: str = "") -> None: ... - - # For backwards compatibility. - getpager = get_pager - pipepager = pipe_pager - tempfilepager = tempfile_pager - ttypager = tty_pager - plainpager = plain_pager -else: - def getpager() -> Callable[[str], None]: ... - def pipepager(text: str, cmd: str) -> None: ... - def tempfilepager(text: str, cmd: str) -> None: ... - def ttypager(text: str) -> None: ... - def plainpager(text: str) -> None: ... - -text: TextDoc -html: HTMLDoc - -def resolve(thing: str | object, forceload: bool = ...) -> tuple[object, str] | None: ... -def render_doc( - thing: str | object, title: str = "Python Library Documentation: %s", forceload: bool = ..., renderer: Doc | None = None -) -> str: ... - -if sys.version_info >= (3, 11): - def doc( - thing: str | object, - title: str = "Python Library Documentation: %s", - forceload: bool = ..., - output: SupportsWrite[str] | None = None, - is_cli: bool = False, - ) -> None: ... - -else: - def doc( - thing: str | object, - title: str = "Python Library Documentation: %s", - forceload: bool = ..., - output: SupportsWrite[str] | None = None, - ) -> None: ... - -def writedoc(thing: str | object, forceload: bool = ...) -> None: ... -def writedocs(dir: str, pkgpath: str = "", done: Any | None = None) -> None: ... - -class Helper: - keywords: dict[str, str | tuple[str, str]] - symbols: dict[str, str] - topics: dict[str, str | tuple[str, ...]] - def __init__(self, input: IO[str] | None = None, output: IO[str] | None = None) -> None: ... - @property - def input(self) -> IO[str]: ... - @property - def output(self) -> IO[str]: ... - def __call__(self, request: str | Helper | object = ...) -> None: ... - def interact(self) -> None: ... - def getline(self, prompt: str) -> str: ... - if sys.version_info >= (3, 11): - def help(self, request: Any, is_cli: bool = False) -> None: ... - else: - def help(self, request: Any) -> None: ... - - def intro(self) -> None: ... - def list(self, items: _list[str], columns: int = 4, width: int = 80) -> None: ... - def listkeywords(self) -> None: ... - def listsymbols(self) -> None: ... - def listtopics(self) -> None: ... - def showtopic(self, topic: str, more_xrefs: str = "") -> None: ... - def showsymbol(self, symbol: str) -> None: ... - def listmodules(self, key: str = "") -> None: ... - -help: Helper - -class ModuleScanner: - quit: bool - def run( - self, - callback: Callable[[str | None, str, str], object], - key: str | None = None, - completer: Callable[[], object] | None = None, - onerror: Callable[[str], object] | None = None, - ) -> None: ... - -def apropos(key: str) -> None: ... -def ispath(x: object) -> TypeGuard[str]: ... -def cli() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/module_docs.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/module_docs.vpi deleted file mode 100644 index e3f716c0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/module_docs.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Final - -module_docs: Final[dict[str, str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/topics.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/topics.vpi deleted file mode 100644 index ce907a41..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pydoc_data/topics.vpi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Final - -topics: Final[dict[str, str]] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/__init__.vpi deleted file mode 100644 index 83841a22..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/__init__.vpi +++ /dev/null @@ -1,91 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, SupportsRead -from collections.abc import Callable -from pyexpat import errors as errors, model as model -from typing import Any, Final, TypeAlias, final -from typing_extensions import CapsuleType -from xml.parsers.expat import ExpatError as ExpatError - -EXPAT_VERSION: Final[str] # undocumented -version_info: tuple[int, int, int] # undocumented -native_encoding: str # undocumented -features: list[tuple[str, int]] # undocumented - -error = ExpatError -XML_PARAM_ENTITY_PARSING_NEVER: Final = 0 -XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: Final = 1 -XML_PARAM_ENTITY_PARSING_ALWAYS: Final = 2 - -_Model: TypeAlias = tuple[int, int, str | None, tuple[Any, ...]] - -@final -class XMLParserType: - def Parse(self, data: str | ReadableBuffer, isfinal: bool = False, /) -> int: ... - def ParseFile(self, file: SupportsRead[bytes], /) -> int: ... - def SetBase(self, base: str, /) -> None: ... - def GetBase(self) -> str | None: ... - def GetInputContext(self) -> bytes | None: ... - def ExternalEntityParserCreate(self, context: str | None, encoding: str = ..., /) -> XMLParserType: ... - def SetParamEntityParsing(self, flag: int, /) -> int: ... - def UseForeignDTD(self, flag: bool = True, /) -> None: ... - def GetReparseDeferralEnabled(self) -> bool: ... - def SetReparseDeferralEnabled(self, enabled: bool, /) -> None: ... - # Added in Python 3.10.20, 3.11.15, 3.12.3, 3.13.10, 3.14.1 - def SetAllocTrackerActivationThreshold(self, threshold: int, /) -> None: ... - def SetAllocTrackerMaximumAmplification(self, max_factor: float, /) -> None: ... - if sys.version_info >= (3, 13): - # Added in Python 3.13.4, 3.14.6 - def SetBillionLaughsAttackProtectionActivationThreshold(self, threshold: int, /) -> None: ... - def SetBillionLaughsAttackProtectionMaximumAmplification(self, max_factor: float, /) -> None: ... - - @property - def intern(self) -> dict[str, str]: ... - buffer_size: int - buffer_text: bool - buffer_used: int - namespace_prefixes: bool # undocumented - ordered_attributes: bool - specified_attributes: bool - ErrorByteIndex: int - ErrorCode: int - ErrorColumnNumber: int - ErrorLineNumber: int - CurrentByteIndex: int - CurrentColumnNumber: int - CurrentLineNumber: int - XmlDeclHandler: Callable[[str, str | None, int], Any] | None - StartDoctypeDeclHandler: Callable[[str, str | None, str | None, bool], Any] | None - EndDoctypeDeclHandler: Callable[[], Any] | None - ElementDeclHandler: Callable[[str, _Model], Any] | None - AttlistDeclHandler: Callable[[str, str, str, str | None, bool], Any] | None - StartElementHandler: ( - Callable[[str, dict[str, str]], Any] - | Callable[[str, list[str]], Any] - | Callable[[str, dict[str, str], list[str]], Any] - | None - ) - EndElementHandler: Callable[[str], Any] | None - ProcessingInstructionHandler: Callable[[str, str], Any] | None - CharacterDataHandler: Callable[[str], Any] | None - UnparsedEntityDeclHandler: Callable[[str, str | None, str, str | None, str], Any] | None - EntityDeclHandler: Callable[[str, bool, str | None, str | None, str, str | None, str | None], Any] | None - NotationDeclHandler: Callable[[str, str | None, str, str | None], Any] | None - StartNamespaceDeclHandler: Callable[[str, str], Any] | None - EndNamespaceDeclHandler: Callable[[str], Any] | None - CommentHandler: Callable[[str], Any] | None - StartCdataSectionHandler: Callable[[], Any] | None - EndCdataSectionHandler: Callable[[], Any] | None - DefaultHandler: Callable[[str], Any] | None - DefaultHandlerExpand: Callable[[str], Any] | None - NotStandaloneHandler: Callable[[], int] | None - ExternalEntityRefHandler: Callable[[str, str | None, str | None, str | None], int] | None - SkippedEntityHandler: Callable[[str, bool], Any] | None - -def ErrorString(code: int, /) -> str: ... - -# intern is undocumented -def ParserCreate( - encoding: str | None = None, namespace_separator: str | None = None, intern: dict[str, Any] | None = None -) -> XMLParserType: ... - -expat_CAPI: CapsuleType diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/errors.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/errors.vpi deleted file mode 100644 index 493ae034..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/errors.vpi +++ /dev/null @@ -1,53 +0,0 @@ -import sys -from typing import Final -from typing_extensions import LiteralString - -codes: dict[str, int] -messages: dict[int, str] - -XML_ERROR_ABORTED: Final[LiteralString] -XML_ERROR_ASYNC_ENTITY: Final[LiteralString] -XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: Final[LiteralString] -XML_ERROR_BAD_CHAR_REF: Final[LiteralString] -XML_ERROR_BINARY_ENTITY_REF: Final[LiteralString] -XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: Final[LiteralString] -XML_ERROR_DUPLICATE_ATTRIBUTE: Final[LiteralString] -XML_ERROR_ENTITY_DECLARED_IN_PE: Final[LiteralString] -XML_ERROR_EXTERNAL_ENTITY_HANDLING: Final[LiteralString] -XML_ERROR_FEATURE_REQUIRES_XML_DTD: Final[LiteralString] -XML_ERROR_FINISHED: Final[LiteralString] -XML_ERROR_INCOMPLETE_PE: Final[LiteralString] -XML_ERROR_INCORRECT_ENCODING: Final[LiteralString] -XML_ERROR_INVALID_TOKEN: Final[LiteralString] -XML_ERROR_JUNK_AFTER_DOC_ELEMENT: Final[LiteralString] -XML_ERROR_MISPLACED_XML_PI: Final[LiteralString] -XML_ERROR_NOT_STANDALONE: Final[LiteralString] -XML_ERROR_NOT_SUSPENDED: Final[LiteralString] -XML_ERROR_NO_ELEMENTS: Final[LiteralString] -XML_ERROR_NO_MEMORY: Final[LiteralString] -XML_ERROR_PARAM_ENTITY_REF: Final[LiteralString] -XML_ERROR_PARTIAL_CHAR: Final[LiteralString] -XML_ERROR_PUBLICID: Final[LiteralString] -XML_ERROR_RECURSIVE_ENTITY_REF: Final[LiteralString] -XML_ERROR_SUSPENDED: Final[LiteralString] -XML_ERROR_SUSPEND_PE: Final[LiteralString] -XML_ERROR_SYNTAX: Final[LiteralString] -XML_ERROR_TAG_MISMATCH: Final[LiteralString] -XML_ERROR_TEXT_DECL: Final[LiteralString] -XML_ERROR_UNBOUND_PREFIX: Final[LiteralString] -XML_ERROR_UNCLOSED_CDATA_SECTION: Final[LiteralString] -XML_ERROR_UNCLOSED_TOKEN: Final[LiteralString] -XML_ERROR_UNDECLARING_PREFIX: Final[LiteralString] -XML_ERROR_UNDEFINED_ENTITY: Final[LiteralString] -XML_ERROR_UNEXPECTED_STATE: Final[LiteralString] -XML_ERROR_UNKNOWN_ENCODING: Final[LiteralString] -XML_ERROR_XML_DECL: Final[LiteralString] -if sys.version_info >= (3, 11): - XML_ERROR_RESERVED_PREFIX_XML: Final[LiteralString] - XML_ERROR_RESERVED_PREFIX_XMLNS: Final[LiteralString] - XML_ERROR_RESERVED_NAMESPACE_URI: Final[LiteralString] - XML_ERROR_INVALID_ARGUMENT: Final[LiteralString] - XML_ERROR_NO_BUFFER: Final[LiteralString] - XML_ERROR_AMPLIFICATION_LIMIT_BREACH: Final[LiteralString] -if sys.version_info >= (3, 14): - XML_ERROR_NOT_STARTED: Final[LiteralString] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/model.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/model.vpi deleted file mode 100644 index bac8f369..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/pyexpat/model.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Final - -XML_CTYPE_ANY: Final = 2 -XML_CTYPE_EMPTY: Final = 1 -XML_CTYPE_MIXED: Final = 3 -XML_CTYPE_NAME: Final = 4 -XML_CTYPE_CHOICE: Final = 5 -XML_CTYPE_SEQ: Final = 6 - -XML_CQUANT_NONE: Final = 0 -XML_CQUANT_OPT: Final = 1 -XML_CQUANT_REP: Final = 2 -XML_CQUANT_PLUS: Final = 3 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/quopri.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/quopri.vpi deleted file mode 100644 index be6892fc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/quopri.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from _typeshed import ReadableBuffer, SupportsNoArgReadline, SupportsRead, SupportsWrite -from typing import Protocol, type_check_only - -__all__ = ["encode", "decode", "encodestring", "decodestring"] - -@type_check_only -class _Input(SupportsRead[bytes], SupportsNoArgReadline[bytes], Protocol): ... - -def encode(input: _Input, output: SupportsWrite[bytes], quotetabs: int, header: bool = False) -> None: ... -def encodestring(s: ReadableBuffer, quotetabs: bool = False, header: bool = False) -> bytes: ... -def decode(input: _Input, output: SupportsWrite[bytes], header: bool = False) -> None: ... -def decodestring(s: str | ReadableBuffer, header: bool = False) -> bytes: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/random.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/random.vpi deleted file mode 100644 index 80fd2c76..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/random.vpi +++ /dev/null @@ -1,135 +0,0 @@ -import _random -import sys -from _typeshed import SupportsLenAndGetItem -from collections.abc import Callable, Iterable, MutableSequence, Sequence, Set as AbstractSet -from fractions import Fraction -from typing import Any, ClassVar, NoReturn, TypeVar, overload -from typing_extensions import deprecated - -__all__ = [ - "Random", - "seed", - "random", - "uniform", - "randint", - "choice", - "sample", - "randrange", - "shuffle", - "normalvariate", - "lognormvariate", - "expovariate", - "vonmisesvariate", - "gammavariate", - "triangular", - "gauss", - "betavariate", - "paretovariate", - "weibullvariate", - "getstate", - "setstate", - "getrandbits", - "choices", - "SystemRandom", - "randbytes", -] - -if sys.version_info >= (3, 12): - __all__ += ["binomialvariate"] - -_T = TypeVar("_T") - -class Random(_random.Random): - VERSION: ClassVar[int] - def __init__(self, x: int | float | str | bytes | bytearray | None = None) -> None: ... # noqa: Y041 - # Using other `seed` types is deprecated since 3.9 and removed in 3.11 - # Ignore Y041, since random.seed doesn't treat int like a float subtype. Having an explicit - # int better documents conventional usage of random.seed. - - def seed(self, a: int | float | str | bytes | bytearray | None = None, version: int = 2) -> None: ... # type: ignore[override] # noqa: Y041 - def getstate(self) -> tuple[Any, ...]: ... - def setstate(self, state: tuple[Any, ...]) -> None: ... - def randrange(self, start: int, stop: int | None = None, step: int = 1) -> int: ... - def randint(self, a: int, b: int) -> int: ... - def randbytes(self, n: int) -> bytes: ... - def choice(self, seq: SupportsLenAndGetItem[_T]) -> _T: ... - def choices( - self, - population: SupportsLenAndGetItem[_T], - weights: Sequence[float | Fraction] | None = None, - *, - cum_weights: Sequence[float | Fraction] | None = None, - k: int = 1, - ) -> list[_T]: ... - if sys.version_info >= (3, 11): - def shuffle(self, x: MutableSequence[Any]) -> None: ... - else: - @overload - def shuffle(self, x: MutableSequence[Any]) -> None: ... - @overload - @deprecated("The `random` parameter is deprecated since Python 3.9; removed in Python 3.11.") - def shuffle(self, x: MutableSequence[Any], random: Callable[[], float] | None = None) -> None: ... - - if sys.version_info >= (3, 11): - def sample(self, population: Sequence[_T], k: int, *, counts: Iterable[int] | None = None) -> list[_T]: ... - else: - def sample( - self, population: Sequence[_T] | AbstractSet[_T], k: int, *, counts: Iterable[int] | None = None - ) -> list[_T]: ... - - def uniform(self, a: float, b: float) -> float: ... - def triangular(self, low: float = 0.0, high: float = 1.0, mode: float | None = None) -> float: ... - if sys.version_info >= (3, 12): - def binomialvariate(self, n: int = 1, p: float = 0.5) -> int: ... - - def betavariate(self, alpha: float, beta: float) -> float: ... - if sys.version_info >= (3, 12): - def expovariate(self, lambd: float = 1.0) -> float: ... - else: - def expovariate(self, lambd: float) -> float: ... - - def gammavariate(self, alpha: float, beta: float) -> float: ... - if sys.version_info >= (3, 11): - def gauss(self, mu: float = 0.0, sigma: float = 1.0) -> float: ... - def normalvariate(self, mu: float = 0.0, sigma: float = 1.0) -> float: ... - else: - def gauss(self, mu: float, sigma: float) -> float: ... - def normalvariate(self, mu: float, sigma: float) -> float: ... - - def lognormvariate(self, mu: float, sigma: float) -> float: ... - def vonmisesvariate(self, mu: float, kappa: float) -> float: ... - def paretovariate(self, alpha: float) -> float: ... - def weibullvariate(self, alpha: float, beta: float) -> float: ... - -# SystemRandom is not implemented for all OS's; good on Windows & Linux -class SystemRandom(Random): - def getrandbits(self, k: int) -> int: ... # k can be passed by keyword - def getstate(self, *args: Any, **kwds: Any) -> NoReturn: ... - def setstate(self, *args: Any, **kwds: Any) -> NoReturn: ... - -_inst: Random -seed = _inst.seed -random = _inst.random -uniform = _inst.uniform -triangular = _inst.triangular -randint = _inst.randint -choice = _inst.choice -randrange = _inst.randrange -sample = _inst.sample -shuffle = _inst.shuffle -choices = _inst.choices -normalvariate = _inst.normalvariate -lognormvariate = _inst.lognormvariate -expovariate = _inst.expovariate -vonmisesvariate = _inst.vonmisesvariate -gammavariate = _inst.gammavariate -gauss = _inst.gauss -if sys.version_info >= (3, 12): - binomialvariate = _inst.binomialvariate -betavariate = _inst.betavariate -paretovariate = _inst.paretovariate -weibullvariate = _inst.weibullvariate -getstate = _inst.getstate -setstate = _inst.setstate -getrandbits = _inst.getrandbits -randbytes = _inst.randbytes diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/readline.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/readline.vpi deleted file mode 100644 index aff1e504..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/readline.vpi +++ /dev/null @@ -1,39 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Sequence -from typing import Literal, TypeAlias - -if sys.platform != "win32": - _Completer: TypeAlias = Callable[[str, int], str | None] - _CompDisp: TypeAlias = Callable[[str, Sequence[str], int], None] - - def parse_and_bind(string: str, /) -> None: ... - def read_init_file(filename: StrOrBytesPath | None = None, /) -> None: ... - def get_line_buffer() -> str: ... - def insert_text(string: str, /) -> None: ... - def redisplay() -> None: ... - def read_history_file(filename: StrOrBytesPath | None = None, /) -> None: ... - def write_history_file(filename: StrOrBytesPath | None = None, /) -> None: ... - def append_history_file(nelements: int, filename: StrOrBytesPath | None = None, /) -> None: ... - def get_history_length() -> int: ... - def set_history_length(length: int, /) -> None: ... - def clear_history() -> None: ... - def get_current_history_length() -> int: ... - def get_history_item(index: int, /) -> str: ... - def remove_history_item(pos: int, /) -> None: ... - def replace_history_item(pos: int, line: str, /) -> None: ... - def add_history(string: str, /) -> None: ... - def set_auto_history(enabled: bool, /) -> None: ... - def set_startup_hook(function: Callable[[], object] | None = None, /) -> None: ... - def set_pre_input_hook(function: Callable[[], object] | None = None, /) -> None: ... - def set_completer(function: _Completer | None = None, /) -> None: ... - def get_completer() -> _Completer | None: ... - def get_completion_type() -> int: ... - def get_begidx() -> int: ... - def get_endidx() -> int: ... - def set_completer_delims(string: str, /) -> None: ... - def get_completer_delims() -> str: ... - def set_completion_display_matches_hook(function: _CompDisp | None = None, /) -> None: ... - - if sys.version_info >= (3, 13): - backend: Literal["readline", "editline"] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/reprlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/reprlib.vpi deleted file mode 100644 index d990c270..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/reprlib.vpi +++ /dev/null @@ -1,64 +0,0 @@ -import sys -from array import array -from collections import deque -from collections.abc import Callable -from typing import Any, TypeAlias - -__all__ = ["Repr", "repr", "recursive_repr"] - -_ReprFunc: TypeAlias = Callable[[Any], str] - -def recursive_repr(fillvalue: str = "...") -> Callable[[_ReprFunc], _ReprFunc]: ... - -class Repr: - maxlevel: int - maxdict: int - maxlist: int - maxtuple: int - maxset: int - maxfrozenset: int - maxdeque: int - maxarray: int - maxlong: int - maxstring: int - maxother: int - if sys.version_info >= (3, 11): - fillvalue: str - if sys.version_info >= (3, 12): - indent: str | int | None - - if sys.version_info >= (3, 12): - def __init__( - self, - *, - maxlevel: int = 6, - maxtuple: int = 6, - maxlist: int = 6, - maxarray: int = 5, - maxdict: int = 4, - maxset: int = 6, - maxfrozenset: int = 6, - maxdeque: int = 6, - maxstring: int = 30, - maxlong: int = 40, - maxother: int = 30, - fillvalue: str = "...", - indent: str | int | None = None, - ) -> None: ... - - def repr(self, x: Any) -> str: ... - def repr1(self, x: Any, level: int) -> str: ... - def repr_tuple(self, x: tuple[Any, ...], level: int) -> str: ... - def repr_list(self, x: list[Any], level: int) -> str: ... - def repr_array(self, x: array[Any], level: int) -> str: ... - def repr_set(self, x: set[Any], level: int) -> str: ... - def repr_frozenset(self, x: frozenset[Any], level: int) -> str: ... - def repr_deque(self, x: deque[Any], level: int) -> str: ... - def repr_dict(self, x: dict[Any, Any], level: int) -> str: ... - def repr_str(self, x: str, level: int) -> str: ... - def repr_int(self, x: int, level: int) -> str: ... - def repr_instance(self, x: Any, level: int) -> str: ... - -aRepr: Repr - -def repr(x: object) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/resource.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/resource.vpi deleted file mode 100644 index 7e72b28c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/resource.vpi +++ /dev/null @@ -1,102 +0,0 @@ -import sys -from _typeshed import structseq -from typing import Final, final - -if sys.platform != "win32": - # Depends on resource.h - RLIMIT_AS: Final[int] - RLIMIT_CORE: Final[int] - RLIMIT_CPU: Final[int] - RLIMIT_DATA: Final[int] - RLIMIT_FSIZE: Final[int] - RLIMIT_MEMLOCK: Final[int] - RLIMIT_NOFILE: Final[int] - RLIMIT_NPROC: Final[int] - RLIMIT_RSS: Final[int] - RLIMIT_STACK: Final[int] - RLIM_INFINITY: Final[int] - if sys.version_info >= (3, 15): - RLIM_SAVED_CUR: Final[int] - RLIM_SAVED_MAX: Final[int] - RUSAGE_CHILDREN: Final[int] - RUSAGE_SELF: Final[int] - if sys.platform == "linux": - RLIMIT_MSGQUEUE: Final[int] - RLIMIT_NICE: Final[int] - RLIMIT_OFILE: Final[int] - RLIMIT_RTPRIO: Final[int] - RLIMIT_RTTIME: Final[int] - RLIMIT_SIGPENDING: Final[int] - RUSAGE_THREAD: Final[int] - if sys.version_info >= (3, 15) and sys.platform != "linux" and sys.platform != "darwin": - RLIMIT_NTHR: Final[int] - RLIMIT_PIPEBUF: Final[int] - RLIMIT_THREADS: Final[int] - RLIMIT_UMTXP: Final[int] - - @final - class struct_rusage( - structseq[float], tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int] - ): - __match_args__: Final = ( - "ru_utime", - "ru_stime", - "ru_maxrss", - "ru_ixrss", - "ru_idrss", - "ru_isrss", - "ru_minflt", - "ru_majflt", - "ru_nswap", - "ru_inblock", - "ru_oublock", - "ru_msgsnd", - "ru_msgrcv", - "ru_nsignals", - "ru_nvcsw", - "ru_nivcsw", - ) - - @property - def ru_utime(self) -> float: ... - @property - def ru_stime(self) -> float: ... - @property - def ru_maxrss(self) -> int: ... - @property - def ru_ixrss(self) -> int: ... - @property - def ru_idrss(self) -> int: ... - @property - def ru_isrss(self) -> int: ... - @property - def ru_minflt(self) -> int: ... - @property - def ru_majflt(self) -> int: ... - @property - def ru_nswap(self) -> int: ... - @property - def ru_inblock(self) -> int: ... - @property - def ru_oublock(self) -> int: ... - @property - def ru_msgsnd(self) -> int: ... - @property - def ru_msgrcv(self) -> int: ... - @property - def ru_nsignals(self) -> int: ... - @property - def ru_nvcsw(self) -> int: ... - @property - def ru_nivcsw(self) -> int: ... - - def getpagesize() -> int: ... - def getrlimit(resource: int, /) -> tuple[int, int]: ... - def getrusage(who: int, /) -> struct_rusage: ... - def setrlimit(resource: int, limits: tuple[int, int], /) -> None: ... - if sys.platform == "linux": - if sys.version_info >= (3, 12): - def prlimit(pid: int, resource: int, limits: tuple[int, int] | None = None, /) -> tuple[int, int]: ... - else: - def prlimit(pid: int, resource: int, limits: tuple[int, int] = ..., /) -> tuple[int, int]: ... - error = OSError diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/rlcompleter.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/rlcompleter.vpi deleted file mode 100644 index 8d9477e3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/rlcompleter.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any - -__all__ = ["Completer"] - -class Completer: - def __init__(self, namespace: dict[str, Any] | None = None) -> None: ... - def complete(self, text: str, state: int) -> str | None: ... - def attr_matches(self, text: str) -> list[str]: ... - def global_matches(self, text: str) -> list[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/runpy.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/runpy.vpi deleted file mode 100644 index d4406ea4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/runpy.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from _typeshed import Unused -from types import ModuleType -from typing import Any -from typing_extensions import Self - -__all__ = ["run_module", "run_path"] - -class _TempModule: - mod_name: str - module: ModuleType - def __init__(self, mod_name: str) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - -class _ModifiedArgv0: - value: Any - def __init__(self, value: Any) -> None: ... - def __enter__(self) -> None: ... - def __exit__(self, *args: Unused) -> None: ... - -def run_module( - mod_name: str, init_globals: dict[str, Any] | None = None, run_name: str | None = None, alter_sys: bool = False -) -> dict[str, Any]: ... -def run_path(path_name: str, init_globals: dict[str, Any] | None = None, run_name: str | None = None) -> dict[str, Any]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sched.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sched.vpi deleted file mode 100644 index 54eb6ed0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sched.vpi +++ /dev/null @@ -1,34 +0,0 @@ -import time -from collections.abc import Callable -from typing import Any, NamedTuple, TypeAlias - -__all__ = ["scheduler"] - -_ActionCallback: TypeAlias = Callable[..., Any] - -class Event(NamedTuple): - time: float - priority: Any - sequence: int - action: _ActionCallback - argument: tuple[Any, ...] - kwargs: dict[str, Any] - -class scheduler: - timefunc: Callable[[], float] - delayfunc: Callable[[float], object] - - def __init__( - self, timefunc: Callable[[], float] = time.monotonic, delayfunc: Callable[[float], object] = time.sleep - ) -> None: ... - def enterabs( - self, time: float, priority: Any, action: _ActionCallback, argument: tuple[Any, ...] = (), kwargs: dict[str, Any] = ... - ) -> Event: ... - def enter( - self, delay: float, priority: Any, action: _ActionCallback, argument: tuple[Any, ...] = (), kwargs: dict[str, Any] = ... - ) -> Event: ... - def run(self, blocking: bool = True) -> float | None: ... - def cancel(self, event: Event) -> None: ... - def empty(self) -> bool: ... - @property - def queue(self) -> list[Event]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/secrets.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/secrets.vpi deleted file mode 100644 index 76479af9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/secrets.vpi +++ /dev/null @@ -1,17 +0,0 @@ -from _typeshed import SupportsLenAndGetItem -from hmac import compare_digest as compare_digest -from random import SystemRandom as SystemRandom -from typing import Final, TypeVar - -__all__ = ["choice", "randbelow", "randbits", "SystemRandom", "token_bytes", "token_hex", "token_urlsafe", "compare_digest"] - -_T = TypeVar("_T") - -DEFAULT_ENTROPY: Final[int] - -def randbelow(exclusive_upper_bound: int) -> int: ... -def randbits(k: int) -> int: ... -def choice(seq: SupportsLenAndGetItem[_T]) -> _T: ... -def token_bytes(nbytes: int | None = None) -> bytes: ... -def token_hex(nbytes: int | None = None) -> str: ... -def token_urlsafe(nbytes: int | None = None) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/select.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/select.vpi deleted file mode 100644 index ad93cb0b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/select.vpi +++ /dev/null @@ -1,171 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike -from collections.abc import Iterable -from types import TracebackType -from typing import Any, ClassVar, Final, TypeVar, final, overload -from typing_extensions import Never, Self, deprecated - -if sys.platform != "win32": - PIPE_BUF: Final[int] - POLLERR: Final[int] - POLLHUP: Final[int] - POLLIN: Final[int] - if sys.platform == "linux": - POLLMSG: Final[int] - POLLNVAL: Final[int] - POLLOUT: Final[int] - POLLPRI: Final[int] - POLLRDBAND: Final[int] - if sys.platform == "linux": - POLLRDHUP: Final[int] - POLLRDNORM: Final[int] - POLLWRBAND: Final[int] - POLLWRNORM: Final[int] - - # This is actually a function that returns an instance of a class. - # The class is not accessible directly, and also calls itself select.poll. - @final - class poll: - # default value is select.POLLIN | select.POLLPRI | select.POLLOUT - def register(self, fd: FileDescriptorLike, eventmask: int = 7, /) -> None: ... - def modify(self, fd: FileDescriptorLike, eventmask: int, /) -> None: ... - def unregister(self, fd: FileDescriptorLike, /) -> None: ... - def poll(self, timeout: float | None = None, /) -> list[tuple[int, int]]: ... - -_R = TypeVar("_R", default=Never, bound=FileDescriptorLike) -_W = TypeVar("_W", default=Never, bound=FileDescriptorLike) -_X = TypeVar("_X", default=Never, bound=FileDescriptorLike) - -def select( - rlist: Iterable[_R], wlist: Iterable[_W], xlist: Iterable[_X], timeout: float | None = None, / -) -> tuple[list[_R], list[_W], list[_X]]: ... - -error = OSError - -if sys.platform != "linux" and sys.platform != "win32": - # BSD only - @final - class kevent: - data: Any - fflags: int - filter: int - flags: int - ident: int - udata: Any - def __init__( - self, ident: FileDescriptorLike, filter: int = ..., flags: int = ..., fflags: int = 0, data: Any = 0, udata: Any = 0 - ) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - - # BSD only - @final - class kqueue: - closed: bool - def __init__(self) -> None: ... - def close(self) -> None: ... - def control( - self, changelist: Iterable[kevent] | None, maxevents: int, timeout: float | None = None, / - ) -> list[kevent]: ... - def fileno(self) -> int: ... - @classmethod - def fromfd(cls, fd: FileDescriptorLike, /) -> kqueue: ... - - KQ_EV_ADD: Final[int] - KQ_EV_CLEAR: Final[int] - KQ_EV_DELETE: Final[int] - KQ_EV_DISABLE: Final[int] - KQ_EV_ENABLE: Final[int] - KQ_EV_EOF: Final[int] - KQ_EV_ERROR: Final[int] - KQ_EV_FLAG1: Final[int] - KQ_EV_ONESHOT: Final[int] - KQ_EV_SYSFLAGS: Final[int] - KQ_FILTER_AIO: Final[int] - if sys.platform != "darwin": - KQ_FILTER_NETDEV: Final[int] - KQ_FILTER_PROC: Final[int] - KQ_FILTER_READ: Final[int] - KQ_FILTER_SIGNAL: Final[int] - KQ_FILTER_TIMER: Final[int] - KQ_FILTER_VNODE: Final[int] - KQ_FILTER_WRITE: Final[int] - KQ_NOTE_ATTRIB: Final[int] - KQ_NOTE_CHILD: Final[int] - KQ_NOTE_DELETE: Final[int] - KQ_NOTE_EXEC: Final[int] - KQ_NOTE_EXIT: Final[int] - KQ_NOTE_EXTEND: Final[int] - KQ_NOTE_FORK: Final[int] - KQ_NOTE_LINK: Final[int] - if sys.platform != "darwin": - KQ_NOTE_LINKDOWN: Final[int] - KQ_NOTE_LINKINV: Final[int] - KQ_NOTE_LINKUP: Final[int] - KQ_NOTE_LOWAT: Final[int] - KQ_NOTE_PCTRLMASK: Final[int] - KQ_NOTE_PDATAMASK: Final[int] - KQ_NOTE_RENAME: Final[int] - KQ_NOTE_REVOKE: Final[int] - KQ_NOTE_TRACK: Final[int] - KQ_NOTE_TRACKERR: Final[int] - KQ_NOTE_WRITE: Final[int] - -if sys.platform == "linux": - @final - class epoll: - @overload - def __new__(self, sizehint: int = -1) -> Self: ... - @overload - @deprecated( - "The `flags` parameter is deprecated since Python 3.4. " - "Use `os.set_inheritable()` to make the file descriptor inheritable." - ) - def __new__(self, sizehint: int = -1, flags: int = 0) -> Self: ... - - def __enter__(self) -> Self: ... - def __exit__( - self, - exc_type: type[BaseException] | None = None, - exc_value: BaseException | None = None, - exc_tb: TracebackType | None = None, - /, - ) -> None: ... - def close(self) -> None: ... - closed: bool - def fileno(self) -> int: ... - def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ... - def modify(self, fd: FileDescriptorLike, eventmask: int) -> None: ... - def unregister(self, fd: FileDescriptorLike) -> None: ... - def poll(self, timeout: float | None = None, maxevents: int = -1) -> list[tuple[int, int]]: ... - @classmethod - def fromfd(cls, fd: FileDescriptorLike, /) -> epoll: ... - - EPOLLERR: Final[int] - EPOLLEXCLUSIVE: Final[int] - EPOLLET: Final[int] - EPOLLHUP: Final[int] - EPOLLIN: Final[int] - EPOLLMSG: Final[int] - EPOLLONESHOT: Final[int] - EPOLLOUT: Final[int] - EPOLLPRI: Final[int] - EPOLLRDBAND: Final[int] - EPOLLRDHUP: Final[int] - EPOLLRDNORM: Final[int] - EPOLLWRBAND: Final[int] - EPOLLWRNORM: Final[int] - EPOLL_CLOEXEC: Final[int] - if sys.version_info >= (3, 14): - EPOLLWAKEUP: Final[int] - -if sys.platform != "linux" and sys.platform != "darwin" and sys.platform != "win32": - # Solaris only - @final - class devpoll: - def close(self) -> None: ... - closed: bool - def fileno(self) -> int: ... - def register(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ... - def modify(self, fd: FileDescriptorLike, eventmask: int = ...) -> None: ... - def unregister(self, fd: FileDescriptorLike) -> None: ... - def poll(self, timeout: float | None = None) -> list[tuple[int, int]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/selectors.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/selectors.vpi deleted file mode 100644 index 4a3478a6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/selectors.vpi +++ /dev/null @@ -1,67 +0,0 @@ -import sys -from _typeshed import FileDescriptor, FileDescriptorLike, Unused -from abc import ABCMeta, abstractmethod -from collections.abc import Mapping -from typing import Any, Final, NamedTuple -from typing_extensions import Self - -EVENT_READ: Final = 1 -EVENT_WRITE: Final = 2 - -class SelectorKey(NamedTuple): - fileobj: FileDescriptorLike - fd: FileDescriptor - events: int - data: Any - -class BaseSelector(metaclass=ABCMeta): - @abstractmethod - def register(self, fileobj: FileDescriptorLike, events: int, data: Any = None) -> SelectorKey: ... - @abstractmethod - def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ... - def modify(self, fileobj: FileDescriptorLike, events: int, data: Any = None) -> SelectorKey: ... - @abstractmethod - def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, int]]: ... - def close(self) -> None: ... - def get_key(self, fileobj: FileDescriptorLike) -> SelectorKey: ... - @abstractmethod - def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - -class _BaseSelectorImpl(BaseSelector, metaclass=ABCMeta): - def register(self, fileobj: FileDescriptorLike, events: int, data: Any = None) -> SelectorKey: ... - def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ... - def modify(self, fileobj: FileDescriptorLike, events: int, data: Any = None) -> SelectorKey: ... - def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ... - -class SelectSelector(_BaseSelectorImpl): - def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, int]]: ... - -class _PollLikeSelector(_BaseSelectorImpl): - def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, int]]: ... - -if sys.platform != "win32": - class PollSelector(_PollLikeSelector): ... - -if sys.platform == "linux": - class EpollSelector(_PollLikeSelector): - def fileno(self) -> int: ... - -if sys.platform != "linux" and sys.platform != "darwin" and sys.platform != "win32": - # Solaris only - class DevpollSelector(_PollLikeSelector): - def fileno(self) -> int: ... - -if sys.platform != "win32" and sys.platform != "linux": - class KqueueSelector(_BaseSelectorImpl): - def fileno(self) -> int: ... - def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, int]]: ... - -# Not a real class at runtime, it is just a conditional alias to other real selectors. -# The runtime logic is more fine-grained than a `sys.platform` check; -# not really expressible in the stubs -class DefaultSelector(_BaseSelectorImpl): - def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, int]]: ... - if sys.platform != "win32": - def fileno(self) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/shelve.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/shelve.vpi deleted file mode 100644 index c599b0af..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/shelve.vpi +++ /dev/null @@ -1,110 +0,0 @@ -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Callable, Iterator, MutableMapping -from dbm import _TFlags -from types import TracebackType -from typing import Any, TypeVar, overload -from typing_extensions import Self - -__all__ = ["Shelf", "BsdDbShelf", "DbfilenameShelf", "open"] -if sys.version_info >= (3, 15): - __all__ += ["ShelveError"] - -_T = TypeVar("_T") -_VT = TypeVar("_VT") - -if sys.version_info >= (3, 15): - class ShelveError(Exception): ... - -class Shelf(MutableMapping[str, _VT]): - if sys.version_info >= (3, 15): - def __init__( - self, - dict: MutableMapping[bytes, bytes], - protocol: int | None = None, - writeback: bool = False, - keyencoding: str = "utf-8", - *, - serializer: Callable[[Any], bytes] | None = None, - deserializer: Callable[[bytes], Any] | None = None, - ) -> None: ... - - else: - def __init__( - self, - dict: MutableMapping[bytes, bytes], - protocol: int | None = None, - writeback: bool = False, - keyencoding: str = "utf-8", - ) -> None: ... - - def __iter__(self) -> Iterator[str]: ... - def __len__(self) -> int: ... - - @overload # type: ignore[override] - def get(self, key: str, default: None = None) -> _VT | None: ... - @overload - def get(self, key: str, default: _VT) -> _VT: ... - @overload - def get(self, key: str, default: _T) -> _VT | _T: ... - - def __getitem__(self, key: str) -> _VT: ... - def __setitem__(self, key: str, value: _VT) -> None: ... - def __delitem__(self, key: str) -> None: ... - def __contains__(self, key: str) -> bool: ... # type: ignore[override] - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... - def close(self) -> None: ... - def sync(self) -> None: ... - if sys.version_info >= (3, 15): - def reorganize(self) -> None: ... - -class BsdDbShelf(Shelf[_VT]): - def set_location(self, key: str) -> tuple[str, _VT]: ... - def next(self) -> tuple[str, _VT]: ... - def previous(self) -> tuple[str, _VT]: ... - def first(self) -> tuple[str, _VT]: ... - def last(self) -> tuple[str, _VT]: ... - -class DbfilenameShelf(Shelf[_VT]): - if sys.version_info >= (3, 15): - def __init__( - self, - filename: StrOrBytesPath, - flag: _TFlags = "c", - protocol: int | None = None, - writeback: bool = False, - *, - serializer: Callable[[Any], bytes] | None = None, - deserializer: Callable[[bytes], Any] | None = None, - ) -> None: ... - - elif sys.version_info >= (3, 11): - def __init__( - self, filename: StrOrBytesPath, flag: _TFlags = "c", protocol: int | None = None, writeback: bool = False - ) -> None: ... - - else: - def __init__(self, filename: str, flag: _TFlags = "c", protocol: int | None = None, writeback: bool = False) -> None: ... - -if sys.version_info >= (3, 15): - def open( - filename: StrOrBytesPath, - flag: _TFlags = "c", - protocol: int | None = None, - writeback: bool = False, - *, - serializer: Callable[[Any], bytes] | None = None, - deserializer: Callable[[bytes], Any] | None = None, - ) -> Shelf[Any]: ... - -elif sys.version_info >= (3, 11): - def open( - filename: StrOrBytesPath, flag: _TFlags = "c", protocol: int | None = None, writeback: bool = False - ) -> Shelf[Any]: ... - -else: - def open(filename: str, flag: _TFlags = "c", protocol: int | None = None, writeback: bool = False) -> Shelf[Any]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/shlex.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/shlex.vpi deleted file mode 100644 index 1c274837..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/shlex.vpi +++ /dev/null @@ -1,63 +0,0 @@ -import sys -from collections import deque -from collections.abc import Iterable -from io import TextIOWrapper -from typing import Literal, Protocol, overload, type_check_only -from typing_extensions import Self, deprecated - -__all__ = ["shlex", "split", "quote", "join"] - -@type_check_only -class _ShlexInstream(Protocol): - def read(self, size: Literal[1], /) -> str: ... - def readline(self) -> object: ... - def close(self) -> object: ... - -if sys.version_info >= (3, 12): - def split(s: str | _ShlexInstream, comments: bool = False, posix: bool = True) -> list[str]: ... - -else: - @overload - def split(s: str | _ShlexInstream, comments: bool = False, posix: bool = True) -> list[str]: ... - @overload - @deprecated("Passing None for 's' to shlex.split() is deprecated and will raise an error in Python 3.12.") - def split(s: None, comments: bool = False, posix: bool = True) -> list[str]: ... - -def join(split_command: Iterable[str]) -> str: ... -def quote(s: str) -> str: ... - -# TODO: Make generic over infile once PEP 696 is implemented. -class shlex: - commenters: str - wordchars: str - whitespace: str - escape: str - quotes: str - escapedquotes: str - whitespace_split: bool - infile: str | None - instream: _ShlexInstream - source: str - debug: int - lineno: int - token: str - filestack: deque[tuple[str | None, _ShlexInstream, int]] - eof: str | None - @property - def punctuation_chars(self) -> str: ... - def __init__( - self, - instream: str | _ShlexInstream | None = None, - infile: str | None = None, - posix: bool = False, - punctuation_chars: bool | str = False, - ) -> None: ... - def get_token(self) -> str | None: ... - def push_token(self, tok: str) -> None: ... - def read_token(self) -> str | None: ... - def sourcehook(self, newfile: str) -> tuple[str, TextIOWrapper] | None: ... - def push_source(self, newstream: str | _ShlexInstream, newfile: str | None = None) -> None: ... - def pop_source(self) -> None: ... - def error_leader(self, infile: str | None = None, lineno: int | None = None) -> str: ... - def __iter__(self) -> Self: ... - def __next__(self) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/signal.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/signal.vpi deleted file mode 100644 index a6a88536..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/signal.vpi +++ /dev/null @@ -1,174 +0,0 @@ -import sys -from _typeshed import structseq -from collections.abc import Callable, Iterable -from enum import IntEnum -from types import FrameType -from typing import Any, Final, TypeAlias, final -from typing_extensions import Never - -NSIG: int - -class Signals(IntEnum): - SIGFPE = 8 - SIGILL = 4 - SIGINT = 2 - SIGSEGV = 11 - SIGTERM = 15 - - if sys.platform == "win32": - SIGABRT = 22 - SIGBREAK = 21 - CTRL_C_EVENT = 0 - CTRL_BREAK_EVENT = 1 - else: - SIGABRT = 6 - SIGALRM = 14 - SIGBUS = 7 - SIGCHLD = 17 - SIGCONT = 18 - SIGHUP = 1 - SIGIO = 29 - SIGIOT = 6 - SIGKILL = 9 - SIGPIPE = 13 - SIGPROF = 27 - SIGQUIT = 3 - SIGSTOP = 19 - SIGSYS = 31 - SIGTRAP = 5 - SIGTSTP = 20 - SIGTTIN = 21 - SIGTTOU = 22 - SIGURG = 23 - SIGUSR1 = 10 - SIGUSR2 = 12 - SIGVTALRM = 26 - SIGWINCH = 28 - SIGXCPU = 24 - SIGXFSZ = 25 - if sys.platform != "linux": - SIGEMT = 7 - SIGINFO = 29 - if sys.platform != "darwin": - SIGCLD = 17 - SIGPOLL = 29 - SIGPWR = 30 - SIGRTMAX = 64 - SIGRTMIN = 34 - if sys.version_info >= (3, 11): - SIGSTKFLT = 16 - -class Handlers(IntEnum): - SIG_DFL = 0 - SIG_IGN = 1 - -SIG_DFL: Final = Handlers.SIG_DFL -SIG_IGN: Final = Handlers.SIG_IGN - -_SIGNUM: TypeAlias = int | Signals -_HANDLER: TypeAlias = Callable[[int, FrameType | None], Any] | int | Handlers | None - -def default_int_handler(signalnum: int, frame: FrameType | None, /) -> Never: ... -def getsignal(signalnum: _SIGNUM) -> _HANDLER: ... -def signal(signalnum: _SIGNUM, handler: _HANDLER) -> _HANDLER: ... - -SIGABRT: Final = Signals.SIGABRT -SIGFPE: Final = Signals.SIGFPE -SIGILL: Final = Signals.SIGILL -SIGINT: Final = Signals.SIGINT -SIGSEGV: Final = Signals.SIGSEGV -SIGTERM: Final = Signals.SIGTERM - -if sys.platform == "win32": - SIGBREAK: Final = Signals.SIGBREAK - CTRL_C_EVENT: Final = Signals.CTRL_C_EVENT - CTRL_BREAK_EVENT: Final = Signals.CTRL_BREAK_EVENT -else: - if sys.platform != "linux": - SIGINFO: Final = Signals.SIGINFO - SIGEMT: Final = Signals.SIGEMT - SIGALRM: Final = Signals.SIGALRM - SIGBUS: Final = Signals.SIGBUS - SIGCHLD: Final = Signals.SIGCHLD - SIGCONT: Final = Signals.SIGCONT - SIGHUP: Final = Signals.SIGHUP - SIGIO: Final = Signals.SIGIO - SIGIOT: Final = Signals.SIGABRT # alias - SIGKILL: Final = Signals.SIGKILL - SIGPIPE: Final = Signals.SIGPIPE - SIGPROF: Final = Signals.SIGPROF - SIGQUIT: Final = Signals.SIGQUIT - SIGSTOP: Final = Signals.SIGSTOP - SIGSYS: Final = Signals.SIGSYS - SIGTRAP: Final = Signals.SIGTRAP - SIGTSTP: Final = Signals.SIGTSTP - SIGTTIN: Final = Signals.SIGTTIN - SIGTTOU: Final = Signals.SIGTTOU - SIGURG: Final = Signals.SIGURG - SIGUSR1: Final = Signals.SIGUSR1 - SIGUSR2: Final = Signals.SIGUSR2 - SIGVTALRM: Final = Signals.SIGVTALRM - SIGWINCH: Final = Signals.SIGWINCH - SIGXCPU: Final = Signals.SIGXCPU - SIGXFSZ: Final = Signals.SIGXFSZ - - class ItimerError(OSError): ... - ITIMER_PROF: int - ITIMER_REAL: int - ITIMER_VIRTUAL: int - - class Sigmasks(IntEnum): - SIG_BLOCK = 0 - SIG_UNBLOCK = 1 - SIG_SETMASK = 2 - - SIG_BLOCK: Final = Sigmasks.SIG_BLOCK - SIG_UNBLOCK: Final = Sigmasks.SIG_UNBLOCK - SIG_SETMASK: Final = Sigmasks.SIG_SETMASK - def alarm(seconds: int, /) -> int: ... - def getitimer(which: int, /) -> tuple[float, float]: ... - def pause() -> None: ... - def pthread_kill(thread_id: int, signalnum: int, /) -> None: ... - def pthread_sigmask(how: int, mask: Iterable[int]) -> set[_SIGNUM]: ... - def setitimer(which: int, seconds: float, interval: float = 0.0, /) -> tuple[float, float]: ... - def siginterrupt(signalnum: int, flag: bool, /) -> None: ... - def sigpending() -> Any: ... - def sigwait(sigset: Iterable[int]) -> _SIGNUM: ... - if sys.platform != "darwin": - SIGCLD: Final = Signals.SIGCHLD # alias - SIGPOLL: Final = Signals.SIGIO # alias - SIGPWR: Final = Signals.SIGPWR - SIGRTMAX: Final = Signals.SIGRTMAX - SIGRTMIN: Final = Signals.SIGRTMIN - if sys.version_info >= (3, 11): - SIGSTKFLT: Final = Signals.SIGSTKFLT - - @final - class struct_siginfo(structseq[int], tuple[int, int, int, int, int, int, int]): - __match_args__: Final = ("si_signo", "si_code", "si_errno", "si_pid", "si_uid", "si_status", "si_band") - - @property - def si_signo(self) -> int: ... - @property - def si_code(self) -> int: ... - @property - def si_errno(self) -> int: ... - @property - def si_pid(self) -> int: ... - @property - def si_uid(self) -> int: ... - @property - def si_status(self) -> int: ... - @property - def si_band(self) -> int: ... - - def sigtimedwait(sigset: Iterable[int], timeout: float, /) -> struct_siginfo | None: ... - def sigwaitinfo(sigset: Iterable[int], /) -> struct_siginfo: ... - -def strsignal(signalnum: _SIGNUM, /) -> str | None: ... -def valid_signals() -> set[Signals]: ... -def raise_signal(signalnum: _SIGNUM, /) -> None: ... -def set_wakeup_fd(fd: int, /, *, warn_on_full_buffer: bool = True) -> int: ... - -if sys.platform == "linux": - def pidfd_send_signal(pidfd: int, sig: int, siginfo: None = None, flags: int = 0, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/site.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/site.vpi deleted file mode 100644 index 46e82b06..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/site.vpi +++ /dev/null @@ -1,46 +0,0 @@ -import sys -from _typeshed import StrPath -from collections.abc import Iterable - -PREFIXES: list[str] -ENABLE_USER_SITE: bool | None -USER_SITE: str | None -USER_BASE: str | None - -def main() -> None: ... -def abs_paths() -> None: ... # undocumented -def addpackage(sitedir: StrPath, name: StrPath, known_paths: set[str] | None) -> set[str] | None: ... # undocumented - -if sys.version_info >= (3, 15): - class StartupState: - __slots__ = ("_known_paths", "_processed_sitedirs", "_path_entries", "_importexecs", "_entrypoints") - def __init__(self, known_paths: set[str] | None = None) -> None: ... - def addsitedir(self, sitedir: str) -> None: ... - def addusersitepackages(self) -> None: ... - def addsitepackages(self, prefixes: Iterable[str] | None = None) -> None: ... - def process(self) -> None: ... - -def addsitedir(sitedir: str, known_paths: set[str] | None = None) -> None: ... -def addsitepackages(known_paths: set[str] | None, prefixes: Iterable[str] | None = None) -> set[str] | None: ... # undocumented -def addusersitepackages(known_paths: set[str] | None) -> set[str] | None: ... # undocumented -def check_enableusersite() -> bool | None: ... # undocumented - -if sys.version_info >= (3, 13): - def gethistoryfile() -> str: ... # undocumented - -def enablerlcompleter() -> None: ... # undocumented - -if sys.version_info >= (3, 13): - def register_readline() -> None: ... # undocumented - -def execsitecustomize() -> None: ... # undocumented -def execusercustomize() -> None: ... # undocumented -def getsitepackages(prefixes: Iterable[str] | None = None) -> list[str]: ... -def getuserbase() -> str: ... -def getusersitepackages() -> str: ... -def makepath(*paths: StrPath) -> tuple[str, str]: ... # undocumented -def removeduppaths() -> set[str]: ... # undocumented -def setcopyright() -> None: ... # undocumented -def sethelper() -> None: ... # undocumented -def setquit() -> None: ... # undocumented -def venv(known_paths: set[str] | None) -> set[str] | None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/smtpd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/smtpd.vpi deleted file mode 100644 index cc9ac391..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/smtpd.vpi +++ /dev/null @@ -1,92 +0,0 @@ -import asynchat -import asyncore -import socket -import sys -from collections import defaultdict -from typing import Any, TypeAlias -from typing_extensions import deprecated - -if sys.version_info >= (3, 11): - __all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy"] -else: - __all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"] - -_Address: TypeAlias = tuple[str, int] # (host, port) - -class SMTPChannel(asynchat.async_chat): - COMMAND: int - DATA: int - - command_size_limits: defaultdict[str, int] - smtp_server: SMTPServer - conn: socket.socket - addr: Any - received_lines: list[str] - smtp_state: int - seen_greeting: str - mailfrom: str - rcpttos: list[str] - received_data: str - fqdn: str - peer: str - - command_size_limit: int - data_size_limit: int - - enable_SMTPUTF8: bool - @property - def max_command_size_limit(self) -> int: ... - def __init__( - self, - server: SMTPServer, - conn: socket.socket, - addr: Any, - data_size_limit: int = 33554432, - map: asyncore._MapType | None = None, - enable_SMTPUTF8: bool = False, - decode_data: bool = False, - ) -> None: ... - # base asynchat.async_chat.push() accepts bytes - def push(self, msg: str) -> None: ... # type: ignore[override] - def collect_incoming_data(self, data: bytes) -> None: ... - def found_terminator(self) -> None: ... - def smtp_HELO(self, arg: str) -> None: ... - def smtp_NOOP(self, arg: str) -> None: ... - def smtp_QUIT(self, arg: str) -> None: ... - def smtp_MAIL(self, arg: str) -> None: ... - def smtp_RCPT(self, arg: str) -> None: ... - def smtp_RSET(self, arg: str) -> None: ... - def smtp_DATA(self, arg: str) -> None: ... - def smtp_EHLO(self, arg: str) -> None: ... - def smtp_HELP(self, arg: str) -> None: ... - def smtp_VRFY(self, arg: str) -> None: ... - def smtp_EXPN(self, arg: str) -> None: ... - -class SMTPServer(asyncore.dispatcher): - channel_class: type[SMTPChannel] - - data_size_limit: int - enable_SMTPUTF8: bool - def __init__( - self, - localaddr: _Address, - remoteaddr: _Address, - data_size_limit: int = 33554432, - map: asyncore._MapType | None = None, - enable_SMTPUTF8: bool = False, - decode_data: bool = False, - ) -> None: ... - def handle_accepted(self, conn: socket.socket, addr: Any) -> None: ... - def process_message( - self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str, **kwargs: Any - ) -> str | None: ... - -class DebuggingServer(SMTPServer): ... - -class PureProxy(SMTPServer): - def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override] - -if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.9; removed in Python 3.11.") - class MailmanProxy(PureProxy): - def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/smtplib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/smtplib.vpi deleted file mode 100644 index 1aaa5b49..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/smtplib.vpi +++ /dev/null @@ -1,223 +0,0 @@ -import sys -from _socket import _Address as _SourceAddress -from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath -from collections.abc import Sequence -from email.message import Message as _Message -from re import Pattern -from socket import socket -from ssl import SSLContext -from types import TracebackType -from typing import Any, Final, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self, deprecated - -__all__ = [ - "SMTPException", - "SMTPServerDisconnected", - "SMTPResponseException", - "SMTPSenderRefused", - "SMTPRecipientsRefused", - "SMTPDataError", - "SMTPConnectError", - "SMTPHeloError", - "SMTPAuthenticationError", - "quoteaddr", - "quotedata", - "SMTP", - "SMTP_SSL", - "SMTPNotSupportedError", -] - -_Reply: TypeAlias = tuple[int, bytes] -_SendErrs: TypeAlias = dict[str, _Reply] - -SMTP_PORT: Final = 25 -SMTP_SSL_PORT: Final = 465 -CRLF: Final[str] -bCRLF: Final[bytes] - -OLDSTYLE_AUTH: Final[Pattern[str]] - -class SMTPException(OSError): ... -class SMTPNotSupportedError(SMTPException): ... -class SMTPServerDisconnected(SMTPException): ... - -class SMTPResponseException(SMTPException): - smtp_code: int - smtp_error: bytes | str - args: tuple[int, bytes | str] | tuple[int, bytes, str] - def __init__(self, code: int, msg: bytes | str) -> None: ... - -class SMTPSenderRefused(SMTPResponseException): - smtp_error: bytes - sender: str - args: tuple[int, bytes, str] - def __init__(self, code: int, msg: bytes, sender: str) -> None: ... - -class SMTPRecipientsRefused(SMTPException): - recipients: _SendErrs - args: tuple[_SendErrs] - def __init__(self, recipients: _SendErrs) -> None: ... - -class SMTPDataError(SMTPResponseException): ... -class SMTPConnectError(SMTPResponseException): ... -class SMTPHeloError(SMTPResponseException): ... -class SMTPAuthenticationError(SMTPResponseException): ... - -def quoteaddr(addrstring: str) -> str: ... -def quotedata(data: str) -> str: ... - -@type_check_only -class _AuthObject(Protocol): - @overload - def __call__(self, challenge: None = None, /) -> str | None: ... - @overload - def __call__(self, challenge: bytes, /) -> str: ... - -class SMTP: - debuglevel: int - sock: socket | None - # Type of file should match what socket.makefile() returns - file: Any | None - helo_resp: bytes | None - ehlo_msg: str - ehlo_resp: bytes | None - does_esmtp: bool - default_port: int - timeout: float - esmtp_features: dict[str, str] - command_encoding: str - source_address: _SourceAddress | None - local_hostname: str - def __init__( - self, - host: str = "", - port: int = 0, - local_hostname: str | None = None, - timeout: float = ..., - source_address: _SourceAddress | None = None, - ) -> None: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None - ) -> None: ... - def set_debuglevel(self, debuglevel: int) -> None: ... - def connect(self, host: str = "localhost", port: int = 0, source_address: _SourceAddress | None = None) -> _Reply: ... - def send(self, s: ReadableBuffer | str) -> None: ... - def putcmd(self, cmd: str, args: str = "") -> None: ... - def getreply(self) -> _Reply: ... - def docmd(self, cmd: str, args: str = "") -> _Reply: ... - def helo(self, name: str = "") -> _Reply: ... - def ehlo(self, name: str = "") -> _Reply: ... - def has_extn(self, opt: str) -> bool: ... - def help(self, args: str = "") -> bytes: ... - def rset(self) -> _Reply: ... - def noop(self) -> _Reply: ... - def mail(self, sender: str, options: Sequence[str] = ()) -> _Reply: ... - def rcpt(self, recip: str, options: Sequence[str] = ()) -> _Reply: ... - def data(self, msg: ReadableBuffer | str) -> _Reply: ... - def verify(self, address: str) -> _Reply: ... - vrfy = verify - def expn(self, address: str) -> _Reply: ... - def ehlo_or_helo_if_needed(self) -> None: ... - user: str - password: str - def auth(self, mechanism: str, authobject: _AuthObject, *, initial_response_ok: bool = True) -> _Reply: ... - - @overload - def auth_cram_md5(self, challenge: None = None) -> None: ... - @overload - def auth_cram_md5(self, challenge: ReadableBuffer) -> str: ... - - def auth_plain(self, challenge: ReadableBuffer | None = None) -> str: ... - def auth_login(self, challenge: ReadableBuffer | None = None) -> str: ... - def login(self, user: str, password: str, *, initial_response_ok: bool = True) -> _Reply: ... - if sys.version_info >= (3, 12): - def starttls(self, *, context: SSLContext | None = None) -> _Reply: ... - else: - @overload - def starttls(self, keyfile: None = None, certfile: None = None, context: SSLContext | None = None) -> _Reply: ... - @overload - @deprecated( - "The `keyfile`, `certfile` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `context` parameter instead." - ) - def starttls( - self, keyfile: StrOrBytesPath | None = None, certfile: StrOrBytesPath | None = None, context: None = None - ) -> _Reply: ... - - def sendmail( - self, - from_addr: str, - to_addrs: str | Sequence[str], - msg: SizedBuffer | str, - mail_options: Sequence[str] = (), - rcpt_options: Sequence[str] = (), - ) -> _SendErrs: ... - def send_message( - self, - msg: _Message, - from_addr: str | None = None, - to_addrs: str | Sequence[str] | None = None, - mail_options: Sequence[str] = (), - rcpt_options: Sequence[str] = (), - ) -> _SendErrs: ... - def close(self) -> None: ... - def quit(self) -> _Reply: ... - -class SMTP_SSL(SMTP): - context: SSLContext - if sys.version_info >= (3, 12): - def __init__( - self, - host: str = "", - port: int = 0, - local_hostname: str | None = None, - *, - timeout: float = ..., - source_address: _SourceAddress | None = None, - context: SSLContext | None = None, - ) -> None: ... - else: - @overload - def __init__( - self, - host: str = "", - port: int = 0, - local_hostname: str | None = None, - keyfile: None = None, - certfile: None = None, - timeout: float = ..., - source_address: _SourceAddress | None = None, - context: SSLContext | None = None, - ) -> None: ... - @overload - @deprecated( - "The `keyfile`, `certfile` parameters are deprecated since Python 3.6; " - "removed in Python 3.12. Use `context` parameter instead." - ) - def __init__( - self, - host: str = "", - port: int = 0, - local_hostname: str | None = None, - keyfile: StrOrBytesPath | None = None, - certfile: StrOrBytesPath | None = None, - timeout: float = ..., - source_address: _SourceAddress | None = None, - context: None = None, - ) -> None: ... - - keyfile: StrOrBytesPath | None - certfile: StrOrBytesPath | None - -LMTP_PORT: Final = 2003 - -class LMTP(SMTP): - def __init__( - self, - host: str = "", - port: int = 2003, - local_hostname: str | None = None, - source_address: _SourceAddress | None = None, - timeout: float = ..., - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sndhdr.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sndhdr.vpi deleted file mode 100644 index f4d48760..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sndhdr.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from _typeshed import StrOrBytesPath -from typing import NamedTuple - -__all__ = ["what", "whathdr"] - -class SndHeaders(NamedTuple): - filetype: str - framerate: int - nchannels: int - nframes: int - sampwidth: int | str - -def what(filename: StrOrBytesPath) -> SndHeaders | None: ... -def whathdr(filename: StrOrBytesPath) -> SndHeaders | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/socketserver.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/socketserver.vpi deleted file mode 100644 index 05e0025d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/socketserver.vpi +++ /dev/null @@ -1,170 +0,0 @@ -import sys -import types -from _socket import _Address, _RetAddress -from _typeshed import ReadableBuffer -from collections.abc import Callable -from io import BufferedIOBase -from socket import socket as _socket -from typing import Any, ClassVar, TypeAlias -from typing_extensions import Self - -__all__ = [ - "BaseServer", - "TCPServer", - "UDPServer", - "ThreadingUDPServer", - "ThreadingTCPServer", - "BaseRequestHandler", - "StreamRequestHandler", - "DatagramRequestHandler", - "ThreadingMixIn", -] -if sys.platform != "win32": - __all__ += [ - "ForkingMixIn", - "ForkingTCPServer", - "ForkingUDPServer", - "ThreadingUnixDatagramServer", - "ThreadingUnixStreamServer", - "UnixDatagramServer", - "UnixStreamServer", - ] - if sys.version_info >= (3, 12): - __all__ += ["ForkingUnixStreamServer", "ForkingUnixDatagramServer"] - -_RequestType: TypeAlias = _socket | tuple[bytes, _socket] -_AfUnixAddress: TypeAlias = str | ReadableBuffer # address acceptable for an AF_UNIX socket -_AfInetAddress: TypeAlias = tuple[str | bytes | bytearray, int] # address acceptable for an AF_INET socket -_AfInet6Address: TypeAlias = tuple[str | bytes | bytearray, int, int, int] # address acceptable for an AF_INET6 socket - -# This can possibly be generic at some point: -class BaseServer: - server_address: _Address - timeout: float | None - RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler] - def __init__( - self, server_address: _Address, RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler] - ) -> None: ... - def handle_request(self) -> None: ... - def serve_forever(self, poll_interval: float = 0.5) -> None: ... - def shutdown(self) -> None: ... - def server_close(self) -> None: ... - def finish_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def get_request(self) -> tuple[Any, Any]: ... # Not implemented here, but expected to exist on subclasses - def handle_error(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def handle_timeout(self) -> None: ... - def process_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def server_activate(self) -> None: ... - def verify_request(self, request: _RequestType, client_address: _RetAddress) -> bool: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None - ) -> None: ... - def service_actions(self) -> None: ... - def shutdown_request(self, request: _RequestType) -> None: ... # undocumented - def close_request(self, request: _RequestType) -> None: ... # undocumented - -class TCPServer(BaseServer): - address_family: int - socket: _socket - allow_reuse_address: bool - request_queue_size: int - socket_type: int - if sys.version_info >= (3, 11): - allow_reuse_port: bool - server_address: _AfInetAddress | _AfInet6Address - def __init__( - self, - server_address: _AfInetAddress | _AfInet6Address, - RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler], - bind_and_activate: bool = True, - ) -> None: ... - def fileno(self) -> int: ... - def get_request(self) -> tuple[_socket, _RetAddress]: ... - def server_bind(self) -> None: ... - -class UDPServer(TCPServer): - max_packet_size: ClassVar[int] - def get_request(self) -> tuple[tuple[bytes, _socket], _RetAddress]: ... # type: ignore[override] - -if sys.platform != "win32": - class UnixStreamServer(TCPServer): - server_address: _AfUnixAddress # type: ignore[assignment] - def __init__( - self, - server_address: _AfUnixAddress, - RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler], - bind_and_activate: bool = True, - ) -> None: ... - - class UnixDatagramServer(UDPServer): - server_address: _AfUnixAddress # type: ignore[assignment] - def __init__( - self, - server_address: _AfUnixAddress, - RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler], - bind_and_activate: bool = True, - ) -> None: ... - -if sys.platform != "win32": - class ForkingMixIn: - timeout: float | None # undocumented - active_children: set[int] | None # undocumented - max_children: int # undocumented - block_on_close: bool - def collect_children(self, *, blocking: bool = False) -> None: ... # undocumented - def handle_timeout(self) -> None: ... # undocumented - def service_actions(self) -> None: ... # undocumented - def process_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def server_close(self) -> None: ... - -class ThreadingMixIn: - daemon_threads: bool - block_on_close: bool - def process_request_thread(self, request: _RequestType, client_address: _RetAddress) -> None: ... # undocumented - def process_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def server_close(self) -> None: ... - -if sys.platform != "win32": - class ForkingTCPServer(ForkingMixIn, TCPServer): ... - class ForkingUDPServer(ForkingMixIn, UDPServer): ... - if sys.version_info >= (3, 12): - class ForkingUnixStreamServer(ForkingMixIn, UnixStreamServer): ... - class ForkingUnixDatagramServer(ForkingMixIn, UnixDatagramServer): ... - -class ThreadingTCPServer(ThreadingMixIn, TCPServer): ... -class ThreadingUDPServer(ThreadingMixIn, UDPServer): ... - -if sys.platform != "win32": - class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ... - class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ... - -class BaseRequestHandler: - # `request` is technically of type _RequestType, - # but there are some concerns that having a union here would cause - # too much inconvenience to people using it (see - # https://github.com/python/typeshed/pull/384#issuecomment-234649696) - # - # Note also that _RetAddress is also just an alias for `Any` - request: Any - client_address: _RetAddress - server: BaseServer - def __init__(self, request: _RequestType, client_address: _RetAddress, server: BaseServer) -> None: ... - def setup(self) -> None: ... - def handle(self) -> None: ... - def finish(self) -> None: ... - -class StreamRequestHandler(BaseRequestHandler): - rbufsize: ClassVar[int] # undocumented - wbufsize: ClassVar[int] # undocumented - timeout: ClassVar[float | None] # undocumented - disable_nagle_algorithm: ClassVar[bool] # undocumented - connection: Any # undocumented - rfile: BufferedIOBase - wfile: BufferedIOBase - -class DatagramRequestHandler(BaseRequestHandler): - packet: bytes # undocumented - socket: _socket # undocumented - rfile: BufferedIOBase - wfile: BufferedIOBase diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/spwd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/spwd.vpi deleted file mode 100644 index 0a06cdfe..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/spwd.vpi +++ /dev/null @@ -1,45 +0,0 @@ -import sys -from _typeshed import structseq -from typing import Any, Final, final - -if sys.platform != "win32": - @final - class struct_spwd(structseq[Any], tuple[str, str, int, int, int, int, int, int, int]): - __match_args__: Final = ( - "sp_namp", - "sp_pwdp", - "sp_lstchg", - "sp_min", - "sp_max", - "sp_warn", - "sp_inact", - "sp_expire", - "sp_flag", - ) - - @property - def sp_namp(self) -> str: ... - @property - def sp_pwdp(self) -> str: ... - @property - def sp_lstchg(self) -> int: ... - @property - def sp_min(self) -> int: ... - @property - def sp_max(self) -> int: ... - @property - def sp_warn(self) -> int: ... - @property - def sp_inact(self) -> int: ... - @property - def sp_expire(self) -> int: ... - @property - def sp_flag(self) -> int: ... - # Deprecated aliases below. - @property - def sp_nam(self) -> str: ... - @property - def sp_pwd(self) -> str: ... - - def getspall() -> list[struct_spwd]: ... - def getspnam(arg: str, /) -> struct_spwd: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/__init__.vpi deleted file mode 100644 index 7c033bdf..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/__init__.vpi +++ /dev/null @@ -1,499 +0,0 @@ -import sys -from _typeshed import MaybeNone, ReadableBuffer, StrOrBytesPath, SupportsLenAndGetItem, Unused -from collections.abc import Callable, Generator, Iterable, Iterator, Mapping, Sequence -from sqlite3.dbapi2 import ( - PARSE_COLNAMES as PARSE_COLNAMES, - PARSE_DECLTYPES as PARSE_DECLTYPES, - SQLITE_ALTER_TABLE as SQLITE_ALTER_TABLE, - SQLITE_ANALYZE as SQLITE_ANALYZE, - SQLITE_ATTACH as SQLITE_ATTACH, - SQLITE_CREATE_INDEX as SQLITE_CREATE_INDEX, - SQLITE_CREATE_TABLE as SQLITE_CREATE_TABLE, - SQLITE_CREATE_TEMP_INDEX as SQLITE_CREATE_TEMP_INDEX, - SQLITE_CREATE_TEMP_TABLE as SQLITE_CREATE_TEMP_TABLE, - SQLITE_CREATE_TEMP_TRIGGER as SQLITE_CREATE_TEMP_TRIGGER, - SQLITE_CREATE_TEMP_VIEW as SQLITE_CREATE_TEMP_VIEW, - SQLITE_CREATE_TRIGGER as SQLITE_CREATE_TRIGGER, - SQLITE_CREATE_VIEW as SQLITE_CREATE_VIEW, - SQLITE_CREATE_VTABLE as SQLITE_CREATE_VTABLE, - SQLITE_DELETE as SQLITE_DELETE, - SQLITE_DENY as SQLITE_DENY, - SQLITE_DETACH as SQLITE_DETACH, - SQLITE_DONE as SQLITE_DONE, - SQLITE_DROP_INDEX as SQLITE_DROP_INDEX, - SQLITE_DROP_TABLE as SQLITE_DROP_TABLE, - SQLITE_DROP_TEMP_INDEX as SQLITE_DROP_TEMP_INDEX, - SQLITE_DROP_TEMP_TABLE as SQLITE_DROP_TEMP_TABLE, - SQLITE_DROP_TEMP_TRIGGER as SQLITE_DROP_TEMP_TRIGGER, - SQLITE_DROP_TEMP_VIEW as SQLITE_DROP_TEMP_VIEW, - SQLITE_DROP_TRIGGER as SQLITE_DROP_TRIGGER, - SQLITE_DROP_VIEW as SQLITE_DROP_VIEW, - SQLITE_DROP_VTABLE as SQLITE_DROP_VTABLE, - SQLITE_FUNCTION as SQLITE_FUNCTION, - SQLITE_IGNORE as SQLITE_IGNORE, - SQLITE_INSERT as SQLITE_INSERT, - SQLITE_OK as SQLITE_OK, - SQLITE_PRAGMA as SQLITE_PRAGMA, - SQLITE_READ as SQLITE_READ, - SQLITE_RECURSIVE as SQLITE_RECURSIVE, - SQLITE_REINDEX as SQLITE_REINDEX, - SQLITE_SAVEPOINT as SQLITE_SAVEPOINT, - SQLITE_SELECT as SQLITE_SELECT, - SQLITE_TRANSACTION as SQLITE_TRANSACTION, - SQLITE_UPDATE as SQLITE_UPDATE, - Binary as Binary, - Date as Date, - DateFromTicks as DateFromTicks, - Time as Time, - TimeFromTicks as TimeFromTicks, - TimestampFromTicks as TimestampFromTicks, - adapt as adapt, - adapters as adapters, - apilevel as apilevel, - complete_statement as complete_statement, - connect as connect, - converters as converters, - enable_callback_tracebacks as enable_callback_tracebacks, - paramstyle as paramstyle, - register_adapter as register_adapter, - register_converter as register_converter, - sqlite_version as sqlite_version, - sqlite_version_info as sqlite_version_info, - threadsafety as threadsafety, -) -from types import TracebackType -from typing import Any, Literal, Protocol, SupportsIndex, TypeAlias, TypeVar, final, overload, type_check_only -from typing_extensions import Self, disjoint_base - -if sys.version_info < (3, 14): - from sqlite3.dbapi2 import version_info as version_info - -if sys.version_info >= (3, 15): - from sqlite3.dbapi2 import SQLITE_KEYWORDS as SQLITE_KEYWORDS - -if sys.version_info >= (3, 12): - from sqlite3.dbapi2 import ( - LEGACY_TRANSACTION_CONTROL as LEGACY_TRANSACTION_CONTROL, - SQLITE_DBCONFIG_DEFENSIVE as SQLITE_DBCONFIG_DEFENSIVE, - SQLITE_DBCONFIG_DQS_DDL as SQLITE_DBCONFIG_DQS_DDL, - SQLITE_DBCONFIG_DQS_DML as SQLITE_DBCONFIG_DQS_DML, - SQLITE_DBCONFIG_ENABLE_FKEY as SQLITE_DBCONFIG_ENABLE_FKEY, - SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER as SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, - SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION as SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, - SQLITE_DBCONFIG_ENABLE_QPSG as SQLITE_DBCONFIG_ENABLE_QPSG, - SQLITE_DBCONFIG_ENABLE_TRIGGER as SQLITE_DBCONFIG_ENABLE_TRIGGER, - SQLITE_DBCONFIG_ENABLE_VIEW as SQLITE_DBCONFIG_ENABLE_VIEW, - SQLITE_DBCONFIG_LEGACY_ALTER_TABLE as SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, - SQLITE_DBCONFIG_LEGACY_FILE_FORMAT as SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, - SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE as SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, - SQLITE_DBCONFIG_RESET_DATABASE as SQLITE_DBCONFIG_RESET_DATABASE, - SQLITE_DBCONFIG_TRIGGER_EQP as SQLITE_DBCONFIG_TRIGGER_EQP, - SQLITE_DBCONFIG_TRUSTED_SCHEMA as SQLITE_DBCONFIG_TRUSTED_SCHEMA, - SQLITE_DBCONFIG_WRITABLE_SCHEMA as SQLITE_DBCONFIG_WRITABLE_SCHEMA, - ) - -if sys.version_info >= (3, 11): - from sqlite3.dbapi2 import ( - SQLITE_ABORT as SQLITE_ABORT, - SQLITE_ABORT_ROLLBACK as SQLITE_ABORT_ROLLBACK, - SQLITE_AUTH as SQLITE_AUTH, - SQLITE_AUTH_USER as SQLITE_AUTH_USER, - SQLITE_BUSY as SQLITE_BUSY, - SQLITE_BUSY_RECOVERY as SQLITE_BUSY_RECOVERY, - SQLITE_BUSY_SNAPSHOT as SQLITE_BUSY_SNAPSHOT, - SQLITE_BUSY_TIMEOUT as SQLITE_BUSY_TIMEOUT, - SQLITE_CANTOPEN as SQLITE_CANTOPEN, - SQLITE_CANTOPEN_CONVPATH as SQLITE_CANTOPEN_CONVPATH, - SQLITE_CANTOPEN_DIRTYWAL as SQLITE_CANTOPEN_DIRTYWAL, - SQLITE_CANTOPEN_FULLPATH as SQLITE_CANTOPEN_FULLPATH, - SQLITE_CANTOPEN_ISDIR as SQLITE_CANTOPEN_ISDIR, - SQLITE_CANTOPEN_NOTEMPDIR as SQLITE_CANTOPEN_NOTEMPDIR, - SQLITE_CANTOPEN_SYMLINK as SQLITE_CANTOPEN_SYMLINK, - SQLITE_CONSTRAINT as SQLITE_CONSTRAINT, - SQLITE_CONSTRAINT_CHECK as SQLITE_CONSTRAINT_CHECK, - SQLITE_CONSTRAINT_COMMITHOOK as SQLITE_CONSTRAINT_COMMITHOOK, - SQLITE_CONSTRAINT_FOREIGNKEY as SQLITE_CONSTRAINT_FOREIGNKEY, - SQLITE_CONSTRAINT_FUNCTION as SQLITE_CONSTRAINT_FUNCTION, - SQLITE_CONSTRAINT_NOTNULL as SQLITE_CONSTRAINT_NOTNULL, - SQLITE_CONSTRAINT_PINNED as SQLITE_CONSTRAINT_PINNED, - SQLITE_CONSTRAINT_PRIMARYKEY as SQLITE_CONSTRAINT_PRIMARYKEY, - SQLITE_CONSTRAINT_ROWID as SQLITE_CONSTRAINT_ROWID, - SQLITE_CONSTRAINT_TRIGGER as SQLITE_CONSTRAINT_TRIGGER, - SQLITE_CONSTRAINT_UNIQUE as SQLITE_CONSTRAINT_UNIQUE, - SQLITE_CONSTRAINT_VTAB as SQLITE_CONSTRAINT_VTAB, - SQLITE_CORRUPT as SQLITE_CORRUPT, - SQLITE_CORRUPT_INDEX as SQLITE_CORRUPT_INDEX, - SQLITE_CORRUPT_SEQUENCE as SQLITE_CORRUPT_SEQUENCE, - SQLITE_CORRUPT_VTAB as SQLITE_CORRUPT_VTAB, - SQLITE_EMPTY as SQLITE_EMPTY, - SQLITE_ERROR as SQLITE_ERROR, - SQLITE_ERROR_MISSING_COLLSEQ as SQLITE_ERROR_MISSING_COLLSEQ, - SQLITE_ERROR_RETRY as SQLITE_ERROR_RETRY, - SQLITE_ERROR_SNAPSHOT as SQLITE_ERROR_SNAPSHOT, - SQLITE_FORMAT as SQLITE_FORMAT, - SQLITE_FULL as SQLITE_FULL, - SQLITE_INTERNAL as SQLITE_INTERNAL, - SQLITE_INTERRUPT as SQLITE_INTERRUPT, - SQLITE_IOERR as SQLITE_IOERR, - SQLITE_IOERR_ACCESS as SQLITE_IOERR_ACCESS, - SQLITE_IOERR_AUTH as SQLITE_IOERR_AUTH, - SQLITE_IOERR_BEGIN_ATOMIC as SQLITE_IOERR_BEGIN_ATOMIC, - SQLITE_IOERR_BLOCKED as SQLITE_IOERR_BLOCKED, - SQLITE_IOERR_CHECKRESERVEDLOCK as SQLITE_IOERR_CHECKRESERVEDLOCK, - SQLITE_IOERR_CLOSE as SQLITE_IOERR_CLOSE, - SQLITE_IOERR_COMMIT_ATOMIC as SQLITE_IOERR_COMMIT_ATOMIC, - SQLITE_IOERR_CONVPATH as SQLITE_IOERR_CONVPATH, - SQLITE_IOERR_CORRUPTFS as SQLITE_IOERR_CORRUPTFS, - SQLITE_IOERR_DATA as SQLITE_IOERR_DATA, - SQLITE_IOERR_DELETE as SQLITE_IOERR_DELETE, - SQLITE_IOERR_DELETE_NOENT as SQLITE_IOERR_DELETE_NOENT, - SQLITE_IOERR_DIR_CLOSE as SQLITE_IOERR_DIR_CLOSE, - SQLITE_IOERR_DIR_FSYNC as SQLITE_IOERR_DIR_FSYNC, - SQLITE_IOERR_FSTAT as SQLITE_IOERR_FSTAT, - SQLITE_IOERR_FSYNC as SQLITE_IOERR_FSYNC, - SQLITE_IOERR_GETTEMPPATH as SQLITE_IOERR_GETTEMPPATH, - SQLITE_IOERR_LOCK as SQLITE_IOERR_LOCK, - SQLITE_IOERR_MMAP as SQLITE_IOERR_MMAP, - SQLITE_IOERR_NOMEM as SQLITE_IOERR_NOMEM, - SQLITE_IOERR_RDLOCK as SQLITE_IOERR_RDLOCK, - SQLITE_IOERR_READ as SQLITE_IOERR_READ, - SQLITE_IOERR_ROLLBACK_ATOMIC as SQLITE_IOERR_ROLLBACK_ATOMIC, - SQLITE_IOERR_SEEK as SQLITE_IOERR_SEEK, - SQLITE_IOERR_SHMLOCK as SQLITE_IOERR_SHMLOCK, - SQLITE_IOERR_SHMMAP as SQLITE_IOERR_SHMMAP, - SQLITE_IOERR_SHMOPEN as SQLITE_IOERR_SHMOPEN, - SQLITE_IOERR_SHMSIZE as SQLITE_IOERR_SHMSIZE, - SQLITE_IOERR_SHORT_READ as SQLITE_IOERR_SHORT_READ, - SQLITE_IOERR_TRUNCATE as SQLITE_IOERR_TRUNCATE, - SQLITE_IOERR_UNLOCK as SQLITE_IOERR_UNLOCK, - SQLITE_IOERR_VNODE as SQLITE_IOERR_VNODE, - SQLITE_IOERR_WRITE as SQLITE_IOERR_WRITE, - SQLITE_LIMIT_ATTACHED as SQLITE_LIMIT_ATTACHED, - SQLITE_LIMIT_COLUMN as SQLITE_LIMIT_COLUMN, - SQLITE_LIMIT_COMPOUND_SELECT as SQLITE_LIMIT_COMPOUND_SELECT, - SQLITE_LIMIT_EXPR_DEPTH as SQLITE_LIMIT_EXPR_DEPTH, - SQLITE_LIMIT_FUNCTION_ARG as SQLITE_LIMIT_FUNCTION_ARG, - SQLITE_LIMIT_LENGTH as SQLITE_LIMIT_LENGTH, - SQLITE_LIMIT_LIKE_PATTERN_LENGTH as SQLITE_LIMIT_LIKE_PATTERN_LENGTH, - SQLITE_LIMIT_SQL_LENGTH as SQLITE_LIMIT_SQL_LENGTH, - SQLITE_LIMIT_TRIGGER_DEPTH as SQLITE_LIMIT_TRIGGER_DEPTH, - SQLITE_LIMIT_VARIABLE_NUMBER as SQLITE_LIMIT_VARIABLE_NUMBER, - SQLITE_LIMIT_VDBE_OP as SQLITE_LIMIT_VDBE_OP, - SQLITE_LIMIT_WORKER_THREADS as SQLITE_LIMIT_WORKER_THREADS, - SQLITE_LOCKED as SQLITE_LOCKED, - SQLITE_LOCKED_SHAREDCACHE as SQLITE_LOCKED_SHAREDCACHE, - SQLITE_LOCKED_VTAB as SQLITE_LOCKED_VTAB, - SQLITE_MISMATCH as SQLITE_MISMATCH, - SQLITE_MISUSE as SQLITE_MISUSE, - SQLITE_NOLFS as SQLITE_NOLFS, - SQLITE_NOMEM as SQLITE_NOMEM, - SQLITE_NOTADB as SQLITE_NOTADB, - SQLITE_NOTFOUND as SQLITE_NOTFOUND, - SQLITE_NOTICE as SQLITE_NOTICE, - SQLITE_NOTICE_RECOVER_ROLLBACK as SQLITE_NOTICE_RECOVER_ROLLBACK, - SQLITE_NOTICE_RECOVER_WAL as SQLITE_NOTICE_RECOVER_WAL, - SQLITE_OK_LOAD_PERMANENTLY as SQLITE_OK_LOAD_PERMANENTLY, - SQLITE_OK_SYMLINK as SQLITE_OK_SYMLINK, - SQLITE_PERM as SQLITE_PERM, - SQLITE_PROTOCOL as SQLITE_PROTOCOL, - SQLITE_RANGE as SQLITE_RANGE, - SQLITE_READONLY as SQLITE_READONLY, - SQLITE_READONLY_CANTINIT as SQLITE_READONLY_CANTINIT, - SQLITE_READONLY_CANTLOCK as SQLITE_READONLY_CANTLOCK, - SQLITE_READONLY_DBMOVED as SQLITE_READONLY_DBMOVED, - SQLITE_READONLY_DIRECTORY as SQLITE_READONLY_DIRECTORY, - SQLITE_READONLY_RECOVERY as SQLITE_READONLY_RECOVERY, - SQLITE_READONLY_ROLLBACK as SQLITE_READONLY_ROLLBACK, - SQLITE_ROW as SQLITE_ROW, - SQLITE_SCHEMA as SQLITE_SCHEMA, - SQLITE_TOOBIG as SQLITE_TOOBIG, - SQLITE_WARNING as SQLITE_WARNING, - SQLITE_WARNING_AUTOINDEX as SQLITE_WARNING_AUTOINDEX, - ) - -if sys.version_info < (3, 12): - from sqlite3.dbapi2 import enable_shared_cache as enable_shared_cache, version as version - -_CursorT = TypeVar("_CursorT", bound=Cursor) -_SqliteData: TypeAlias = str | ReadableBuffer | int | float | None -# Data that is passed through adapters can be of any type accepted by an adapter. -_AdaptedInputData: TypeAlias = _SqliteData | Any -# The Mapping must really be a dict, but making it invariant is too annoying. -_Parameters: TypeAlias = SupportsLenAndGetItem[_AdaptedInputData] | Mapping[str, _AdaptedInputData] -# Controls the legacy transaction handling mode of sqlite3. -_IsolationLevel: TypeAlias = Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None -_RowFactoryOptions: TypeAlias = type[Row] | Callable[[Cursor, tuple[Any, ...]], object] | None - -@type_check_only -class _AnyParamWindowAggregateClass(Protocol): - def step(self, *args: Any) -> object: ... - def inverse(self, *args: Any) -> object: ... - def value(self) -> _SqliteData: ... - def finalize(self) -> _SqliteData: ... - -@type_check_only -class _WindowAggregateClass(Protocol): - step: Callable[..., object] - inverse: Callable[..., object] - def value(self) -> _SqliteData: ... - def finalize(self) -> _SqliteData: ... - -@type_check_only -class _AggregateProtocol(Protocol): - def step(self, value: int, /) -> object: ... - def finalize(self) -> int: ... - -@type_check_only -class _SingleParamWindowAggregateClass(Protocol): - def step(self, param: Any, /) -> object: ... - def inverse(self, param: Any, /) -> object: ... - def value(self) -> _SqliteData: ... - def finalize(self) -> _SqliteData: ... - -# These classes are implemented in the C module _sqlite3. At runtime, they're imported -# from there into sqlite3.dbapi2 and from that module to here. However, they -# consider themselves to live in the sqlite3.* namespace, so we'll define them here. - -class Error(Exception): - if sys.version_info >= (3, 11): - sqlite_errorcode: int - sqlite_errorname: str - -class DatabaseError(Error): ... -class DataError(DatabaseError): ... -class IntegrityError(DatabaseError): ... -class InterfaceError(Error): ... -class InternalError(DatabaseError): ... -class NotSupportedError(DatabaseError): ... -class OperationalError(DatabaseError): ... -class ProgrammingError(DatabaseError): ... -class Warning(Exception): ... - -@disjoint_base -class Connection: - @property - def DataError(self) -> type[DataError]: ... - @property - def DatabaseError(self) -> type[DatabaseError]: ... - @property - def Error(self) -> type[Error]: ... - @property - def IntegrityError(self) -> type[IntegrityError]: ... - @property - def InterfaceError(self) -> type[InterfaceError]: ... - @property - def InternalError(self) -> type[InternalError]: ... - @property - def NotSupportedError(self) -> type[NotSupportedError]: ... - @property - def OperationalError(self) -> type[OperationalError]: ... - @property - def ProgrammingError(self) -> type[ProgrammingError]: ... - @property - def Warning(self) -> type[Warning]: ... - @property - def in_transaction(self) -> bool: ... - isolation_level: _IsolationLevel - @property - def total_changes(self) -> int: ... - if sys.version_info >= (3, 12): - @property - def autocommit(self) -> int: ... - @autocommit.setter - def autocommit(self, val: int) -> None: ... - - row_factory: _RowFactoryOptions - text_factory: Any - if sys.version_info >= (3, 12): - def __init__( - self, - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - factory: type[Connection] | None = ..., - cached_statements: int = 128, - uri: bool = False, - autocommit: bool = ..., - ) -> None: ... - else: - def __init__( - self, - database: StrOrBytesPath, - timeout: float = 5.0, - detect_types: int = 0, - isolation_level: _IsolationLevel = "DEFERRED", - check_same_thread: bool = True, - factory: type[Connection] | None = ..., - cached_statements: int = 128, - uri: bool = False, - ) -> None: ... - - def close(self) -> None: ... - if sys.version_info >= (3, 11): - def blobopen(self, table: str, column: str, row: int, /, *, readonly: bool = False, name: str = "main") -> Blob: ... - - def commit(self) -> None: ... - if sys.version_info >= (3, 15): - def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol], /) -> None: ... - else: - def create_aggregate(self, name: str, n_arg: int, aggregate_class: Callable[[], _AggregateProtocol]) -> None: ... - if sys.version_info >= (3, 11): - # num_params determines how many params will be passed to the aggregate class. We provide an overload - # for the case where num_params = 1, which is expected to be the common case. - @overload - def create_window_function( - self, name: str, num_params: Literal[1], aggregate_class: Callable[[], _SingleParamWindowAggregateClass] | None, / - ) -> None: ... - # And for num_params = -1, which means the aggregate must accept any number of parameters. - @overload - def create_window_function( - self, name: str, num_params: Literal[-1], aggregate_class: Callable[[], _AnyParamWindowAggregateClass] | None, / - ) -> None: ... - @overload - def create_window_function( - self, name: str, num_params: int, aggregate_class: Callable[[], _WindowAggregateClass] | None, / - ) -> None: ... - - def create_collation(self, name: str, callback: Callable[[str, str], SupportsIndex] | None, /) -> None: ... - if sys.version_info >= (3, 15): - def create_function( - self, name: str, narg: int, func: Callable[..., _SqliteData] | None, /, *, deterministic: bool = False - ) -> None: ... - else: - def create_function( - self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = False - ) -> None: ... - - @overload - def cursor(self, factory: None = None) -> Cursor: ... - @overload - def cursor(self, factory: Callable[[Connection], _CursorT]) -> _CursorT: ... - - def execute(self, sql: str, parameters: _Parameters = ..., /) -> Cursor: ... - def executemany(self, sql: str, parameters: Iterable[_Parameters], /) -> Cursor: ... - def executescript(self, sql_script: str, /) -> Cursor: ... - def interrupt(self) -> None: ... - if sys.version_info >= (3, 13): - def iterdump(self, *, filter: str | None = None) -> Generator[str]: ... - else: - def iterdump(self) -> Generator[str]: ... - - def rollback(self) -> None: ... - if sys.version_info >= (3, 15): - def set_authorizer( - self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None, / - ) -> None: ... - def set_progress_handler(self, progress_handler: Callable[[], int | None] | None, /, n: int) -> None: ... - def set_trace_callback(self, trace_callback: Callable[[str], object] | None, /) -> None: ... - else: - def set_authorizer( - self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None - ) -> None: ... - def set_progress_handler(self, progress_handler: Callable[[], int | None] | None, n: int) -> None: ... - def set_trace_callback(self, trace_callback: Callable[[str], object] | None) -> None: ... - # enable_load_extension and load_extension is not available on python distributions compiled - # without sqlite3 loadable extension support. see footnotes https://docs.python.org/3/library/sqlite3.html#f1 - def enable_load_extension(self, enable: bool, /) -> None: ... - if sys.version_info >= (3, 12): - def load_extension(self, name: str, /, *, entrypoint: str | None = None) -> None: ... - else: - def load_extension(self, name: str, /) -> None: ... - - def backup( - self, - target: Connection, - *, - pages: int = -1, - progress: Callable[[int, int, int], object] | None = None, - name: str = "main", - sleep: float = 0.25, - ) -> None: ... - if sys.version_info >= (3, 11): - def setlimit(self, category: int, limit: int, /) -> int: ... - def getlimit(self, category: int, /) -> int: ... - def serialize(self, *, name: str = "main") -> bytes: ... - def deserialize(self, data: ReadableBuffer, /, *, name: str = "main") -> None: ... - if sys.version_info >= (3, 12): - def getconfig(self, op: int, /) -> bool: ... - def setconfig(self, op: int, enable: bool = True, /) -> bool: ... - - def __call__(self, sql: str, /) -> _Statement: ... - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None, / - ) -> Literal[False]: ... - -@disjoint_base -class Cursor: - arraysize: int - @property - def connection(self) -> Connection: ... - # May be None, but using `| MaybeNone` (`| Any`) instead to avoid slightly annoying false positives. - @property - def description(self) -> tuple[tuple[str, None, None, None, None, None, None], ...] | MaybeNone: ... - @property - def lastrowid(self) -> int | None: ... - row_factory: _RowFactoryOptions - @property - def rowcount(self) -> int: ... - def __init__(self, cursor: Connection, /) -> None: ... - def close(self) -> None: ... - def execute(self, sql: str, parameters: _Parameters = (), /) -> Self: ... - def executemany(self, sql: str, seq_of_parameters: Iterable[_Parameters], /) -> Self: ... - def executescript(self, sql_script: str, /) -> Cursor: ... - def fetchall(self) -> list[Any]: ... - def fetchmany(self, size: int | None = 1) -> list[Any]: ... - # Returns either a row (as created by the row_factory) or None, but - # putting None in the return annotation causes annoying false positives. - def fetchone(self) -> Any: ... - def setinputsizes(self, sizes: Unused, /) -> None: ... # does nothing - def setoutputsize(self, size: Unused, column: Unused = None, /) -> None: ... # does nothing - def __iter__(self) -> Self: ... - def __next__(self) -> Any: ... - -@final -class PrepareProtocol: - def __init__(self, *args: object, **kwargs: object) -> None: ... - -@disjoint_base -class Row(Sequence[Any]): - def __new__(cls, cursor: Cursor, data: tuple[Any, ...], /) -> Self: ... - def keys(self) -> list[str]: ... - - @overload # Note: really needs int instead of SupportsIndex - def __getitem__(self, key: int | str, /) -> Any: ... - @overload # Note: SupportsIndex does work within slices. - def __getitem__(self, key: slice[SupportsIndex | None], /) -> tuple[Any, ...]: ... - - def __hash__(self) -> int: ... - def __iter__(self) -> Iterator[Any]: ... - def __len__(self) -> int: ... - # These return NotImplemented for anything that is not a Row. - def __eq__(self, value: object, /) -> bool: ... - def __ge__(self, value: object, /) -> bool: ... - def __gt__(self, value: object, /) -> bool: ... - def __le__(self, value: object, /) -> bool: ... - def __lt__(self, value: object, /) -> bool: ... - def __ne__(self, value: object, /) -> bool: ... - -# This class is not exposed. It calls itself sqlite3.Statement. -@final -@type_check_only -class _Statement: ... - -if sys.version_info >= (3, 11): - @final - class Blob: - def close(self) -> None: ... - def read(self, length: int = -1, /) -> bytes: ... - def write(self, data: ReadableBuffer, /) -> None: ... - def tell(self) -> int: ... - # whence must be one of os.SEEK_SET, os.SEEK_CUR, os.SEEK_END - def seek(self, offset: int, origin: int = 0, /) -> None: ... - def __len__(self) -> int: ... - def __enter__(self) -> Self: ... - def __exit__(self, type: object, val: object, tb: object, /) -> Literal[False]: ... - def __getitem__(self, key: SupportsIndex | slice, /) -> int: ... - def __setitem__(self, key: SupportsIndex | slice, value: int, /) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dbapi2.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dbapi2.vpi deleted file mode 100644 index 0cd676f9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dbapi2.vpi +++ /dev/null @@ -1,244 +0,0 @@ -import sys -from _sqlite3 import ( - PARSE_COLNAMES as PARSE_COLNAMES, - PARSE_DECLTYPES as PARSE_DECLTYPES, - SQLITE_ALTER_TABLE as SQLITE_ALTER_TABLE, - SQLITE_ANALYZE as SQLITE_ANALYZE, - SQLITE_ATTACH as SQLITE_ATTACH, - SQLITE_CREATE_INDEX as SQLITE_CREATE_INDEX, - SQLITE_CREATE_TABLE as SQLITE_CREATE_TABLE, - SQLITE_CREATE_TEMP_INDEX as SQLITE_CREATE_TEMP_INDEX, - SQLITE_CREATE_TEMP_TABLE as SQLITE_CREATE_TEMP_TABLE, - SQLITE_CREATE_TEMP_TRIGGER as SQLITE_CREATE_TEMP_TRIGGER, - SQLITE_CREATE_TEMP_VIEW as SQLITE_CREATE_TEMP_VIEW, - SQLITE_CREATE_TRIGGER as SQLITE_CREATE_TRIGGER, - SQLITE_CREATE_VIEW as SQLITE_CREATE_VIEW, - SQLITE_CREATE_VTABLE as SQLITE_CREATE_VTABLE, - SQLITE_DELETE as SQLITE_DELETE, - SQLITE_DENY as SQLITE_DENY, - SQLITE_DETACH as SQLITE_DETACH, - SQLITE_DONE as SQLITE_DONE, - SQLITE_DROP_INDEX as SQLITE_DROP_INDEX, - SQLITE_DROP_TABLE as SQLITE_DROP_TABLE, - SQLITE_DROP_TEMP_INDEX as SQLITE_DROP_TEMP_INDEX, - SQLITE_DROP_TEMP_TABLE as SQLITE_DROP_TEMP_TABLE, - SQLITE_DROP_TEMP_TRIGGER as SQLITE_DROP_TEMP_TRIGGER, - SQLITE_DROP_TEMP_VIEW as SQLITE_DROP_TEMP_VIEW, - SQLITE_DROP_TRIGGER as SQLITE_DROP_TRIGGER, - SQLITE_DROP_VIEW as SQLITE_DROP_VIEW, - SQLITE_DROP_VTABLE as SQLITE_DROP_VTABLE, - SQLITE_FUNCTION as SQLITE_FUNCTION, - SQLITE_IGNORE as SQLITE_IGNORE, - SQLITE_INSERT as SQLITE_INSERT, - SQLITE_OK as SQLITE_OK, - SQLITE_PRAGMA as SQLITE_PRAGMA, - SQLITE_READ as SQLITE_READ, - SQLITE_RECURSIVE as SQLITE_RECURSIVE, - SQLITE_REINDEX as SQLITE_REINDEX, - SQLITE_SAVEPOINT as SQLITE_SAVEPOINT, - SQLITE_SELECT as SQLITE_SELECT, - SQLITE_TRANSACTION as SQLITE_TRANSACTION, - SQLITE_UPDATE as SQLITE_UPDATE, - adapt as adapt, - adapters as adapters, - complete_statement as complete_statement, - connect as connect, - converters as converters, - enable_callback_tracebacks as enable_callback_tracebacks, - register_adapter as register_adapter, - register_converter as register_converter, - sqlite_version as sqlite_version, -) -from datetime import date, datetime, time -from sqlite3 import ( - Connection as Connection, - Cursor as Cursor, - DatabaseError as DatabaseError, - DataError as DataError, - Error as Error, - IntegrityError as IntegrityError, - InterfaceError as InterfaceError, - InternalError as InternalError, - NotSupportedError as NotSupportedError, - OperationalError as OperationalError, - PrepareProtocol as PrepareProtocol, - ProgrammingError as ProgrammingError, - Row as Row, - Warning as Warning, -) -from typing import Final, Literal -from typing_extensions import deprecated - -if sys.version_info >= (3, 12): - from _sqlite3 import ( - LEGACY_TRANSACTION_CONTROL as LEGACY_TRANSACTION_CONTROL, - SQLITE_DBCONFIG_DEFENSIVE as SQLITE_DBCONFIG_DEFENSIVE, - SQLITE_DBCONFIG_DQS_DDL as SQLITE_DBCONFIG_DQS_DDL, - SQLITE_DBCONFIG_DQS_DML as SQLITE_DBCONFIG_DQS_DML, - SQLITE_DBCONFIG_ENABLE_FKEY as SQLITE_DBCONFIG_ENABLE_FKEY, - SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER as SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, - SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION as SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, - SQLITE_DBCONFIG_ENABLE_QPSG as SQLITE_DBCONFIG_ENABLE_QPSG, - SQLITE_DBCONFIG_ENABLE_TRIGGER as SQLITE_DBCONFIG_ENABLE_TRIGGER, - SQLITE_DBCONFIG_ENABLE_VIEW as SQLITE_DBCONFIG_ENABLE_VIEW, - SQLITE_DBCONFIG_LEGACY_ALTER_TABLE as SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, - SQLITE_DBCONFIG_LEGACY_FILE_FORMAT as SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, - SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE as SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, - SQLITE_DBCONFIG_RESET_DATABASE as SQLITE_DBCONFIG_RESET_DATABASE, - SQLITE_DBCONFIG_TRIGGER_EQP as SQLITE_DBCONFIG_TRIGGER_EQP, - SQLITE_DBCONFIG_TRUSTED_SCHEMA as SQLITE_DBCONFIG_TRUSTED_SCHEMA, - SQLITE_DBCONFIG_WRITABLE_SCHEMA as SQLITE_DBCONFIG_WRITABLE_SCHEMA, - ) - -if sys.version_info >= (3, 15): - from _sqlite3 import SQLITE_KEYWORDS as SQLITE_KEYWORDS - -if sys.version_info >= (3, 11): - from _sqlite3 import ( - SQLITE_ABORT as SQLITE_ABORT, - SQLITE_ABORT_ROLLBACK as SQLITE_ABORT_ROLLBACK, - SQLITE_AUTH as SQLITE_AUTH, - SQLITE_AUTH_USER as SQLITE_AUTH_USER, - SQLITE_BUSY as SQLITE_BUSY, - SQLITE_BUSY_RECOVERY as SQLITE_BUSY_RECOVERY, - SQLITE_BUSY_SNAPSHOT as SQLITE_BUSY_SNAPSHOT, - SQLITE_BUSY_TIMEOUT as SQLITE_BUSY_TIMEOUT, - SQLITE_CANTOPEN as SQLITE_CANTOPEN, - SQLITE_CANTOPEN_CONVPATH as SQLITE_CANTOPEN_CONVPATH, - SQLITE_CANTOPEN_DIRTYWAL as SQLITE_CANTOPEN_DIRTYWAL, - SQLITE_CANTOPEN_FULLPATH as SQLITE_CANTOPEN_FULLPATH, - SQLITE_CANTOPEN_ISDIR as SQLITE_CANTOPEN_ISDIR, - SQLITE_CANTOPEN_NOTEMPDIR as SQLITE_CANTOPEN_NOTEMPDIR, - SQLITE_CANTOPEN_SYMLINK as SQLITE_CANTOPEN_SYMLINK, - SQLITE_CONSTRAINT as SQLITE_CONSTRAINT, - SQLITE_CONSTRAINT_CHECK as SQLITE_CONSTRAINT_CHECK, - SQLITE_CONSTRAINT_COMMITHOOK as SQLITE_CONSTRAINT_COMMITHOOK, - SQLITE_CONSTRAINT_FOREIGNKEY as SQLITE_CONSTRAINT_FOREIGNKEY, - SQLITE_CONSTRAINT_FUNCTION as SQLITE_CONSTRAINT_FUNCTION, - SQLITE_CONSTRAINT_NOTNULL as SQLITE_CONSTRAINT_NOTNULL, - SQLITE_CONSTRAINT_PINNED as SQLITE_CONSTRAINT_PINNED, - SQLITE_CONSTRAINT_PRIMARYKEY as SQLITE_CONSTRAINT_PRIMARYKEY, - SQLITE_CONSTRAINT_ROWID as SQLITE_CONSTRAINT_ROWID, - SQLITE_CONSTRAINT_TRIGGER as SQLITE_CONSTRAINT_TRIGGER, - SQLITE_CONSTRAINT_UNIQUE as SQLITE_CONSTRAINT_UNIQUE, - SQLITE_CONSTRAINT_VTAB as SQLITE_CONSTRAINT_VTAB, - SQLITE_CORRUPT as SQLITE_CORRUPT, - SQLITE_CORRUPT_INDEX as SQLITE_CORRUPT_INDEX, - SQLITE_CORRUPT_SEQUENCE as SQLITE_CORRUPT_SEQUENCE, - SQLITE_CORRUPT_VTAB as SQLITE_CORRUPT_VTAB, - SQLITE_EMPTY as SQLITE_EMPTY, - SQLITE_ERROR as SQLITE_ERROR, - SQLITE_ERROR_MISSING_COLLSEQ as SQLITE_ERROR_MISSING_COLLSEQ, - SQLITE_ERROR_RETRY as SQLITE_ERROR_RETRY, - SQLITE_ERROR_SNAPSHOT as SQLITE_ERROR_SNAPSHOT, - SQLITE_FORMAT as SQLITE_FORMAT, - SQLITE_FULL as SQLITE_FULL, - SQLITE_INTERNAL as SQLITE_INTERNAL, - SQLITE_INTERRUPT as SQLITE_INTERRUPT, - SQLITE_IOERR as SQLITE_IOERR, - SQLITE_IOERR_ACCESS as SQLITE_IOERR_ACCESS, - SQLITE_IOERR_AUTH as SQLITE_IOERR_AUTH, - SQLITE_IOERR_BEGIN_ATOMIC as SQLITE_IOERR_BEGIN_ATOMIC, - SQLITE_IOERR_BLOCKED as SQLITE_IOERR_BLOCKED, - SQLITE_IOERR_CHECKRESERVEDLOCK as SQLITE_IOERR_CHECKRESERVEDLOCK, - SQLITE_IOERR_CLOSE as SQLITE_IOERR_CLOSE, - SQLITE_IOERR_COMMIT_ATOMIC as SQLITE_IOERR_COMMIT_ATOMIC, - SQLITE_IOERR_CONVPATH as SQLITE_IOERR_CONVPATH, - SQLITE_IOERR_CORRUPTFS as SQLITE_IOERR_CORRUPTFS, - SQLITE_IOERR_DATA as SQLITE_IOERR_DATA, - SQLITE_IOERR_DELETE as SQLITE_IOERR_DELETE, - SQLITE_IOERR_DELETE_NOENT as SQLITE_IOERR_DELETE_NOENT, - SQLITE_IOERR_DIR_CLOSE as SQLITE_IOERR_DIR_CLOSE, - SQLITE_IOERR_DIR_FSYNC as SQLITE_IOERR_DIR_FSYNC, - SQLITE_IOERR_FSTAT as SQLITE_IOERR_FSTAT, - SQLITE_IOERR_FSYNC as SQLITE_IOERR_FSYNC, - SQLITE_IOERR_GETTEMPPATH as SQLITE_IOERR_GETTEMPPATH, - SQLITE_IOERR_LOCK as SQLITE_IOERR_LOCK, - SQLITE_IOERR_MMAP as SQLITE_IOERR_MMAP, - SQLITE_IOERR_NOMEM as SQLITE_IOERR_NOMEM, - SQLITE_IOERR_RDLOCK as SQLITE_IOERR_RDLOCK, - SQLITE_IOERR_READ as SQLITE_IOERR_READ, - SQLITE_IOERR_ROLLBACK_ATOMIC as SQLITE_IOERR_ROLLBACK_ATOMIC, - SQLITE_IOERR_SEEK as SQLITE_IOERR_SEEK, - SQLITE_IOERR_SHMLOCK as SQLITE_IOERR_SHMLOCK, - SQLITE_IOERR_SHMMAP as SQLITE_IOERR_SHMMAP, - SQLITE_IOERR_SHMOPEN as SQLITE_IOERR_SHMOPEN, - SQLITE_IOERR_SHMSIZE as SQLITE_IOERR_SHMSIZE, - SQLITE_IOERR_SHORT_READ as SQLITE_IOERR_SHORT_READ, - SQLITE_IOERR_TRUNCATE as SQLITE_IOERR_TRUNCATE, - SQLITE_IOERR_UNLOCK as SQLITE_IOERR_UNLOCK, - SQLITE_IOERR_VNODE as SQLITE_IOERR_VNODE, - SQLITE_IOERR_WRITE as SQLITE_IOERR_WRITE, - SQLITE_LIMIT_ATTACHED as SQLITE_LIMIT_ATTACHED, - SQLITE_LIMIT_COLUMN as SQLITE_LIMIT_COLUMN, - SQLITE_LIMIT_COMPOUND_SELECT as SQLITE_LIMIT_COMPOUND_SELECT, - SQLITE_LIMIT_EXPR_DEPTH as SQLITE_LIMIT_EXPR_DEPTH, - SQLITE_LIMIT_FUNCTION_ARG as SQLITE_LIMIT_FUNCTION_ARG, - SQLITE_LIMIT_LENGTH as SQLITE_LIMIT_LENGTH, - SQLITE_LIMIT_LIKE_PATTERN_LENGTH as SQLITE_LIMIT_LIKE_PATTERN_LENGTH, - SQLITE_LIMIT_SQL_LENGTH as SQLITE_LIMIT_SQL_LENGTH, - SQLITE_LIMIT_TRIGGER_DEPTH as SQLITE_LIMIT_TRIGGER_DEPTH, - SQLITE_LIMIT_VARIABLE_NUMBER as SQLITE_LIMIT_VARIABLE_NUMBER, - SQLITE_LIMIT_VDBE_OP as SQLITE_LIMIT_VDBE_OP, - SQLITE_LIMIT_WORKER_THREADS as SQLITE_LIMIT_WORKER_THREADS, - SQLITE_LOCKED as SQLITE_LOCKED, - SQLITE_LOCKED_SHAREDCACHE as SQLITE_LOCKED_SHAREDCACHE, - SQLITE_LOCKED_VTAB as SQLITE_LOCKED_VTAB, - SQLITE_MISMATCH as SQLITE_MISMATCH, - SQLITE_MISUSE as SQLITE_MISUSE, - SQLITE_NOLFS as SQLITE_NOLFS, - SQLITE_NOMEM as SQLITE_NOMEM, - SQLITE_NOTADB as SQLITE_NOTADB, - SQLITE_NOTFOUND as SQLITE_NOTFOUND, - SQLITE_NOTICE as SQLITE_NOTICE, - SQLITE_NOTICE_RECOVER_ROLLBACK as SQLITE_NOTICE_RECOVER_ROLLBACK, - SQLITE_NOTICE_RECOVER_WAL as SQLITE_NOTICE_RECOVER_WAL, - SQLITE_OK_LOAD_PERMANENTLY as SQLITE_OK_LOAD_PERMANENTLY, - SQLITE_OK_SYMLINK as SQLITE_OK_SYMLINK, - SQLITE_PERM as SQLITE_PERM, - SQLITE_PROTOCOL as SQLITE_PROTOCOL, - SQLITE_RANGE as SQLITE_RANGE, - SQLITE_READONLY as SQLITE_READONLY, - SQLITE_READONLY_CANTINIT as SQLITE_READONLY_CANTINIT, - SQLITE_READONLY_CANTLOCK as SQLITE_READONLY_CANTLOCK, - SQLITE_READONLY_DBMOVED as SQLITE_READONLY_DBMOVED, - SQLITE_READONLY_DIRECTORY as SQLITE_READONLY_DIRECTORY, - SQLITE_READONLY_RECOVERY as SQLITE_READONLY_RECOVERY, - SQLITE_READONLY_ROLLBACK as SQLITE_READONLY_ROLLBACK, - SQLITE_ROW as SQLITE_ROW, - SQLITE_SCHEMA as SQLITE_SCHEMA, - SQLITE_TOOBIG as SQLITE_TOOBIG, - SQLITE_WARNING as SQLITE_WARNING, - SQLITE_WARNING_AUTOINDEX as SQLITE_WARNING_AUTOINDEX, - ) - from sqlite3 import Blob as Blob - -if sys.version_info < (3, 14): - # Deprecated and removed from _sqlite3 in 3.12, but removed from here in 3.14. - version: Final[str] - -if sys.version_info < (3, 12): - # deprecation wrapper that has a different name for the argument... - @deprecated( - "Deprecated since Python 3.10; removed in Python 3.12. " - "Open database in URI mode using `cache=shared` parameter instead." - ) - def enable_shared_cache(enable: int) -> None: ... - -paramstyle: Final = "qmark" -threadsafety: Literal[0, 1, 3] -apilevel: Final[str] -Date = date -Time = time -Timestamp = datetime - -def DateFromTicks(ticks: float) -> Date: ... -def TimeFromTicks(ticks: float) -> Time: ... -def TimestampFromTicks(ticks: float) -> Timestamp: ... - -if sys.version_info < (3, 14): - # Deprecated in 3.12, removed in 3.14. - version_info: Final[tuple[int, int, int]] - -sqlite_version_info: Final[tuple[int, int, int]] -Binary = memoryview diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dump.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dump.vpi deleted file mode 100644 index ed95fa46..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sqlite3/dump.vpi +++ /dev/null @@ -1,2 +0,0 @@ -# This file is intentionally empty. The runtime module contains only -# private functions. diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_compile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sre_compile.vpi deleted file mode 100644 index 486b2f74..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_compile.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from re import Pattern -from sre_constants import * -from sre_constants import _NamedIntConstant -from sre_parse import SubPattern -from typing import Any, Final -from typing_extensions import TypeIs - -MAXCODE: Final[int] - -def dis(code: list[_NamedIntConstant]) -> None: ... -def isstring(obj: object) -> TypeIs[str | bytes]: ... -def compile(p: str | bytes | SubPattern, flags: int = 0) -> Pattern[Any]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_constants.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sre_constants.vpi deleted file mode 100644 index 9a1da4ac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_constants.vpi +++ /dev/null @@ -1,135 +0,0 @@ -import sys -from re import error as error -from typing import Final -from typing_extensions import Self, disjoint_base - -MAXGROUPS: Final[int] - -MAGIC: Final[int] - -if sys.version_info >= (3, 12): - class _NamedIntConstant(int): - name: str - def __new__(cls, value: int, name: str) -> Self: ... - -else: - @disjoint_base - class _NamedIntConstant(int): - name: str - def __new__(cls, value: int, name: str) -> Self: ... - -MAXREPEAT: Final[_NamedIntConstant] -OPCODES: list[_NamedIntConstant] -ATCODES: list[_NamedIntConstant] -CHCODES: list[_NamedIntConstant] -OP_IGNORE: dict[_NamedIntConstant, _NamedIntConstant] -OP_LOCALE_IGNORE: dict[_NamedIntConstant, _NamedIntConstant] -OP_UNICODE_IGNORE: dict[_NamedIntConstant, _NamedIntConstant] -AT_MULTILINE: dict[_NamedIntConstant, _NamedIntConstant] -AT_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] -AT_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] -CH_LOCALE: dict[_NamedIntConstant, _NamedIntConstant] -CH_UNICODE: dict[_NamedIntConstant, _NamedIntConstant] -if sys.version_info >= (3, 14): - CH_NEGATE: dict[_NamedIntConstant, _NamedIntConstant] -# flags -if sys.version_info < (3, 13): - SRE_FLAG_TEMPLATE: Final = 1 -SRE_FLAG_IGNORECASE: Final = 2 -SRE_FLAG_LOCALE: Final = 4 -SRE_FLAG_MULTILINE: Final = 8 -SRE_FLAG_DOTALL: Final = 16 -SRE_FLAG_UNICODE: Final = 32 -SRE_FLAG_VERBOSE: Final = 64 -SRE_FLAG_DEBUG: Final = 128 -SRE_FLAG_ASCII: Final = 256 -# flags for INFO primitive -SRE_INFO_PREFIX: Final = 1 -SRE_INFO_LITERAL: Final = 2 -SRE_INFO_CHARSET: Final = 4 - -# Stubgen above; manually defined constants below (dynamic at runtime) - -# from OPCODES -FAILURE: Final[_NamedIntConstant] -SUCCESS: Final[_NamedIntConstant] -ANY: Final[_NamedIntConstant] -ANY_ALL: Final[_NamedIntConstant] -ASSERT: Final[_NamedIntConstant] -ASSERT_NOT: Final[_NamedIntConstant] -AT: Final[_NamedIntConstant] -BRANCH: Final[_NamedIntConstant] -if sys.version_info < (3, 11): - CALL: Final[_NamedIntConstant] -CATEGORY: Final[_NamedIntConstant] -CHARSET: Final[_NamedIntConstant] -BIGCHARSET: Final[_NamedIntConstant] -GROUPREF: Final[_NamedIntConstant] -GROUPREF_EXISTS: Final[_NamedIntConstant] -GROUPREF_IGNORE: Final[_NamedIntConstant] -IN: Final[_NamedIntConstant] -IN_IGNORE: Final[_NamedIntConstant] -INFO: Final[_NamedIntConstant] -JUMP: Final[_NamedIntConstant] -LITERAL: Final[_NamedIntConstant] -LITERAL_IGNORE: Final[_NamedIntConstant] -MARK: Final[_NamedIntConstant] -MAX_UNTIL: Final[_NamedIntConstant] -MIN_UNTIL: Final[_NamedIntConstant] -NOT_LITERAL: Final[_NamedIntConstant] -NOT_LITERAL_IGNORE: Final[_NamedIntConstant] -NEGATE: Final[_NamedIntConstant] -RANGE: Final[_NamedIntConstant] -REPEAT: Final[_NamedIntConstant] -REPEAT_ONE: Final[_NamedIntConstant] -SUBPATTERN: Final[_NamedIntConstant] -MIN_REPEAT_ONE: Final[_NamedIntConstant] -if sys.version_info >= (3, 11): - ATOMIC_GROUP: Final[_NamedIntConstant] - POSSESSIVE_REPEAT: Final[_NamedIntConstant] - POSSESSIVE_REPEAT_ONE: Final[_NamedIntConstant] -RANGE_UNI_IGNORE: Final[_NamedIntConstant] -GROUPREF_LOC_IGNORE: Final[_NamedIntConstant] -GROUPREF_UNI_IGNORE: Final[_NamedIntConstant] -IN_LOC_IGNORE: Final[_NamedIntConstant] -IN_UNI_IGNORE: Final[_NamedIntConstant] -LITERAL_LOC_IGNORE: Final[_NamedIntConstant] -LITERAL_UNI_IGNORE: Final[_NamedIntConstant] -NOT_LITERAL_LOC_IGNORE: Final[_NamedIntConstant] -NOT_LITERAL_UNI_IGNORE: Final[_NamedIntConstant] -MIN_REPEAT: Final[_NamedIntConstant] -MAX_REPEAT: Final[_NamedIntConstant] - -# from ATCODES -AT_BEGINNING: Final[_NamedIntConstant] -AT_BEGINNING_LINE: Final[_NamedIntConstant] -AT_BEGINNING_STRING: Final[_NamedIntConstant] -AT_BOUNDARY: Final[_NamedIntConstant] -AT_NON_BOUNDARY: Final[_NamedIntConstant] -AT_END: Final[_NamedIntConstant] -AT_END_LINE: Final[_NamedIntConstant] -AT_END_STRING: Final[_NamedIntConstant] -AT_LOC_BOUNDARY: Final[_NamedIntConstant] -AT_LOC_NON_BOUNDARY: Final[_NamedIntConstant] -AT_UNI_BOUNDARY: Final[_NamedIntConstant] -AT_UNI_NON_BOUNDARY: Final[_NamedIntConstant] - -# from CHCODES -CATEGORY_DIGIT: Final[_NamedIntConstant] -CATEGORY_NOT_DIGIT: Final[_NamedIntConstant] -CATEGORY_SPACE: Final[_NamedIntConstant] -CATEGORY_NOT_SPACE: Final[_NamedIntConstant] -CATEGORY_WORD: Final[_NamedIntConstant] -CATEGORY_NOT_WORD: Final[_NamedIntConstant] -CATEGORY_LINEBREAK: Final[_NamedIntConstant] -CATEGORY_NOT_LINEBREAK: Final[_NamedIntConstant] -CATEGORY_LOC_WORD: Final[_NamedIntConstant] -CATEGORY_LOC_NOT_WORD: Final[_NamedIntConstant] -CATEGORY_UNI_DIGIT: Final[_NamedIntConstant] -CATEGORY_UNI_NOT_DIGIT: Final[_NamedIntConstant] -CATEGORY_UNI_SPACE: Final[_NamedIntConstant] -CATEGORY_UNI_NOT_SPACE: Final[_NamedIntConstant] -CATEGORY_UNI_WORD: Final[_NamedIntConstant] -CATEGORY_UNI_NOT_WORD: Final[_NamedIntConstant] -CATEGORY_UNI_LINEBREAK: Final[_NamedIntConstant] -CATEGORY_UNI_NOT_LINEBREAK: Final[_NamedIntConstant] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_parse.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sre_parse.vpi deleted file mode 100644 index 6b873f40..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sre_parse.vpi +++ /dev/null @@ -1,102 +0,0 @@ -import sys -from collections.abc import Iterable -from re import Match, Pattern as _Pattern -from sre_constants import * -from sre_constants import _NamedIntConstant as _NIC, error as _Error -from typing import Any, Final, TypeAlias, overload - -SPECIAL_CHARS: Final = ".\\[{()*+?^$|" -REPEAT_CHARS: Final = "*+?{" -DIGITS: Final[frozenset[str]] -OCTDIGITS: Final[frozenset[str]] -HEXDIGITS: Final[frozenset[str]] -ASCIILETTERS: Final[frozenset[str]] -WHITESPACE: Final[frozenset[str]] -ESCAPES: Final[dict[str, tuple[_NIC, int]]] -CATEGORIES: Final[dict[str, tuple[_NIC, _NIC] | tuple[_NIC, list[tuple[_NIC, _NIC]]]]] -FLAGS: Final[dict[str, int]] -TYPE_FLAGS: Final[int] -GLOBAL_FLAGS: Final[int] - -if sys.version_info >= (3, 11): - MAXWIDTH: Final[int] - -if sys.version_info < (3, 11): - class Verbose(Exception): ... - -_OpSubpatternType: TypeAlias = tuple[int | None, int, int, SubPattern] -_OpGroupRefExistsType: TypeAlias = tuple[int, SubPattern, SubPattern] -_OpInType: TypeAlias = list[tuple[_NIC, int]] -_OpBranchType: TypeAlias = tuple[None, list[SubPattern]] -_AvType: TypeAlias = _OpInType | _OpBranchType | Iterable[SubPattern] | _OpGroupRefExistsType | _OpSubpatternType -_CodeType: TypeAlias = tuple[_NIC, _AvType] - -class State: - flags: int - groupdict: dict[str, int] - groupwidths: list[int | None] - lookbehindgroups: int | None - @property - def groups(self) -> int: ... - def opengroup(self, name: str | None = None) -> int: ... - def closegroup(self, gid: int, p: SubPattern) -> None: ... - def checkgroup(self, gid: int) -> bool: ... - def checklookbehindgroup(self, gid: int, source: Tokenizer) -> None: ... - -class SubPattern: - data: list[_CodeType] - width: int | None - state: State - - def __init__(self, state: State, data: list[_CodeType] | None = None) -> None: ... - def dump(self, level: int = 0) -> None: ... - def __len__(self) -> int: ... - def __delitem__(self, index: int | slice) -> None: ... - def __getitem__(self, index: int | slice) -> SubPattern | _CodeType: ... - def __setitem__(self, index: int | slice, code: _CodeType) -> None: ... - def insert(self, index: int, code: _CodeType) -> None: ... - def append(self, code: _CodeType) -> None: ... - def getwidth(self) -> tuple[int, int]: ... - -class Tokenizer: - istext: bool - string: Any - decoded_string: str - index: int - next: str | None - def __init__(self, string: Any) -> None: ... - def match(self, char: str) -> bool: ... - def get(self) -> str | None: ... - def getwhile(self, n: int, charset: Iterable[str]) -> str: ... - def getuntil(self, terminator: str, name: str) -> str: ... - @property - def pos(self) -> int: ... - def tell(self) -> int: ... - def seek(self, index: int) -> None: ... - def error(self, msg: str, offset: int = 0) -> _Error: ... - - if sys.version_info >= (3, 12): - def checkgroupname(self, name: str, offset: int) -> None: ... - elif sys.version_info >= (3, 11): - def checkgroupname(self, name: str, offset: int, nested: int) -> None: ... - -def fix_flags(src: str | bytes, flags: int) -> int: ... - -_TemplateType: TypeAlias = tuple[list[tuple[int, int]], list[str | None]] -_TemplateByteType: TypeAlias = tuple[list[tuple[int, int]], list[bytes | None]] - -if sys.version_info >= (3, 12): - @overload - def parse_template(source: str, pattern: _Pattern[Any]) -> _TemplateType: ... - @overload - def parse_template(source: bytes, pattern: _Pattern[Any]) -> _TemplateByteType: ... -else: - @overload - def parse_template(source: str, state: _Pattern[Any]) -> _TemplateType: ... - @overload - def parse_template(source: bytes, state: _Pattern[Any]) -> _TemplateByteType: ... - -def parse(str: str, flags: int = 0, state: State | None = None) -> SubPattern: ... - -if sys.version_info < (3, 12): - def expand_template(template: _TemplateType, match: Match[Any]) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/ssl.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/ssl.vpi deleted file mode 100644 index 519ed7f1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/ssl.vpi +++ /dev/null @@ -1,530 +0,0 @@ -import enum -import socket -import sys -from _ssl import ( - _DEFAULT_CIPHERS as _DEFAULT_CIPHERS, - _OPENSSL_API_VERSION as _OPENSSL_API_VERSION, - HAS_ALPN as HAS_ALPN, - HAS_ECDH as HAS_ECDH, - HAS_NPN as HAS_NPN, - HAS_SNI as HAS_SNI, - OPENSSL_VERSION as OPENSSL_VERSION, - OPENSSL_VERSION_INFO as OPENSSL_VERSION_INFO, - OPENSSL_VERSION_NUMBER as OPENSSL_VERSION_NUMBER, - HAS_SSLv2 as HAS_SSLv2, - HAS_SSLv3 as HAS_SSLv3, - HAS_TLSv1 as HAS_TLSv1, - HAS_TLSv1_1 as HAS_TLSv1_1, - HAS_TLSv1_2 as HAS_TLSv1_2, - HAS_TLSv1_3 as HAS_TLSv1_3, - MemoryBIO as MemoryBIO, - RAND_add as RAND_add, - RAND_bytes as RAND_bytes, - RAND_status as RAND_status, - SSLSession as SSLSession, - _PasswordType as _PasswordType, # typeshed only, but re-export for other type stubs to use - _SSLContext, -) -from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer -from collections.abc import Callable, Iterable -from typing import Any, Final, Literal, NamedTuple, TypeAlias, TypedDict, overload, type_check_only -from typing_extensions import Never, Self, deprecated - -if sys.version_info >= (3, 13): - from _ssl import HAS_PSK as HAS_PSK - -if sys.version_info >= (3, 15): - from _ssl import HAS_PSK_TLS13 as HAS_PSK_TLS13 - -if sys.version_info >= (3, 14): - from _ssl import HAS_PHA as HAS_PHA - -if sys.version_info < (3, 12): - from _ssl import RAND_pseudo_bytes as RAND_pseudo_bytes - -if sys.platform == "win32": - from _ssl import enum_certificates as enum_certificates, enum_crls as enum_crls - -_PCTRTT: TypeAlias = tuple[tuple[str, str], ...] -_PCTRTTT: TypeAlias = tuple[_PCTRTT, ...] -_PeerCertRetDictType: TypeAlias = dict[str, str | _PCTRTTT | _PCTRTT] -_PeerCertRetType: TypeAlias = _PeerCertRetDictType | bytes | None -_SrvnmeCbType: TypeAlias = Callable[[SSLSocket | SSLObject, str | None, SSLSocket], int | None] - -socket_error = OSError - -@type_check_only -class _Cipher(TypedDict): - aead: bool - alg_bits: int - auth: str - description: str - digest: str | None - id: int - kea: str - name: str - protocol: str - strength_bits: int - symmetric: str - -class SSLError(OSError): - library: str - reason: str - -class SSLZeroReturnError(SSLError): ... -class SSLWantReadError(SSLError): ... -class SSLWantWriteError(SSLError): ... -class SSLSyscallError(SSLError): ... -class SSLEOFError(SSLError): ... - -class SSLCertVerificationError(SSLError, ValueError): - verify_code: int - verify_message: str - -CertificateError = SSLCertVerificationError - -class DefaultVerifyPaths(NamedTuple): - cafile: str - capath: str - openssl_cafile_env: str - openssl_cafile: str - openssl_capath_env: str - openssl_capath: str - -def get_default_verify_paths() -> DefaultVerifyPaths: ... - -class VerifyMode(enum.IntEnum): - CERT_NONE = 0 - CERT_OPTIONAL = 1 - CERT_REQUIRED = 2 - -CERT_NONE: Final = VerifyMode.CERT_NONE -CERT_OPTIONAL: Final = VerifyMode.CERT_OPTIONAL -CERT_REQUIRED: Final = VerifyMode.CERT_REQUIRED - -class VerifyFlags(enum.IntFlag): - VERIFY_DEFAULT = 0x00 - VERIFY_CRL_CHECK_LEAF = 0x04 - VERIFY_CRL_CHECK_CHAIN = 0x0C - VERIFY_X509_STRICT = 0x20 - VERIFY_X509_TRUSTED_FIRST = 0x8000 - VERIFY_ALLOW_PROXY_CERTS = 0x40 - VERIFY_X509_PARTIAL_CHAIN = 0x80000 - -VERIFY_DEFAULT: Final = VerifyFlags.VERIFY_DEFAULT -VERIFY_CRL_CHECK_LEAF: Final = VerifyFlags.VERIFY_CRL_CHECK_LEAF -VERIFY_CRL_CHECK_CHAIN: Final = VerifyFlags.VERIFY_CRL_CHECK_CHAIN -VERIFY_X509_STRICT: Final = VerifyFlags.VERIFY_X509_STRICT -VERIFY_X509_TRUSTED_FIRST: Final = VerifyFlags.VERIFY_X509_TRUSTED_FIRST -VERIFY_ALLOW_PROXY_CERTS: Final = VerifyFlags.VERIFY_ALLOW_PROXY_CERTS -VERIFY_X509_PARTIAL_CHAIN: Final = VerifyFlags.VERIFY_X509_PARTIAL_CHAIN - -class _SSLMethod(enum.IntEnum): - PROTOCOL_SSLv23 = 2 - PROTOCOL_SSLv2 = ... - PROTOCOL_SSLv3 = ... - PROTOCOL_TLSv1 = 3 - PROTOCOL_TLSv1_1 = 4 - PROTOCOL_TLSv1_2 = 5 - PROTOCOL_TLS = 2 - PROTOCOL_TLS_CLIENT = 16 - PROTOCOL_TLS_SERVER = 17 - -PROTOCOL_SSLv23: Final = _SSLMethod.PROTOCOL_SSLv23 -PROTOCOL_SSLv2: Final = _SSLMethod.PROTOCOL_SSLv2 -PROTOCOL_SSLv3: Final = _SSLMethod.PROTOCOL_SSLv3 -PROTOCOL_TLSv1: Final = _SSLMethod.PROTOCOL_TLSv1 -PROTOCOL_TLSv1_1: Final = _SSLMethod.PROTOCOL_TLSv1_1 -PROTOCOL_TLSv1_2: Final = _SSLMethod.PROTOCOL_TLSv1_2 -PROTOCOL_TLS: Final = _SSLMethod.PROTOCOL_TLS -PROTOCOL_TLS_CLIENT: Final = _SSLMethod.PROTOCOL_TLS_CLIENT -PROTOCOL_TLS_SERVER: Final = _SSLMethod.PROTOCOL_TLS_SERVER - -class Options(enum.IntFlag): - OP_ALL: int - OP_NO_SSLv2 = 0 - OP_NO_SSLv3 = 33554432 - OP_NO_TLSv1 = 67108864 - OP_NO_TLSv1_1 = 268435456 - OP_NO_TLSv1_2 = 134217728 - OP_NO_TLSv1_3 = 536870912 - OP_CIPHER_SERVER_PREFERENCE = 4194304 - OP_SINGLE_DH_USE = 0 - OP_SINGLE_ECDH_USE = 0 - OP_NO_COMPRESSION = 131072 - OP_NO_TICKET = 16384 - OP_NO_RENEGOTIATION = 1073741824 - OP_ENABLE_MIDDLEBOX_COMPAT = 1048576 - if sys.version_info >= (3, 12): - OP_LEGACY_SERVER_CONNECT = 4 - OP_ENABLE_KTLS = 8 - if sys.version_info >= (3, 11) or sys.platform == "linux": - OP_IGNORE_UNEXPECTED_EOF = 128 - -OP_ALL: Final = Options.OP_ALL -OP_NO_SSLv2: Final = Options.OP_NO_SSLv2 -OP_NO_SSLv3: Final = Options.OP_NO_SSLv3 -OP_NO_TLSv1: Final = Options.OP_NO_TLSv1 -OP_NO_TLSv1_1: Final = Options.OP_NO_TLSv1_1 -OP_NO_TLSv1_2: Final = Options.OP_NO_TLSv1_2 -OP_NO_TLSv1_3: Final = Options.OP_NO_TLSv1_3 -OP_CIPHER_SERVER_PREFERENCE: Final = Options.OP_CIPHER_SERVER_PREFERENCE -OP_SINGLE_DH_USE: Final = Options.OP_SINGLE_DH_USE -OP_SINGLE_ECDH_USE: Final = Options.OP_SINGLE_ECDH_USE -OP_NO_COMPRESSION: Final = Options.OP_NO_COMPRESSION -OP_NO_TICKET: Final = Options.OP_NO_TICKET -OP_NO_RENEGOTIATION: Final = Options.OP_NO_RENEGOTIATION -OP_ENABLE_MIDDLEBOX_COMPAT: Final = Options.OP_ENABLE_MIDDLEBOX_COMPAT -if sys.version_info >= (3, 12): - OP_LEGACY_SERVER_CONNECT: Final = Options.OP_LEGACY_SERVER_CONNECT - OP_ENABLE_KTLS: Final = Options.OP_ENABLE_KTLS -if sys.version_info >= (3, 11) or sys.platform == "linux": - OP_IGNORE_UNEXPECTED_EOF: Final = Options.OP_IGNORE_UNEXPECTED_EOF - -HAS_NEVER_CHECK_COMMON_NAME: Final[bool] - -CHANNEL_BINDING_TYPES: Final[list[str]] - -class AlertDescription(enum.IntEnum): - ALERT_DESCRIPTION_ACCESS_DENIED = 49 - ALERT_DESCRIPTION_BAD_CERTIFICATE = 42 - ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE = 114 - ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE = 113 - ALERT_DESCRIPTION_BAD_RECORD_MAC = 20 - ALERT_DESCRIPTION_CERTIFICATE_EXPIRED = 45 - ALERT_DESCRIPTION_CERTIFICATE_REVOKED = 44 - ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN = 46 - ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE = 111 - ALERT_DESCRIPTION_CLOSE_NOTIFY = 0 - ALERT_DESCRIPTION_DECODE_ERROR = 50 - ALERT_DESCRIPTION_DECOMPRESSION_FAILURE = 30 - ALERT_DESCRIPTION_DECRYPT_ERROR = 51 - ALERT_DESCRIPTION_HANDSHAKE_FAILURE = 40 - ALERT_DESCRIPTION_ILLEGAL_PARAMETER = 47 - ALERT_DESCRIPTION_INSUFFICIENT_SECURITY = 71 - ALERT_DESCRIPTION_INTERNAL_ERROR = 80 - ALERT_DESCRIPTION_NO_RENEGOTIATION = 100 - ALERT_DESCRIPTION_PROTOCOL_VERSION = 70 - ALERT_DESCRIPTION_RECORD_OVERFLOW = 22 - ALERT_DESCRIPTION_UNEXPECTED_MESSAGE = 10 - ALERT_DESCRIPTION_UNKNOWN_CA = 48 - ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY = 115 - ALERT_DESCRIPTION_UNRECOGNIZED_NAME = 112 - ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE = 43 - ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION = 110 - ALERT_DESCRIPTION_USER_CANCELLED = 90 - -ALERT_DESCRIPTION_HANDSHAKE_FAILURE: Final = AlertDescription.ALERT_DESCRIPTION_HANDSHAKE_FAILURE -ALERT_DESCRIPTION_INTERNAL_ERROR: Final = AlertDescription.ALERT_DESCRIPTION_INTERNAL_ERROR -ALERT_DESCRIPTION_ACCESS_DENIED: Final = AlertDescription.ALERT_DESCRIPTION_ACCESS_DENIED -ALERT_DESCRIPTION_BAD_CERTIFICATE: Final = AlertDescription.ALERT_DESCRIPTION_BAD_CERTIFICATE -ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE: Final = AlertDescription.ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE -ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE: Final = AlertDescription.ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE -ALERT_DESCRIPTION_BAD_RECORD_MAC: Final = AlertDescription.ALERT_DESCRIPTION_BAD_RECORD_MAC -ALERT_DESCRIPTION_CERTIFICATE_EXPIRED: Final = AlertDescription.ALERT_DESCRIPTION_CERTIFICATE_EXPIRED -ALERT_DESCRIPTION_CERTIFICATE_REVOKED: Final = AlertDescription.ALERT_DESCRIPTION_CERTIFICATE_REVOKED -ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN: Final = AlertDescription.ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN -ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE: Final = AlertDescription.ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE -ALERT_DESCRIPTION_CLOSE_NOTIFY: Final = AlertDescription.ALERT_DESCRIPTION_CLOSE_NOTIFY -ALERT_DESCRIPTION_DECODE_ERROR: Final = AlertDescription.ALERT_DESCRIPTION_DECODE_ERROR -ALERT_DESCRIPTION_DECOMPRESSION_FAILURE: Final = AlertDescription.ALERT_DESCRIPTION_DECOMPRESSION_FAILURE -ALERT_DESCRIPTION_DECRYPT_ERROR: Final = AlertDescription.ALERT_DESCRIPTION_DECRYPT_ERROR -ALERT_DESCRIPTION_ILLEGAL_PARAMETER: Final = AlertDescription.ALERT_DESCRIPTION_ILLEGAL_PARAMETER -ALERT_DESCRIPTION_INSUFFICIENT_SECURITY: Final = AlertDescription.ALERT_DESCRIPTION_INSUFFICIENT_SECURITY -ALERT_DESCRIPTION_NO_RENEGOTIATION: Final = AlertDescription.ALERT_DESCRIPTION_NO_RENEGOTIATION -ALERT_DESCRIPTION_PROTOCOL_VERSION: Final = AlertDescription.ALERT_DESCRIPTION_PROTOCOL_VERSION -ALERT_DESCRIPTION_RECORD_OVERFLOW: Final = AlertDescription.ALERT_DESCRIPTION_RECORD_OVERFLOW -ALERT_DESCRIPTION_UNEXPECTED_MESSAGE: Final = AlertDescription.ALERT_DESCRIPTION_UNEXPECTED_MESSAGE -ALERT_DESCRIPTION_UNKNOWN_CA: Final = AlertDescription.ALERT_DESCRIPTION_UNKNOWN_CA -ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY: Final = AlertDescription.ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY -ALERT_DESCRIPTION_UNRECOGNIZED_NAME: Final = AlertDescription.ALERT_DESCRIPTION_UNRECOGNIZED_NAME -ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE: Final = AlertDescription.ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE -ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION: Final = AlertDescription.ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION -ALERT_DESCRIPTION_USER_CANCELLED: Final = AlertDescription.ALERT_DESCRIPTION_USER_CANCELLED - -# This class is not exposed. It calls itself ssl._ASN1Object. -@type_check_only -class _ASN1ObjectBase(NamedTuple): - nid: int - shortname: str - longname: str - oid: str - -class _ASN1Object(_ASN1ObjectBase): - def __new__(cls, oid: str) -> Self: ... - @classmethod - def fromnid(cls, nid: int) -> Self: ... - @classmethod - def fromname(cls, name: str) -> Self: ... - -class Purpose(_ASN1Object, enum.Enum): - # Normally this class would inherit __new__ from _ASN1Object, but - # because this is an enum, the inherited __new__ is replaced at runtime with - # Enum.__new__. - def __new__(cls, value: object) -> Self: ... - SERVER_AUTH = (129, "serverAuth", "TLS Web Server Authentication", "1.3.6.1.5.5.7.3.2") # viper: ignore[reportCallIssue] - CLIENT_AUTH = (130, "clientAuth", "TLS Web Client Authentication", "1.3.6.1.5.5.7.3.1") # viper: ignore[reportCallIssue] - -class SSLSocket(socket.socket): - context: SSLContext - server_side: bool - server_hostname: str | None - session: SSLSession | None - @property - def session_reused(self) -> bool | None: ... - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def connect(self, addr: socket._Address) -> None: ... - def connect_ex(self, addr: socket._Address) -> int: ... - def recv(self, buflen: int = 1024, flags: int = 0) -> bytes: ... - def recv_into(self, buffer: WriteableBuffer, nbytes: int | None = None, flags: int = 0) -> int: ... - def recvfrom(self, buflen: int = 1024, flags: int = 0) -> tuple[bytes, socket._RetAddress]: ... - def recvfrom_into( - self, buffer: WriteableBuffer, nbytes: int | None = None, flags: int = 0 - ) -> tuple[int, socket._RetAddress]: ... - def send(self, data: ReadableBuffer, flags: int = 0) -> int: ... - def sendall(self, data: ReadableBuffer, flags: int = 0) -> None: ... - - @overload - def sendto(self, data: ReadableBuffer, flags_or_addr: socket._Address, addr: None = None) -> int: ... - @overload - def sendto(self, data: ReadableBuffer, flags_or_addr: int, addr: socket._Address) -> int: ... - - def shutdown(self, how: int) -> None: ... - @deprecated("Deprecated since Python 3.6. Use `SSLSocket.recv` method instead.") - def read(self, len: int = 1024, buffer: WriteableBuffer | None = None) -> bytes: ... - @deprecated("Deprecated since Python 3.6. Use `SSLSocket.send` method instead.") - def write(self, data: ReadableBuffer) -> int: ... - def do_handshake(self, block: bool = False) -> None: ... # block is undocumented - - @overload - def getpeercert(self, binary_form: Literal[False] = False) -> _PeerCertRetDictType | None: ... - @overload - def getpeercert(self, binary_form: Literal[True]) -> bytes | None: ... - @overload - def getpeercert(self, binary_form: bool) -> _PeerCertRetType: ... - - def cipher(self) -> tuple[str, str, int] | None: ... - def shared_ciphers(self) -> list[tuple[str, str, int]] | None: ... - def compression(self) -> str | None: ... - if sys.version_info >= (3, 15): - def group(self) -> str | None: ... - def client_sigalg(self) -> str | None: ... - def server_sigalg(self) -> str | None: ... - - def get_channel_binding(self, cb_type: str = "tls-unique") -> bytes | None: ... - def selected_alpn_protocol(self) -> str | None: ... - @deprecated("Deprecated since Python 3.10. Use ALPN instead.") - def selected_npn_protocol(self) -> str | None: ... - def accept(self) -> tuple[SSLSocket, socket._RetAddress]: ... - def unwrap(self) -> socket.socket: ... - def version(self) -> str | None: ... - def pending(self) -> int: ... - def verify_client_post_handshake(self) -> None: ... - # These methods always raise `NotImplementedError`: - def recvmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override] - def recvmsg_into(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override] - def sendmsg(self, *args: Never, **kwargs: Never) -> Never: ... # type: ignore[override] - if sys.version_info >= (3, 13): - def get_verified_chain(self) -> list[bytes]: ... - def get_unverified_chain(self) -> list[bytes]: ... - -if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.7; removed in Python 3.12. Use `SSLContext.wrap_socket()` instead.") - def wrap_socket( - sock: socket.socket, - keyfile: StrOrBytesPath | None = None, - certfile: StrOrBytesPath | None = None, - server_side: bool = False, - cert_reqs: int = VerifyMode.CERT_NONE, - ssl_version: int = _SSLMethod.PROTOCOL_TLS, - ca_certs: str | None = None, - do_handshake_on_connect: bool = True, - suppress_ragged_eofs: bool = True, - ciphers: str | None = None, - ) -> SSLSocket: ... - @deprecated("Deprecated since Python 3.7; removed in Python 3.12.") - def match_hostname(cert: _PeerCertRetDictType, hostname: str) -> None: ... - -def cert_time_to_seconds(cert_time: str) -> int: ... -def DER_cert_to_PEM_cert(der_cert_bytes: ReadableBuffer) -> str: ... -def PEM_cert_to_DER_cert(pem_cert_string: str) -> bytes: ... -def get_server_certificate( - addr: tuple[str, int], ssl_version: int = _SSLMethod.PROTOCOL_TLS_CLIENT, ca_certs: str | None = None, timeout: float = ... -) -> str: ... - -class TLSVersion(enum.IntEnum): - MINIMUM_SUPPORTED = -2 - MAXIMUM_SUPPORTED = -1 - SSLv3 = 768 - TLSv1 = 769 - TLSv1_1 = 770 - TLSv1_2 = 771 - TLSv1_3 = 772 - -class SSLContext(_SSLContext): - options: Options - verify_flags: VerifyFlags - verify_mode: VerifyMode - @property - def protocol(self) -> _SSLMethod: ... # type: ignore[override] - hostname_checks_common_name: bool - maximum_version: TLSVersion - minimum_version: TLSVersion - # The following two attributes have class-level defaults. - # However, the docs explicitly state that it's OK to override these attributes on instances, - # so making these ClassVars wouldn't be appropriate - sslobject_class: type[SSLObject] - sslsocket_class: type[SSLSocket] - keylog_filename: str - post_handshake_auth: bool - security_level: int - - @overload - def __new__(cls, protocol: int, *args: Any, **kwargs: Any) -> Self: ... - @overload - @deprecated("Deprecated since Python 3.10. Use a specific version of the SSL protocol.") - def __new__(cls, protocol: None = None, *args: Any, **kwargs: Any) -> Self: ... - - def load_default_certs(self, purpose: Purpose = Purpose.SERVER_AUTH) -> None: ... - def load_verify_locations( - self, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadata: str | ReadableBuffer | None = None, - ) -> None: ... - - @overload - def get_ca_certs(self, binary_form: Literal[False] = False) -> list[_PeerCertRetDictType]: ... - @overload - def get_ca_certs(self, binary_form: Literal[True]) -> list[bytes]: ... - @overload - def get_ca_certs(self, binary_form: bool = False) -> Any: ... - - def get_ciphers(self) -> list[_Cipher]: ... - if sys.version_info >= (3, 15): - def set_ciphersuites(self, ciphersuites: str, /) -> None: ... - def get_groups(self, /, *, include_aliases: bool = False) -> list[str]: ... - def set_groups(self, grouplist: str, /) -> None: ... - def set_client_sigalgs(self, sigalgs: str, /) -> None: ... - def set_server_sigalgs(self, sigalgs: str, /) -> None: ... - - def set_default_verify_paths(self) -> None: ... - def set_ciphers(self, cipherlist: str, /) -> None: ... - def set_alpn_protocols(self, alpn_protocols: Iterable[str]) -> None: ... - @deprecated("Deprecated since Python 3.10. Use ALPN instead.") - def set_npn_protocols(self, npn_protocols: Iterable[str]) -> None: ... - def set_servername_callback(self, server_name_callback: _SrvnmeCbType | None) -> None: ... - def load_dh_params(self, path: str, /) -> None: ... - def set_ecdh_curve(self, name: str, /) -> None: ... - def wrap_socket( - self, - sock: socket.socket, - server_side: bool = False, - do_handshake_on_connect: bool = True, - suppress_ragged_eofs: bool = True, - server_hostname: str | bytes | None = None, - session: SSLSession | None = None, - ) -> SSLSocket: ... - def wrap_bio( - self, - incoming: MemoryBIO, - outgoing: MemoryBIO, - server_side: bool = False, - server_hostname: str | bytes | None = None, - session: SSLSession | None = None, - ) -> SSLObject: ... - -def create_default_context( - purpose: Purpose = Purpose.SERVER_AUTH, - *, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadata: str | ReadableBuffer | None = None, -) -> SSLContext: ... -def _create_unverified_context( - protocol: int | None = None, - *, - cert_reqs: int = VerifyMode.CERT_NONE, - check_hostname: bool = False, - purpose: Purpose = Purpose.SERVER_AUTH, - certfile: StrOrBytesPath | None = None, - keyfile: StrOrBytesPath | None = None, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadata: str | ReadableBuffer | None = None, -) -> SSLContext: ... - -_create_default_https_context = create_default_context - -class SSLObject: - context: SSLContext - @property - def server_side(self) -> bool: ... - @property - def server_hostname(self) -> str | None: ... - session: SSLSession | None - @property - def session_reused(self) -> bool: ... - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def read(self, len: int = 1024, buffer: WriteableBuffer | None = None) -> bytes: ... - def write(self, data: ReadableBuffer) -> int: ... - - @overload - def getpeercert(self, binary_form: Literal[False] = False) -> _PeerCertRetDictType | None: ... - @overload - def getpeercert(self, binary_form: Literal[True]) -> bytes | None: ... - @overload - def getpeercert(self, binary_form: bool) -> _PeerCertRetType: ... - - def selected_alpn_protocol(self) -> str | None: ... - @deprecated("Deprecated since Python 3.10. Use ALPN instead.") - def selected_npn_protocol(self) -> str | None: ... - def cipher(self) -> tuple[str, str, int] | None: ... - def shared_ciphers(self) -> list[tuple[str, str, int]] | None: ... - def compression(self) -> str | None: ... - if sys.version_info >= (3, 15): - def group(self) -> str | None: ... - def client_sigalg(self) -> str | None: ... - def server_sigalg(self) -> str | None: ... - - def pending(self) -> int: ... - def do_handshake(self) -> None: ... - def unwrap(self) -> None: ... - def version(self) -> str | None: ... - def get_channel_binding(self, cb_type: str = "tls-unique") -> bytes | None: ... - def verify_client_post_handshake(self) -> None: ... - if sys.version_info >= (3, 13): - def get_verified_chain(self) -> list[bytes]: ... - def get_unverified_chain(self) -> list[bytes]: ... - -class SSLErrorNumber(enum.IntEnum): - SSL_ERROR_EOF = 8 - SSL_ERROR_INVALID_ERROR_CODE = 10 - SSL_ERROR_SSL = 1 - SSL_ERROR_SYSCALL = 5 - SSL_ERROR_WANT_CONNECT = 7 - SSL_ERROR_WANT_READ = 2 - SSL_ERROR_WANT_WRITE = 3 - SSL_ERROR_WANT_X509_LOOKUP = 4 - SSL_ERROR_ZERO_RETURN = 6 - -SSL_ERROR_EOF: Final = SSLErrorNumber.SSL_ERROR_EOF # undocumented -SSL_ERROR_INVALID_ERROR_CODE: Final = SSLErrorNumber.SSL_ERROR_INVALID_ERROR_CODE # undocumented -SSL_ERROR_SSL: Final = SSLErrorNumber.SSL_ERROR_SSL # undocumented -SSL_ERROR_SYSCALL: Final = SSLErrorNumber.SSL_ERROR_SYSCALL # undocumented -SSL_ERROR_WANT_CONNECT: Final = SSLErrorNumber.SSL_ERROR_WANT_CONNECT # undocumented -SSL_ERROR_WANT_READ: Final = SSLErrorNumber.SSL_ERROR_WANT_READ # undocumented -SSL_ERROR_WANT_WRITE: Final = SSLErrorNumber.SSL_ERROR_WANT_WRITE # undocumented -SSL_ERROR_WANT_X509_LOOKUP: Final = SSLErrorNumber.SSL_ERROR_WANT_X509_LOOKUP # undocumented -SSL_ERROR_ZERO_RETURN: Final = SSLErrorNumber.SSL_ERROR_ZERO_RETURN # undocumented - -def get_protocol_name(protocol_code: int) -> str: ... - -if sys.version_info >= (3, 15): - def get_sigalgs() -> list[str]: ... - -PEM_FOOTER: Final[str] -PEM_HEADER: Final[str] -SOCK_STREAM: Final = socket.SOCK_STREAM -SOL_SOCKET: Final = socket.SOL_SOCKET -SO_TYPE: Final = socket.SO_TYPE diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/stat.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/stat.vpi deleted file mode 100644 index 155d765d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/stat.vpi +++ /dev/null @@ -1,126 +0,0 @@ -import sys -from _stat import ( - S_ENFMT as S_ENFMT, - S_IEXEC as S_IEXEC, - S_IFBLK as S_IFBLK, - S_IFCHR as S_IFCHR, - S_IFDIR as S_IFDIR, - S_IFDOOR as S_IFDOOR, - S_IFIFO as S_IFIFO, - S_IFLNK as S_IFLNK, - S_IFMT as S_IFMT, - S_IFPORT as S_IFPORT, - S_IFREG as S_IFREG, - S_IFSOCK as S_IFSOCK, - S_IFWHT as S_IFWHT, - S_IMODE as S_IMODE, - S_IREAD as S_IREAD, - S_IRGRP as S_IRGRP, - S_IROTH as S_IROTH, - S_IRUSR as S_IRUSR, - S_IRWXG as S_IRWXG, - S_IRWXO as S_IRWXO, - S_IRWXU as S_IRWXU, - S_ISBLK as S_ISBLK, - S_ISCHR as S_ISCHR, - S_ISDIR as S_ISDIR, - S_ISDOOR as S_ISDOOR, - S_ISFIFO as S_ISFIFO, - S_ISGID as S_ISGID, - S_ISLNK as S_ISLNK, - S_ISPORT as S_ISPORT, - S_ISREG as S_ISREG, - S_ISSOCK as S_ISSOCK, - S_ISUID as S_ISUID, - S_ISVTX as S_ISVTX, - S_ISWHT as S_ISWHT, - S_IWGRP as S_IWGRP, - S_IWOTH as S_IWOTH, - S_IWRITE as S_IWRITE, - S_IWUSR as S_IWUSR, - S_IXGRP as S_IXGRP, - S_IXOTH as S_IXOTH, - S_IXUSR as S_IXUSR, - SF_APPEND as SF_APPEND, - SF_ARCHIVED as SF_ARCHIVED, - SF_IMMUTABLE as SF_IMMUTABLE, - SF_NOUNLINK as SF_NOUNLINK, - SF_SNAPSHOT as SF_SNAPSHOT, - ST_ATIME as ST_ATIME, - ST_CTIME as ST_CTIME, - ST_DEV as ST_DEV, - ST_GID as ST_GID, - ST_INO as ST_INO, - ST_MODE as ST_MODE, - ST_MTIME as ST_MTIME, - ST_NLINK as ST_NLINK, - ST_SIZE as ST_SIZE, - ST_UID as ST_UID, - UF_APPEND as UF_APPEND, - UF_COMPRESSED as UF_COMPRESSED, - UF_HIDDEN as UF_HIDDEN, - UF_IMMUTABLE as UF_IMMUTABLE, - UF_NODUMP as UF_NODUMP, - UF_NOUNLINK as UF_NOUNLINK, - UF_OPAQUE as UF_OPAQUE, - filemode as filemode, -) -from typing import Final - -if sys.platform == "win32": - from _stat import ( - IO_REPARSE_TAG_APPEXECLINK as IO_REPARSE_TAG_APPEXECLINK, - IO_REPARSE_TAG_MOUNT_POINT as IO_REPARSE_TAG_MOUNT_POINT, - IO_REPARSE_TAG_SYMLINK as IO_REPARSE_TAG_SYMLINK, - ) - -if sys.version_info >= (3, 13): - from _stat import ( - SF_DATALESS as SF_DATALESS, - SF_FIRMLINK as SF_FIRMLINK, - SF_SETTABLE as SF_SETTABLE, - UF_DATAVAULT as UF_DATAVAULT, - UF_SETTABLE as UF_SETTABLE, - UF_TRACKED as UF_TRACKED, - ) - - if sys.platform == "darwin": - from _stat import SF_SUPPORTED as SF_SUPPORTED, SF_SYNTHETIC as SF_SYNTHETIC - -# _stat.c defines FILE_ATTRIBUTE_* constants conditionally, -# making them available only at runtime on Windows. -# stat.py unconditionally redefines the same FILE_ATTRIBUTE_* constants -# on all platforms. -FILE_ATTRIBUTE_ARCHIVE: Final = 32 -FILE_ATTRIBUTE_COMPRESSED: Final = 2048 -FILE_ATTRIBUTE_DEVICE: Final = 64 -FILE_ATTRIBUTE_DIRECTORY: Final = 16 -FILE_ATTRIBUTE_ENCRYPTED: Final = 16384 -FILE_ATTRIBUTE_HIDDEN: Final = 2 -FILE_ATTRIBUTE_INTEGRITY_STREAM: Final = 32768 -FILE_ATTRIBUTE_NORMAL: Final = 128 -FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: Final = 8192 -FILE_ATTRIBUTE_NO_SCRUB_DATA: Final = 131072 -FILE_ATTRIBUTE_OFFLINE: Final = 4096 -FILE_ATTRIBUTE_READONLY: Final = 1 -FILE_ATTRIBUTE_REPARSE_POINT: Final = 1024 -FILE_ATTRIBUTE_SPARSE_FILE: Final = 512 -FILE_ATTRIBUTE_SYSTEM: Final = 4 -FILE_ATTRIBUTE_TEMPORARY: Final = 256 -FILE_ATTRIBUTE_VIRTUAL: Final = 65536 - -if sys.version_info >= (3, 13): - # https://github.com/python/cpython/issues/114081#issuecomment-2119017790 - SF_RESTRICTED: Final = 0x00080000 - -if sys.version_info >= (3, 15): - STATX_ATTR_COMPRESSED: Final = 0x00000004 - STATX_ATTR_IMMUTABLE: Final = 0x00000010 - STATX_ATTR_APPEND: Final = 0x00000020 - STATX_ATTR_NODUMP: Final = 0x00000040 - STATX_ATTR_ENCRYPTED: Final = 0x00000800 - STATX_ATTR_AUTOMOUNT: Final = 0x00001000 - STATX_ATTR_MOUNT_ROOT: Final = 0x00002000 - STATX_ATTR_VERITY: Final = 0x00100000 - STATX_ATTR_DAX: Final = 0x00200000 - STATX_ATTR_WRITE_ATOMIC: Final = 0x00400000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/statistics.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/statistics.vpi deleted file mode 100644 index 8cae237f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/statistics.vpi +++ /dev/null @@ -1,161 +0,0 @@ -import sys -from _typeshed import SupportsRichComparisonT -from collections.abc import Callable, Hashable, Iterable, Sequence, Sized -from decimal import Decimal -from fractions import Fraction -from typing import Literal, NamedTuple, Protocol, SupportsFloat, SupportsIndex, TypeAlias, TypeVar, type_check_only -from typing_extensions import Self - -__all__ = [ - "StatisticsError", - "covariance", - "correlation", - "fmean", - "geometric_mean", - "linear_regression", - "mean", - "harmonic_mean", - "pstdev", - "pvariance", - "stdev", - "variance", - "median", - "median_low", - "median_high", - "median_grouped", - "mode", - "multimode", - "NormalDist", - "quantiles", -] - -if sys.version_info >= (3, 13): - __all__ += ["kde", "kde_random"] - -# Most functions in this module accept homogeneous collections of one of these types -_Number: TypeAlias = float | Decimal | Fraction -_NumberT = TypeVar("_NumberT", float, Decimal, Fraction) - -# Used in mode, multimode -_HashableT = TypeVar("_HashableT", bound=Hashable) - -# Used in NormalDist.samples and kde_random -_Seed: TypeAlias = int | float | str | bytes | bytearray # noqa: Y041 - -# Used in linear_regression -_T_co = TypeVar("_T_co", covariant=True) - -@type_check_only -class _SizedIterable(Iterable[_T_co], Sized, Protocol[_T_co]): ... - -class StatisticsError(ValueError): ... - -if sys.version_info >= (3, 11): - def fmean(data: Iterable[SupportsFloat], weights: Iterable[SupportsFloat] | None = None) -> float: ... - -else: - def fmean(data: Iterable[SupportsFloat]) -> float: ... - -def geometric_mean(data: Iterable[SupportsFloat]) -> float: ... -def mean(data: Iterable[_NumberT]) -> _NumberT: ... -def harmonic_mean(data: Iterable[_NumberT], weights: Iterable[_Number] | None = None) -> _NumberT: ... -def median(data: Iterable[_NumberT]) -> _NumberT: ... -def median_low(data: Iterable[SupportsRichComparisonT]) -> SupportsRichComparisonT: ... -def median_high(data: Iterable[SupportsRichComparisonT]) -> SupportsRichComparisonT: ... - -if sys.version_info >= (3, 11): - def median_grouped(data: Iterable[SupportsFloat], interval: SupportsFloat = 1.0) -> float: ... - -else: - def median_grouped(data: Iterable[_NumberT], interval: _NumberT | float = 1) -> _NumberT | float: ... - -def mode(data: Iterable[_HashableT]) -> _HashableT: ... -def multimode(data: Iterable[_HashableT]) -> list[_HashableT]: ... -def pstdev(data: Iterable[_NumberT], mu: _NumberT | None = None) -> _NumberT: ... -def pvariance(data: Iterable[_NumberT], mu: _NumberT | None = None) -> _NumberT: ... -def quantiles( - data: Iterable[_NumberT], *, n: int = 4, method: Literal["inclusive", "exclusive"] = "exclusive" -) -> list[_NumberT]: ... -def stdev(data: Iterable[_NumberT], xbar: _NumberT | None = None) -> _NumberT: ... -def variance(data: Iterable[_NumberT], xbar: _NumberT | None = None) -> _NumberT: ... - -class NormalDist: - __slots__ = {"_mu": "Arithmetic mean of a normal distribution", "_sigma": "Standard deviation of a normal distribution"} - def __init__(self, mu: float = 0.0, sigma: float = 1.0) -> None: ... - @property - def mean(self) -> float: ... - @property - def median(self) -> float: ... - @property - def mode(self) -> float: ... - @property - def stdev(self) -> float: ... - @property - def variance(self) -> float: ... - @classmethod - def from_samples(cls, data: Iterable[SupportsFloat]) -> Self: ... - def samples(self, n: SupportsIndex, *, seed: _Seed | None = None) -> list[float]: ... - def pdf(self, x: float) -> float: ... - def cdf(self, x: float) -> float: ... - def inv_cdf(self, p: float) -> float: ... - def overlap(self, other: NormalDist) -> float: ... - def quantiles(self, n: int = 4) -> list[float]: ... - def zscore(self, x: float) -> float: ... - def __eq__(x1, x2: object) -> bool: ... - def __add__(x1, x2: float | NormalDist) -> NormalDist: ... - def __sub__(x1, x2: float | NormalDist) -> NormalDist: ... - def __mul__(x1, x2: float) -> NormalDist: ... - def __truediv__(x1, x2: float) -> NormalDist: ... - def __pos__(x1) -> NormalDist: ... - def __neg__(x1) -> NormalDist: ... - __radd__ = __add__ - def __rsub__(x1, x2: float | NormalDist) -> NormalDist: ... - __rmul__ = __mul__ - def __hash__(self) -> int: ... - -if sys.version_info >= (3, 12): - def correlation( - x: Sequence[_Number], y: Sequence[_Number], /, *, method: Literal["linear", "ranked"] = "linear" - ) -> float: ... - -else: - def correlation(x: Sequence[_Number], y: Sequence[_Number], /) -> float: ... - -def covariance(x: Sequence[_Number], y: Sequence[_Number], /) -> float: ... - -class LinearRegression(NamedTuple): - slope: float - intercept: float - -if sys.version_info >= (3, 11): - def linear_regression( - regressor: _SizedIterable[_Number], dependent_variable: _SizedIterable[_Number], /, *, proportional: bool = False - ) -> LinearRegression: ... - -else: - def linear_regression( - regressor: _SizedIterable[_Number], dependent_variable: _SizedIterable[_Number], / - ) -> LinearRegression: ... - -if sys.version_info >= (3, 13): - _Kernel: TypeAlias = Literal[ - "normal", - "gauss", - "logistic", - "sigmoid", - "rectangular", - "uniform", - "triangular", - "parabolic", - "epanechnikov", - "quartic", - "biweight", - "triweight", - "cosine", - ] - def kde( - data: Sequence[float], h: float, kernel: _Kernel = "normal", *, cumulative: bool = False - ) -> Callable[[float], float]: ... - def kde_random( - data: Sequence[float], h: float, kernel: _Kernel = "normal", *, seed: _Seed | None = None - ) -> Callable[[], float]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/stringprep.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/stringprep.vpi deleted file mode 100644 index d67955e4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/stringprep.vpi +++ /dev/null @@ -1,29 +0,0 @@ -from typing import Final - -b1_set: Final[set[int]] -b3_exceptions: Final[dict[int, str]] -c22_specials: Final[set[int]] -c6_set: Final[set[int]] -c7_set: Final[set[int]] -c8_set: Final[set[int]] -c9_set: Final[set[int]] - -def in_table_a1(code: str) -> bool: ... -def in_table_b1(code: str) -> bool: ... -def map_table_b3(code: str) -> str: ... -def map_table_b2(a: str) -> str: ... -def in_table_c11(code: str) -> bool: ... -def in_table_c12(code: str) -> bool: ... -def in_table_c11_c12(code: str) -> bool: ... -def in_table_c21(code: str) -> bool: ... -def in_table_c22(code: str) -> bool: ... -def in_table_c21_c22(code: str) -> bool: ... -def in_table_c3(code: str) -> bool: ... -def in_table_c4(code: str) -> bool: ... -def in_table_c5(code: str) -> bool: ... -def in_table_c6(code: str) -> bool: ... -def in_table_c7(code: str) -> bool: ... -def in_table_c8(code: str) -> bool: ... -def in_table_c9(code: str) -> bool: ... -def in_table_d1(code: str) -> bool: ... -def in_table_d2(code: str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/struct.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/struct.vpi deleted file mode 100644 index 2c269087..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/struct.vpi +++ /dev/null @@ -1,5 +0,0 @@ -from _struct import * - -__all__ = ["calcsize", "pack", "pack_into", "unpack", "unpack_from", "iter_unpack", "Struct", "error"] - -class error(Exception): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sunau.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sunau.vpi deleted file mode 100644 index 1f18c041..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sunau.vpi +++ /dev/null @@ -1,82 +0,0 @@ -from _typeshed import Unused -from typing import IO, Any, Final, Literal, NamedTuple, NoReturn, TypeAlias, overload -from typing_extensions import Self - -_File: TypeAlias = str | IO[bytes] - -class Error(Exception): ... - -AUDIO_FILE_MAGIC: Final = 0x2E736E64 -AUDIO_FILE_ENCODING_MULAW_8: Final = 1 -AUDIO_FILE_ENCODING_LINEAR_8: Final = 2 -AUDIO_FILE_ENCODING_LINEAR_16: Final = 3 -AUDIO_FILE_ENCODING_LINEAR_24: Final = 4 -AUDIO_FILE_ENCODING_LINEAR_32: Final = 5 -AUDIO_FILE_ENCODING_FLOAT: Final = 6 -AUDIO_FILE_ENCODING_DOUBLE: Final = 7 -AUDIO_FILE_ENCODING_ADPCM_G721: Final = 23 -AUDIO_FILE_ENCODING_ADPCM_G722: Final = 24 -AUDIO_FILE_ENCODING_ADPCM_G723_3: Final = 25 -AUDIO_FILE_ENCODING_ADPCM_G723_5: Final = 26 -AUDIO_FILE_ENCODING_ALAW_8: Final = 27 -AUDIO_UNKNOWN_SIZE: Final = 0xFFFFFFFF - -class _sunau_params(NamedTuple): - nchannels: int - sampwidth: int - framerate: int - nframes: int - comptype: str - compname: str - -class Au_read: - def __init__(self, f: _File) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def __del__(self) -> None: ... - def getfp(self) -> IO[bytes] | None: ... - def rewind(self) -> None: ... - def close(self) -> None: ... - def tell(self) -> int: ... - def getnchannels(self) -> int: ... - def getnframes(self) -> int: ... - def getsampwidth(self) -> int: ... - def getframerate(self) -> int: ... - def getcomptype(self) -> str: ... - def getcompname(self) -> str: ... - def getparams(self) -> _sunau_params: ... - def getmarkers(self) -> None: ... - def getmark(self, id: Any) -> NoReturn: ... - def setpos(self, pos: int) -> None: ... - def readframes(self, nframes: int) -> bytes | None: ... - -class Au_write: - def __init__(self, f: _File) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def __del__(self) -> None: ... - def setnchannels(self, nchannels: int) -> None: ... - def getnchannels(self) -> int: ... - def setsampwidth(self, sampwidth: int) -> None: ... - def getsampwidth(self) -> int: ... - def setframerate(self, framerate: float) -> None: ... - def getframerate(self) -> int: ... - def setnframes(self, nframes: int) -> None: ... - def getnframes(self) -> int: ... - def setcomptype(self, type: str, name: str) -> None: ... - def getcomptype(self) -> str: ... - def getcompname(self) -> str: ... - def setparams(self, params: _sunau_params) -> None: ... - def getparams(self) -> _sunau_params: ... - def tell(self) -> int: ... - # should be any bytes-like object after 3.4, but we don't have a type for that - def writeframesraw(self, data: bytes) -> None: ... - def writeframes(self, data: bytes) -> None: ... - def close(self) -> None: ... - -@overload -def open(f: _File, mode: Literal["r", "rb"]) -> Au_read: ... -@overload -def open(f: _File, mode: Literal["w", "wb"]) -> Au_write: ... -@overload -def open(f: _File, mode: str | None = None) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/symtable.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/symtable.vpi deleted file mode 100644 index d41ef841..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/symtable.vpi +++ /dev/null @@ -1,95 +0,0 @@ -import sys -from _collections_abc import dict_keys -from collections.abc import Sequence -from typing import Any -from typing_extensions import deprecated - -__all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"] - -if sys.version_info >= (3, 13): - __all__ += ["SymbolTableType"] - -if sys.version_info >= (3, 15): - def symtable(code: str, filename: str, compile_type: str, *, module: str | None = None) -> SymbolTable: ... - -else: - def symtable(code: str, filename: str, compile_type: str) -> SymbolTable: ... - -if sys.version_info >= (3, 13): - from enum import StrEnum - - class SymbolTableType(StrEnum): - MODULE = "module" - FUNCTION = "function" - CLASS = "class" - ANNOTATION = "annotation" - TYPE_ALIAS = "type alias" - TYPE_PARAMETERS = "type parameters" - TYPE_VARIABLE = "type variable" - -class SymbolTable: - def __init__(self, raw_table: Any, filename: str) -> None: ... - if sys.version_info >= (3, 13): - def get_type(self) -> SymbolTableType: ... - else: - def get_type(self) -> str: ... - - def get_id(self) -> int: ... - def get_name(self) -> str: ... - def get_lineno(self) -> int: ... - def is_optimized(self) -> bool: ... - def is_nested(self) -> bool: ... - def has_children(self) -> bool: ... - def get_identifiers(self) -> dict_keys[str, int]: ... - def lookup(self, name: str) -> Symbol: ... - def get_symbols(self) -> list[Symbol]: ... - def get_children(self) -> list[SymbolTable]: ... - -class Function(SymbolTable): - def get_parameters(self) -> tuple[str, ...]: ... - def get_locals(self) -> tuple[str, ...]: ... - def get_globals(self) -> tuple[str, ...]: ... - def get_frees(self) -> tuple[str, ...]: ... - if sys.version_info >= (3, 15): - def get_cells(self) -> tuple[str, ...]: ... - - def get_nonlocals(self) -> tuple[str, ...]: ... - -class Class(SymbolTable): - @deprecated("Deprecated since Python 3.14; will be removed in Python 3.16.") - def get_methods(self) -> tuple[str, ...]: ... - -class Symbol: - def __init__( - self, name: str, flags: int, namespaces: Sequence[SymbolTable] | None = None, *, module_scope: bool = False - ) -> None: ... - def is_nonlocal(self) -> bool: ... - def get_name(self) -> str: ... - def is_referenced(self) -> bool: ... - def is_parameter(self) -> bool: ... - if sys.version_info >= (3, 14): - def is_type_parameter(self) -> bool: ... - - def is_global(self) -> bool: ... - def is_declared_global(self) -> bool: ... - def is_local(self) -> bool: ... - def is_annotated(self) -> bool: ... - def is_free(self) -> bool: ... - if sys.version_info >= (3, 14): - def is_free_class(self) -> bool: ... - - def is_imported(self) -> bool: ... - def is_assigned(self) -> bool: ... - if sys.version_info >= (3, 14): - def is_comp_iter(self) -> bool: ... - def is_comp_cell(self) -> bool: ... - if sys.version_info >= (3, 15): - def is_cell(self) -> bool: ... - - def is_namespace(self) -> bool: ... - def get_namespaces(self) -> Sequence[SymbolTable]: ... - def get_namespace(self) -> SymbolTable: ... - -class SymbolTableFactory: - def new(self, table: Any, filename: str) -> SymbolTable: ... - def __call__(self, table: Any, filename: str) -> SymbolTable: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/sysconfig.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/sysconfig.vpi deleted file mode 100644 index cfa3fbac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/sysconfig.vpi +++ /dev/null @@ -1,59 +0,0 @@ -import sys -from typing import IO, Any, Literal, overload -from typing_extensions import LiteralString, deprecated - -__all__ = [ - "get_config_h_filename", - "get_config_var", - "get_config_vars", - "get_makefile_filename", - "get_path", - "get_path_names", - "get_paths", - "get_platform", - "get_python_version", - "get_scheme_names", - "parse_config_h", -] - -@overload -@deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11") -def get_config_var(name: Literal["SO"]) -> Any: ... -@overload -def get_config_var(name: str) -> Any: ... - -@overload -def get_config_vars() -> dict[str, Any]: ... -@overload -def get_config_vars(arg: str, /, *args: str) -> list[Any]: ... - -def get_scheme_names() -> tuple[str, ...]: ... -def get_default_scheme() -> LiteralString: ... -def get_preferred_scheme(key: Literal["prefix", "home", "user"]) -> LiteralString: ... - -# Documented -- see https://docs.python.org/3/library/sysconfig.html#sysconfig._get_preferred_schemes -def _get_preferred_schemes() -> dict[Literal["prefix", "home", "user"], LiteralString]: ... -def get_path_names() -> tuple[str, ...]: ... -def get_path(name: str, scheme: str = ..., vars: dict[str, Any] | None = None, expand: bool = True) -> str: ... -def get_paths(scheme: str = ..., vars: dict[str, Any] | None = None, expand: bool = True) -> dict[str, str]: ... -def get_python_version() -> str: ... -def get_platform() -> str: ... - -if sys.version_info >= (3, 15): - def is_python_build() -> bool: ... -elif sys.version_info >= (3, 11): - @overload - def is_python_build() -> bool: ... - @overload - @deprecated("The `check_home` parameter is deprecated since Python 3.12; removed in Python 3.15.") - def is_python_build(check_home: object = None) -> bool: ... -else: - @overload - def is_python_build() -> bool: ... - @overload - @deprecated("The `check_home` parameter is deprecated since Python 3.12; removed in Python 3.15.") - def is_python_build(check_home: bool = False) -> bool: ... - -def parse_config_h(fp: IO[Any], vars: dict[str, Any] | None = None) -> dict[str, Any]: ... -def get_config_h_filename() -> str: ... -def get_makefile_filename() -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/syslog.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/syslog.vpi deleted file mode 100644 index 0cb97dcd..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/syslog.vpi +++ /dev/null @@ -1,58 +0,0 @@ -import sys -from typing import Final, overload - -if sys.platform != "win32": - LOG_ALERT: Final = 1 - LOG_AUTH: Final = 32 - LOG_AUTHPRIV: Final = 80 - LOG_CONS: Final = 2 - LOG_CRIT: Final = 2 - LOG_CRON: Final = 72 - LOG_DAEMON: Final = 24 - LOG_DEBUG: Final = 7 - LOG_EMERG: Final = 0 - LOG_ERR: Final = 3 - LOG_INFO: Final = 6 - LOG_KERN: Final = 0 - LOG_LOCAL0: Final = 128 - LOG_LOCAL1: Final = 136 - LOG_LOCAL2: Final = 144 - LOG_LOCAL3: Final = 152 - LOG_LOCAL4: Final = 160 - LOG_LOCAL5: Final = 168 - LOG_LOCAL6: Final = 176 - LOG_LOCAL7: Final = 184 - LOG_LPR: Final = 48 - LOG_MAIL: Final = 16 - LOG_NDELAY: Final = 8 - LOG_NEWS: Final = 56 - LOG_NOTICE: Final = 5 - LOG_NOWAIT: Final = 16 - LOG_ODELAY: Final = 4 - LOG_PERROR: Final = 32 - LOG_PID: Final = 1 - LOG_SYSLOG: Final = 40 - LOG_USER: Final = 8 - LOG_UUCP: Final = 64 - LOG_WARNING: Final = 4 - - if sys.version_info >= (3, 13): - LOG_FTP: Final = 88 - - if sys.platform == "darwin": - LOG_INSTALL: Final = 112 - LOG_LAUNCHD: Final = 192 - LOG_NETINFO: Final = 96 - LOG_RAS: Final = 120 - LOG_REMOTEAUTH: Final = 104 - - def LOG_MASK(pri: int, /) -> int: ... - def LOG_UPTO(pri: int, /) -> int: ... - def closelog() -> None: ... - def openlog(ident: str = ..., logoption: int = 0, facility: int = ...) -> None: ... - def setlogmask(maskpri: int, /) -> int: ... - - @overload - def syslog(priority: int, message: str) -> None: ... - @overload - def syslog(message: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tabnanny.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tabnanny.vpi deleted file mode 100644 index 8a8592f4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tabnanny.vpi +++ /dev/null @@ -1,16 +0,0 @@ -from _typeshed import StrOrBytesPath -from collections.abc import Iterable - -__all__ = ["check", "NannyNag", "process_tokens"] - -verbose: int -filename_only: int - -class NannyNag(Exception): - def __init__(self, lineno: int, msg: str, line: str) -> None: ... - def get_lineno(self) -> int: ... - def get_msg(self) -> str: ... - def get_line(self) -> str: ... - -def check(file: StrOrBytesPath) -> None: ... -def process_tokens(tokens: Iterable[tuple[int, str, tuple[int, int], tuple[int, int], str]]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tarfile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tarfile.vpi deleted file mode 100644 index 6c55683f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tarfile.vpi +++ /dev/null @@ -1,864 +0,0 @@ -import bz2 -import io -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, StrPath, SupportsRead, WriteableBuffer -from builtins import list as _list # aliases to avoid name clashes with fields named "type" or "list" -from collections.abc import Callable, Iterable, Iterator, Mapping -from gzip import _ReadableFileobj as _GzipReadableFileobj, _WritableFileobj as _GzipWritableFileobj -from types import TracebackType -from typing import IO, ClassVar, Final, Literal, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self, deprecated - -if sys.version_info >= (3, 14): - from compression.zstd import ZstdDict - -__all__ = [ - "TarFile", - "TarInfo", - "is_tarfile", - "TarError", - "ReadError", - "CompressionError", - "StreamError", - "ExtractError", - "HeaderError", - "ENCODING", - "USTAR_FORMAT", - "GNU_FORMAT", - "PAX_FORMAT", - "DEFAULT_FORMAT", - "open", -] -if sys.version_info >= (3, 12): - __all__ += [ - "fully_trusted_filter", - "data_filter", - "tar_filter", - "FilterError", - "AbsoluteLinkError", - "OutsideDestinationError", - "SpecialFileError", - "AbsolutePathError", - "LinkOutsideDestinationError", - ] -if sys.version_info >= (3, 13): - __all__ += ["LinkFallbackError"] - -_FilterFunction: TypeAlias = Callable[[TarInfo, str], TarInfo | None] -_TarfileFilter: TypeAlias = Literal["fully_trusted", "tar", "data"] | _FilterFunction - -@type_check_only -class _Fileobj(Protocol): - def read(self, size: int, /) -> bytes: ... - def write(self, b: bytes, /) -> object: ... - def tell(self) -> int: ... - def seek(self, pos: int, /) -> object: ... - def close(self) -> object: ... - # Optional fields: - # name: str | bytes - # mode: Literal["rb", "r+b", "wb", "xb"] - -@type_check_only -class _Bz2ReadableFileobj(bz2._ReadableFileobj): - def close(self) -> object: ... - -@type_check_only -class _Bz2WritableFileobj(bz2._WritableFileobj): - def close(self) -> object: ... - -# tar constants -NUL: Final = b"\0" -BLOCKSIZE: Final = 512 -RECORDSIZE: Final = 10240 -GNU_MAGIC: Final = b"ustar \0" -POSIX_MAGIC: Final = b"ustar\x0000" - -LENGTH_NAME: Final = 100 -LENGTH_LINK: Final = 100 -LENGTH_PREFIX: Final = 155 - -REGTYPE: Final = b"0" -AREGTYPE: Final = b"\0" -LNKTYPE: Final = b"1" -SYMTYPE: Final = b"2" -CHRTYPE: Final = b"3" -BLKTYPE: Final = b"4" -DIRTYPE: Final = b"5" -FIFOTYPE: Final = b"6" -CONTTYPE: Final = b"7" - -GNUTYPE_LONGNAME: Final = b"L" -GNUTYPE_LONGLINK: Final = b"K" -GNUTYPE_SPARSE: Final = b"S" - -XHDTYPE: Final = b"x" -XGLTYPE: Final = b"g" -SOLARIS_XHDTYPE: Final = b"X" - -_TarFormat: TypeAlias = Literal[0, 1, 2] # does not exist at runtime -USTAR_FORMAT: Final = 0 -GNU_FORMAT: Final = 1 -PAX_FORMAT: Final = 2 -DEFAULT_FORMAT: Final = PAX_FORMAT - -# tarfile constants - -SUPPORTED_TYPES: Final[tuple[bytes, ...]] -REGULAR_TYPES: Final[tuple[bytes, ...]] -GNU_TYPES: Final[tuple[bytes, ...]] -PAX_FIELDS: Final[tuple[str, ...]] -PAX_NUMBER_FIELDS: Final[dict[str, type]] -PAX_NAME_FIELDS: Final[set[str]] - -ENCODING: Final[str] - -class ExFileObject(io.BufferedReader): # undocumented - def __init__(self, tarfile: TarFile, tarinfo: TarInfo) -> None: ... - -class TarFile: - OPEN_METH: ClassVar[Mapping[str, str]] - name: StrOrBytesPath | None - mode: Literal["r", "a", "w", "x"] - fileobj: _Fileobj - format: _TarFormat - tarinfo: type[TarInfo] - dereference: bool - ignore_zeros: bool - encoding: str - errors: str - fileobject: type[ExFileObject] # undocumented - pax_headers: Mapping[str, str] - debug: Literal[0, 1, 2, 3] - errorlevel: Literal[0, 1, 2] - offset: int # undocumented - extraction_filter: _FilterFunction | None - if sys.version_info >= (3, 13): - stream: bool - if sys.version_info >= (3, 15): - def __init__( - self, - name: StrOrBytesPath | None = None, - mode: Literal["r", "a", "w", "x"] = "r", - fileobj: _Fileobj | None = None, - format: int | None = None, - tarinfo: type[TarInfo] | None = None, - dereference: bool | None = None, - ignore_zeros: bool | None = None, - encoding: str | None = None, - errors: str = "surrogateescape", - pax_headers: Mapping[str, str] | None = None, - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - copybufsize: int | None = None, # undocumented - stream: bool = False, - mtime: float | None = None, - ) -> None: ... - elif sys.version_info >= (3, 13): - def __init__( - self, - name: StrOrBytesPath | None = None, - mode: Literal["r", "a", "w", "x"] = "r", - fileobj: _Fileobj | None = None, - format: int | None = None, - tarinfo: type[TarInfo] | None = None, - dereference: bool | None = None, - ignore_zeros: bool | None = None, - encoding: str | None = None, - errors: str = "surrogateescape", - pax_headers: Mapping[str, str] | None = None, - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - copybufsize: int | None = None, # undocumented - stream: bool = False, - ) -> None: ... - else: - def __init__( - self, - name: StrOrBytesPath | None = None, - mode: Literal["r", "a", "w", "x"] = "r", - fileobj: _Fileobj | None = None, - format: int | None = None, - tarinfo: type[TarInfo] | None = None, - dereference: bool | None = None, - ignore_zeros: bool | None = None, - encoding: str | None = None, - errors: str = "surrogateescape", - pax_headers: Mapping[str, str] | None = None, - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - copybufsize: int | None = None, # undocumented - ) -> None: ... - - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def __iter__(self) -> Iterator[TarInfo]: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None = None, - mode: Literal["r", "r:*", "r:", "r:gz", "r:bz2", "r:xz"] = "r", - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - - if sys.version_info >= (3, 14): - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None, - mode: Literal["r:zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - level: None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> Self: ... - - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None, - mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None = None, - *, - mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None, - mode: Literal["x:gz", "x:bz2", "w:gz", "w:bz2"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - compresslevel: int = 9, - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None = None, - *, - mode: Literal["x:gz", "x:bz2", "w:gz", "w:bz2"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - compresslevel: int = 9, - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None, - mode: Literal["x:xz", "w:xz"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - preset: Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | None = ..., - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None = None, - *, - mode: Literal["x:xz", "w:xz"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - preset: Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | None = ..., - ) -> Self: ... - if sys.version_info >= (3, 14): - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None, - mode: Literal["x:zst", "w:zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | None = None, - *, - mode: Literal["x:zst", "w:zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - ) -> Self: ... - - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | ReadableBuffer | None, - mode: Literal["r|*", "r|", "r|gz", "r|bz2", "r|xz", "r|zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | ReadableBuffer | None = None, - *, - mode: Literal["r|*", "r|", "r|gz", "r|bz2", "r|xz", "r|zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | WriteableBuffer | None, - mode: Literal["w|", "w|xz", "w|zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | WriteableBuffer | None = None, - *, - mode: Literal["w|", "w|xz", "w|zst"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | WriteableBuffer | None, - mode: Literal["w|gz", "w|bz2"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - compresslevel: int = 9, - ) -> Self: ... - @overload - @classmethod - def open( - cls, - name: StrOrBytesPath | WriteableBuffer | None = None, - *, - mode: Literal["w|gz", "w|bz2"], - fileobj: _Fileobj | None = None, - bufsize: int = 10240, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - errors: str = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - compresslevel: int = 9, - ) -> Self: ... - - @classmethod - def taropen( - cls, - name: StrOrBytesPath | None, - mode: Literal["r", "a", "w", "x"] = "r", - fileobj: _Fileobj | None = None, - *, - compresslevel: int = ..., - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - - @overload - @classmethod - def gzopen( - cls, - name: StrOrBytesPath | None, - mode: Literal["r"] = "r", - fileobj: _GzipReadableFileobj | None = None, - compresslevel: int = 9, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def gzopen( - cls, - name: StrOrBytesPath | None, - mode: Literal["w", "x"], - fileobj: _GzipWritableFileobj | None = None, - compresslevel: int = 9, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - - @overload - @classmethod - def bz2open( - cls, - name: StrOrBytesPath | None, - mode: Literal["w", "x"], - fileobj: _Bz2WritableFileobj | None = None, - compresslevel: int = 9, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def bz2open( - cls, - name: StrOrBytesPath | None, - mode: Literal["r"] = "r", - fileobj: _Bz2ReadableFileobj | None = None, - compresslevel: int = 9, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - - @classmethod - def xzopen( - cls, - name: StrOrBytesPath | None, - mode: Literal["r", "w", "x"] = "r", - fileobj: IO[bytes] | None = None, - preset: int | None = None, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - if sys.version_info >= (3, 14): - @overload - @classmethod - def zstopen( - cls, - name: StrOrBytesPath | None, - mode: Literal["r"] = "r", - fileobj: IO[bytes] | None = None, - level: None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - @overload - @classmethod - def zstopen( - cls, - name: StrOrBytesPath | None, - mode: Literal["w", "x"], - fileobj: IO[bytes] | None = None, - level: int | None = None, - options: Mapping[int, int] | None = None, - zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, - *, - format: int | None = ..., - tarinfo: type[TarInfo] | None = ..., - dereference: bool | None = ..., - ignore_zeros: bool | None = ..., - encoding: str | None = ..., - pax_headers: Mapping[str, str] | None = ..., - debug: Literal[0, 1, 2, 3] | None = None, # default 0 - errorlevel: Literal[0, 1, 2] | None = None, # default 1 - ) -> Self: ... - - def getmember(self, name: str) -> TarInfo: ... - def getmembers(self) -> _list[TarInfo]: ... - def getnames(self) -> _list[str]: ... - def list(self, verbose: bool = True, *, members: Iterable[TarInfo] | None = None) -> None: ... - def next(self) -> TarInfo | None: ... - # Calling this method without `filter` is deprecated, but it may be set either on the class or in an - # individual call, so we can't mark it as @deprecated here. - def extractall( - self, - path: StrOrBytesPath = ".", - members: Iterable[TarInfo] | None = None, - *, - numeric_owner: bool = False, - filter: _TarfileFilter | None = None, - ) -> None: ... - # Same situation as for `extractall`. - def extract( - self, - member: str | TarInfo, - path: StrOrBytesPath = "", - set_attrs: bool = True, - *, - numeric_owner: bool = False, - filter: _TarfileFilter | None = None, - ) -> None: ... - def _extract_member( - self, - tarinfo: TarInfo, - targetpath: str, - set_attrs: bool = True, - numeric_owner: bool = False, - *, - filter_function: _FilterFunction | None = None, - extraction_root: str | None = None, - ) -> None: ... # undocumented - def extractfile(self, member: str | TarInfo) -> IO[bytes] | None: ... - def makedir(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makefile(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makeunknown(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makefifo(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makedev(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makelink(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def makelink_with_filter( - self, tarinfo: TarInfo, targetpath: StrOrBytesPath, filter_function: _FilterFunction, extraction_root: str - ) -> None: ... # undocumented - def chown(self, tarinfo: TarInfo, targetpath: StrOrBytesPath, numeric_owner: bool) -> None: ... # undocumented - def chmod(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def utime(self, tarinfo: TarInfo, targetpath: StrOrBytesPath) -> None: ... # undocumented - def add( - self, - name: StrPath, - arcname: StrPath | None = None, - recursive: bool = True, - *, - filter: Callable[[TarInfo], TarInfo | None] | None = None, - ) -> None: ... - def addfile(self, tarinfo: TarInfo, fileobj: SupportsRead[bytes] | None = None) -> None: ... - def gettarinfo( - self, name: StrOrBytesPath | None = None, arcname: str | None = None, fileobj: IO[bytes] | None = None - ) -> TarInfo: ... - def close(self) -> None: ... - -open = TarFile.open - -def is_tarfile(name: StrOrBytesPath | IO[bytes]) -> bool: ... - -class TarError(Exception): ... -class ReadError(TarError): ... -class CompressionError(TarError): ... -class StreamError(TarError): ... -class ExtractError(TarError): ... -class HeaderError(TarError): ... - -class FilterError(TarError): - # This attribute is only set directly on the subclasses, but the documentation guarantees - # that it is always present on FilterError. - tarinfo: TarInfo - -class AbsolutePathError(FilterError): - def __init__(self, tarinfo: TarInfo) -> None: ... - -class OutsideDestinationError(FilterError): - def __init__(self, tarinfo: TarInfo, path: str) -> None: ... - -class SpecialFileError(FilterError): - def __init__(self, tarinfo: TarInfo) -> None: ... - -class AbsoluteLinkError(FilterError): - def __init__(self, tarinfo: TarInfo) -> None: ... - -class LinkOutsideDestinationError(FilterError): - def __init__(self, tarinfo: TarInfo, path: str) -> None: ... - -class LinkFallbackError(FilterError): - def __init__(self, tarinfo: TarInfo, path: str) -> None: ... - -def fully_trusted_filter(member: TarInfo, dest_path: str) -> TarInfo: ... -def tar_filter(member: TarInfo, dest_path: str) -> TarInfo: ... -def data_filter(member: TarInfo, dest_path: str) -> TarInfo: ... - -class TarInfo: - __slots__ = ( - "name", - "mode", - "uid", - "gid", - "size", - "mtime", - "chksum", - "type", - "linkname", - "uname", - "gname", - "devmajor", - "devminor", - "offset", - "offset_data", - "pax_headers", - "sparse", - "_tarfile", - "_sparse_structs", - "_link_target", - ) - name: str - path: str - size: int - mtime: int | float - chksum: int - devmajor: int - devminor: int - offset: int - offset_data: int - sparse: bytes | None - mode: int - type: bytes # usually one of the TYPE constants, but could be an arbitrary byte - linkname: str - uid: int - gid: int - uname: str - gname: str - pax_headers: Mapping[str, str] - def __init__(self, name: str = "") -> None: ... - - @property - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.16.") - def tarfile(self) -> TarFile | None: ... - @tarfile.setter - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.16.") - def tarfile(self, tarfile: TarFile | None) -> None: ... - - @classmethod - def frombuf(cls, buf: bytes | bytearray, encoding: str, errors: str) -> Self: ... - @classmethod - def fromtarfile(cls, tarfile: TarFile) -> Self: ... - - @property - def linkpath(self) -> str: ... - @linkpath.setter - def linkpath(self, linkname: str) -> None: ... - - def replace( - self, - *, - name: str = ..., - mtime: float = ..., - mode: int = ..., - linkname: str = ..., - uid: int = ..., - gid: int = ..., - uname: str = ..., - gname: str = ..., - deep: bool = True, - ) -> Self: ... - def get_info(self) -> Mapping[str, str | int | bytes | Mapping[str, str]]: ... - def tobuf(self, format: _TarFormat | None = 2, encoding: str | None = "utf-8", errors: str = "surrogateescape") -> bytes: ... - def create_ustar_header( - self, info: Mapping[str, str | int | bytes | Mapping[str, str]], encoding: str, errors: str - ) -> bytes: ... - def create_gnu_header( - self, info: Mapping[str, str | int | bytes | Mapping[str, str]], encoding: str, errors: str - ) -> bytes: ... - def create_pax_header(self, info: Mapping[str, str | int | bytes | Mapping[str, str]], encoding: str) -> bytes: ... - @classmethod - def create_pax_global_header(cls, pax_headers: Mapping[str, str]) -> bytes: ... - def isfile(self) -> bool: ... - def isreg(self) -> bool: ... - def issparse(self) -> bool: ... - def isdir(self) -> bool: ... - def issym(self) -> bool: ... - def islnk(self) -> bool: ... - def ischr(self) -> bool: ... - def isblk(self) -> bool: ... - def isfifo(self) -> bool: ... - def isdev(self) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/telnetlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/telnetlib.vpi deleted file mode 100644 index 88aa43d2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/telnetlib.vpi +++ /dev/null @@ -1,123 +0,0 @@ -import socket -from collections.abc import Callable, MutableSequence, Sequence -from re import Match, Pattern -from types import TracebackType -from typing import Any, Final -from typing_extensions import Self - -__all__ = ["Telnet"] - -DEBUGLEVEL: Final = 0 -TELNET_PORT: Final = 23 - -IAC: Final = b"\xff" -DONT: Final = b"\xfe" -DO: Final = b"\xfd" -WONT: Final = b"\xfc" -WILL: Final = b"\xfb" -theNULL: Final = b"\x00" - -SE: Final = b"\xf0" -NOP: Final = b"\xf1" -DM: Final = b"\xf2" -BRK: Final = b"\xf3" -IP: Final = b"\xf4" -AO: Final = b"\xf5" -AYT: Final = b"\xf6" -EC: Final = b"\xf7" -EL: Final = b"\xf8" -GA: Final = b"\xf9" -SB: Final = b"\xfa" - -BINARY: Final = b"\x00" -ECHO: Final = b"\x01" -RCP: Final = b"\x02" -SGA: Final = b"\x03" -NAMS: Final = b"\x04" -STATUS: Final = b"\x05" -TM: Final = b"\x06" -RCTE: Final = b"\x07" -NAOL: Final = b"\x08" -NAOP: Final = b"\t" -NAOCRD: Final = b"\n" -NAOHTS: Final = b"\x0b" -NAOHTD: Final = b"\x0c" -NAOFFD: Final = b"\r" -NAOVTS: Final = b"\x0e" -NAOVTD: Final = b"\x0f" -NAOLFD: Final = b"\x10" -XASCII: Final = b"\x11" -LOGOUT: Final = b"\x12" -BM: Final = b"\x13" -DET: Final = b"\x14" -SUPDUP: Final = b"\x15" -SUPDUPOUTPUT: Final = b"\x16" -SNDLOC: Final = b"\x17" -TTYPE: Final = b"\x18" -EOR: Final = b"\x19" -TUID: Final = b"\x1a" -OUTMRK: Final = b"\x1b" -TTYLOC: Final = b"\x1c" -VT3270REGIME: Final = b"\x1d" -X3PAD: Final = b"\x1e" -NAWS: Final = b"\x1f" -TSPEED: Final = b" " -LFLOW: Final = b"!" -LINEMODE: Final = b'"' -XDISPLOC: Final = b"#" -OLD_ENVIRON: Final = b"$" -AUTHENTICATION: Final = b"%" -ENCRYPT: Final = b"&" -NEW_ENVIRON: Final = b"'" - -TN3270E: Final = b"(" -XAUTH: Final = b")" -CHARSET: Final = b"*" -RSP: Final = b"+" -COM_PORT_OPTION: Final = b"," -SUPPRESS_LOCAL_ECHO: Final = b"-" -TLS: Final = b"." -KERMIT: Final = b"/" -SEND_URL: Final = b"0" -FORWARD_X: Final = b"1" -PRAGMA_LOGON: Final = b"\x8a" -SSPI_LOGON: Final = b"\x8b" -PRAGMA_HEARTBEAT: Final = b"\x8c" -EXOPL: Final = b"\xff" -NOOPT: Final = b"\x00" - -class Telnet: - host: str | None # undocumented - sock: socket.socket | None # undocumented - def __init__(self, host: str | None = None, port: int = 0, timeout: float = ...) -> None: ... - def open(self, host: str, port: int = 0, timeout: float = ...) -> None: ... - def msg(self, msg: str, *args: Any) -> None: ... - def set_debuglevel(self, debuglevel: int) -> None: ... - def close(self) -> None: ... - def get_socket(self) -> socket.socket: ... - def fileno(self) -> int: ... - def write(self, buffer: bytes) -> None: ... - def read_until(self, match: bytes, timeout: float | None = None) -> bytes: ... - def read_all(self) -> bytes: ... - def read_some(self) -> bytes: ... - def read_very_eager(self) -> bytes: ... - def read_eager(self) -> bytes: ... - def read_lazy(self) -> bytes: ... - def read_very_lazy(self) -> bytes: ... - def read_sb_data(self) -> bytes: ... - def set_option_negotiation_callback(self, callback: Callable[[socket.socket, bytes, bytes], object] | None) -> None: ... - def process_rawq(self) -> None: ... - def rawq_getchar(self) -> bytes: ... - def fill_rawq(self) -> None: ... - def sock_avail(self) -> bool: ... - def interact(self) -> None: ... - def mt_interact(self) -> None: ... - def listener(self) -> None: ... - def expect( - self, list: MutableSequence[Pattern[bytes] | bytes] | Sequence[Pattern[bytes]], timeout: float | None = None - ) -> tuple[int, Match[bytes] | None, bytes]: ... - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def __del__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tempfile.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tempfile.vpi deleted file mode 100644 index 1df04a3d..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tempfile.vpi +++ /dev/null @@ -1,474 +0,0 @@ -import io -import sys -from _typeshed import ( - BytesPath, - GenericPath, - OpenBinaryMode, - OpenBinaryModeReading, - OpenBinaryModeUpdating, - OpenBinaryModeWriting, - OpenTextMode, - ReadableBuffer, - StrPath, - WriteableBuffer, -) -from collections.abc import Iterable, Iterator -from types import GenericAlias, TracebackType -from typing import IO, Any, AnyStr, Final, Generic, Literal, overload -from typing_extensions import Self, deprecated - -__all__ = [ - "NamedTemporaryFile", - "TemporaryFile", - "SpooledTemporaryFile", - "TemporaryDirectory", - "mkstemp", - "mkdtemp", - "mktemp", - "TMP_MAX", - "gettempprefix", - "tempdir", - "gettempdir", - "gettempprefixb", - "gettempdirb", -] - -# global variables -TMP_MAX: Final[int] -tempdir: str | None -template: str - -if sys.version_info >= (3, 12): - @overload - def NamedTemporaryFile( - mode: OpenTextMode, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - delete_on_close: bool = True, - ) -> _TemporaryFileWrapper[str]: ... - @overload - def NamedTemporaryFile( - mode: OpenBinaryMode = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - delete_on_close: bool = True, - ) -> _TemporaryFileWrapper[bytes]: ... - @overload - def NamedTemporaryFile( - mode: str = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - delete_on_close: bool = True, - ) -> _TemporaryFileWrapper[Any]: ... -else: - @overload - def NamedTemporaryFile( - mode: OpenTextMode, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - ) -> _TemporaryFileWrapper[str]: ... - @overload - def NamedTemporaryFile( - mode: OpenBinaryMode = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - ) -> _TemporaryFileWrapper[bytes]: ... - @overload - def NamedTemporaryFile( - mode: str = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - delete: bool = True, - *, - errors: str | None = None, - ) -> _TemporaryFileWrapper[Any]: ... - -if sys.platform == "win32": - TemporaryFile = NamedTemporaryFile -else: - # See the comments for builtins.open() for an explanation of the overloads. - @overload - def TemporaryFile( - mode: OpenTextMode, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> io.TextIOWrapper: ... - @overload - def TemporaryFile( - mode: OpenBinaryMode, - buffering: Literal[0], - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> io.FileIO: ... - @overload - def TemporaryFile( - *, - buffering: Literal[0], - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - errors: str | None = None, - ) -> io.FileIO: ... - @overload - def TemporaryFile( - mode: OpenBinaryModeWriting, - buffering: Literal[-1, 1] = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> io.BufferedWriter: ... - @overload - def TemporaryFile( - mode: OpenBinaryModeReading, - buffering: Literal[-1, 1] = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> io.BufferedReader: ... - @overload - def TemporaryFile( - mode: OpenBinaryModeUpdating = "w+b", - buffering: Literal[-1, 1] = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> io.BufferedRandom: ... - @overload - def TemporaryFile( - mode: str = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: AnyStr | None = None, - prefix: AnyStr | None = None, - dir: GenericPath[AnyStr] | None = None, - *, - errors: str | None = None, - ) -> IO[Any]: ... - -class _TemporaryFileWrapper(IO[AnyStr]): - file: IO[AnyStr] # io.TextIOWrapper, io.BufferedReader or io.BufferedWriter - name: str - delete: bool - if sys.version_info >= (3, 12): - def __init__(self, file: IO[AnyStr], name: str, delete: bool = True, delete_on_close: bool = True) -> None: ... - else: - def __init__(self, file: IO[AnyStr], name: str, delete: bool = True) -> None: ... - - def __enter__(self) -> Self: ... - def __exit__(self, exc: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def close(self) -> None: ... - # These methods don't exist directly on this object, but - # are delegated to the underlying IO object through __getattr__. - # We need to add them here so that this class is concrete. - def __iter__(self) -> Iterator[AnyStr]: ... - # FIXME: __next__ doesn't actually exist on this class and should be removed: - # see also https://github.com/python/typeshed/pull/5456#discussion_r633068648 - # >>> import tempfile - # >>> ntf=tempfile.NamedTemporaryFile() - # >>> next(ntf) - # Traceback (most recent call last): - # File "", line 1, in - # TypeError: '_TemporaryFileWrapper' object is not an iterator - def __next__(self) -> AnyStr: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - def read(self, n: int = ...) -> AnyStr: ... - def readable(self) -> bool: ... - def readline(self, limit: int = ...) -> AnyStr: ... - def readlines(self, hint: int = ...) -> list[AnyStr]: ... - def seek(self, offset: int, whence: int = ...) -> int: ... - def seekable(self) -> bool: ... - def tell(self) -> int: ... - def truncate(self, size: int | None = ...) -> int: ... - def writable(self) -> bool: ... - - @overload - def write(self: _TemporaryFileWrapper[str], s: str, /) -> int: ... - @overload - def write(self: _TemporaryFileWrapper[bytes], s: ReadableBuffer, /) -> int: ... - @overload - def write(self, s: AnyStr, /) -> int: ... - - @overload - def writelines(self: _TemporaryFileWrapper[str], lines: Iterable[str]) -> None: ... - @overload - def writelines(self: _TemporaryFileWrapper[bytes], lines: Iterable[ReadableBuffer]) -> None: ... - @overload - def writelines(self, lines: Iterable[AnyStr]) -> None: ... - - @property - def closed(self) -> bool: ... - -if sys.version_info >= (3, 11): - _SpooledTemporaryFileBase = io.IOBase -else: - _SpooledTemporaryFileBase = object - -# It does not actually derive from IO[AnyStr], but it does mostly behave -# like one. -class SpooledTemporaryFile(IO[AnyStr], _SpooledTemporaryFileBase): - _file: IO[AnyStr] - @property - def encoding(self) -> str: ... # undocumented - @property - def newlines(self) -> str | tuple[str, ...] | None: ... # undocumented - - # bytes needs to go first, as default mode is to open as bytes - @overload - def __init__( - self: SpooledTemporaryFile[bytes], - max_size: int = 0, - mode: OpenBinaryMode = "w+b", - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: str | None = None, - prefix: str | None = None, - dir: str | None = None, - *, - errors: str | None = None, - ) -> None: ... - @overload - def __init__( - self: SpooledTemporaryFile[str], - max_size: int, - mode: OpenTextMode, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: str | None = None, - prefix: str | None = None, - dir: str | None = None, - *, - errors: str | None = None, - ) -> None: ... - @overload - def __init__( - self: SpooledTemporaryFile[str], - max_size: int = 0, - *, - mode: OpenTextMode, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: str | None = None, - prefix: str | None = None, - dir: str | None = None, - errors: str | None = None, - ) -> None: ... - @overload - def __init__( - self, - max_size: int, - mode: str, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: str | None = None, - prefix: str | None = None, - dir: str | None = None, - *, - errors: str | None = None, - ) -> None: ... - @overload - def __init__( - self, - max_size: int = 0, - *, - mode: str, - buffering: int = -1, - encoding: str | None = None, - newline: str | None = None, - suffix: str | None = None, - prefix: str | None = None, - dir: str | None = None, - errors: str | None = None, - ) -> None: ... - - @property - def errors(self) -> str | None: ... - def rollover(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, exc: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> None: ... - # These methods are copied from the abstract methods of IO, because - # SpooledTemporaryFile implements IO. - # See also https://github.com/python/typeshed/pull/2452#issuecomment-420657918. - def close(self) -> None: ... - def fileno(self) -> int: ... - def flush(self) -> None: ... - def isatty(self) -> bool: ... - if sys.version_info >= (3, 11): - # These three work only if the SpooledTemporaryFile is opened in binary mode, - # because the underlying object in text mode does not have these methods. - def read1(self, size: int = ..., /) -> AnyStr: ... - def readinto(self, b: WriteableBuffer) -> int: ... - def readinto1(self, b: WriteableBuffer) -> int: ... - def detach(self) -> io.RawIOBase: ... - - def read(self, n: int = ..., /) -> AnyStr: ... - def readline(self, limit: int | None = ..., /) -> AnyStr: ... # type: ignore[override] - def readlines(self, hint: int = ..., /) -> list[AnyStr]: ... # type: ignore[override] - def seek(self, offset: int, whence: int = ...) -> int: ... - def tell(self) -> int: ... - if sys.version_info >= (3, 11): - def truncate(self, size: int | None = None) -> int: ... - else: - def truncate(self, size: int | None = None) -> None: ... # type: ignore[override] - - @overload - def write(self: SpooledTemporaryFile[str], s: str) -> int: ... - @overload - def write(self: SpooledTemporaryFile[bytes], s: ReadableBuffer) -> int: ... - @overload - def write(self, s: AnyStr) -> int: ... - - @overload # type: ignore[override] - def writelines(self: SpooledTemporaryFile[str], iterable: Iterable[str]) -> None: ... - @overload - def writelines(self: SpooledTemporaryFile[bytes], iterable: Iterable[ReadableBuffer]) -> None: ... - @overload - def writelines(self, iterable: Iterable[AnyStr]) -> None: ... - - def __iter__(self) -> Iterator[AnyStr]: ... # type: ignore[override] - # These exist at runtime only on 3.11+. - def readable(self) -> bool: ... - def seekable(self) -> bool: ... - def writable(self) -> bool: ... - def __next__(self) -> AnyStr: ... # type: ignore[override] - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class TemporaryDirectory(Generic[AnyStr]): - name: AnyStr - if sys.version_info >= (3, 12): - @overload - def __init__( - self: TemporaryDirectory[str], - suffix: str | None = None, - prefix: str | None = None, - dir: StrPath | None = None, - ignore_cleanup_errors: bool = False, - *, - delete: bool = True, - ) -> None: ... - @overload - def __init__( - self: TemporaryDirectory[bytes], - suffix: bytes | None = None, - prefix: bytes | None = None, - dir: BytesPath | None = None, - ignore_cleanup_errors: bool = False, - *, - delete: bool = True, - ) -> None: ... - else: - @overload - def __init__( - self: TemporaryDirectory[str], - suffix: str | None = None, - prefix: str | None = None, - dir: StrPath | None = None, - ignore_cleanup_errors: bool = False, - ) -> None: ... - @overload - def __init__( - self: TemporaryDirectory[bytes], - suffix: bytes | None = None, - prefix: bytes | None = None, - dir: BytesPath | None = None, - ignore_cleanup_errors: bool = False, - ) -> None: ... - - def cleanup(self) -> None: ... - def __enter__(self) -> AnyStr: ... - def __exit__(self, exc: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -# The overloads overlap, but they should still work fine. -@overload -def mkstemp( - suffix: str | None = None, prefix: str | None = None, dir: StrPath | None = None, text: bool = False -) -> tuple[int, str]: ... -@overload -def mkstemp( - suffix: bytes | None = None, prefix: bytes | None = None, dir: BytesPath | None = None, text: bool = False -) -> tuple[int, bytes]: ... - -# The overloads overlap, but they should still work fine. -@overload -def mkdtemp(suffix: str | None = None, prefix: str | None = None, dir: StrPath | None = None) -> str: ... -@overload -def mkdtemp(suffix: bytes | None = None, prefix: bytes | None = None, dir: BytesPath | None = None) -> bytes: ... - -@deprecated("Deprecated since Python 2.3. Use `mkstemp()` or `NamedTemporaryFile(delete=False)` instead.") -def mktemp(suffix: str = "", prefix: str = "tmp", dir: StrPath | None = None) -> str: ... -def gettempdirb() -> bytes: ... -def gettempprefixb() -> bytes: ... -def gettempdir() -> str: ... -def gettempprefix() -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/termios.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/termios.vpi deleted file mode 100644 index 971c9ad4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/termios.vpi +++ /dev/null @@ -1,303 +0,0 @@ -import sys -from _typeshed import FileDescriptorLike -from typing import Any, Final, TypeAlias - -# Must be a list of length 7, containing 6 ints and a list of NCCS 1-character bytes or ints. -_Attr: TypeAlias = list[int | list[bytes | int]] | list[int | list[bytes]] | list[int | list[int]] -# Same as _Attr for return types; we use Any to avoid a union. -_AttrReturn: TypeAlias = list[Any] - -if sys.platform != "win32": - # Values depends on the platform - B0: Final[int] - B110: Final[int] - B115200: Final[int] - B1200: Final[int] - B134: Final[int] - B150: Final[int] - B1800: Final[int] - B19200: Final[int] - B200: Final[int] - B230400: Final[int] - B2400: Final[int] - B300: Final[int] - B38400: Final[int] - B4800: Final[int] - B50: Final[int] - B57600: Final[int] - B600: Final[int] - B75: Final[int] - B9600: Final[int] - BRKINT: Final[int] - BS0: Final[int] - BS1: Final[int] - BSDLY: Final[int] - CDSUSP: Final[int] - CEOF: Final[int] - CEOL: Final[int] - CEOT: Final[int] - CERASE: Final[int] - CFLUSH: Final[int] - CINTR: Final[int] - CKILL: Final[int] - CLNEXT: Final[int] - CLOCAL: Final[int] - CQUIT: Final[int] - CR0: Final[int] - CR1: Final[int] - CR2: Final[int] - CR3: Final[int] - CRDLY: Final[int] - CREAD: Final[int] - CRPRNT: Final[int] - CRTSCTS: Final[int] - CS5: Final[int] - CS6: Final[int] - CS7: Final[int] - CS8: Final[int] - CSIZE: Final[int] - CSTART: Final[int] - CSTOP: Final[int] - CSTOPB: Final[int] - CSUSP: Final[int] - CWERASE: Final[int] - ECHO: Final[int] - ECHOCTL: Final[int] - ECHOE: Final[int] - ECHOK: Final[int] - ECHOKE: Final[int] - ECHONL: Final[int] - ECHOPRT: Final[int] - EXTA: Final[int] - EXTB: Final[int] - FF0: Final[int] - FF1: Final[int] - FFDLY: Final[int] - FIOASYNC: Final[int] - FIOCLEX: Final[int] - FIONBIO: Final[int] - FIONCLEX: Final[int] - FIONREAD: Final[int] - FLUSHO: Final[int] - HUPCL: Final[int] - ICANON: Final[int] - ICRNL: Final[int] - IEXTEN: Final[int] - IGNBRK: Final[int] - IGNCR: Final[int] - IGNPAR: Final[int] - IMAXBEL: Final[int] - INLCR: Final[int] - INPCK: Final[int] - ISIG: Final[int] - ISTRIP: Final[int] - IXANY: Final[int] - IXOFF: Final[int] - IXON: Final[int] - NCCS: Final[int] - NL0: Final[int] - NL1: Final[int] - NLDLY: Final[int] - NOFLSH: Final[int] - OCRNL: Final[int] - OFDEL: Final[int] - OFILL: Final[int] - ONLCR: Final[int] - ONLRET: Final[int] - ONOCR: Final[int] - OPOST: Final[int] - PARENB: Final[int] - PARMRK: Final[int] - PARODD: Final[int] - PENDIN: Final[int] - TAB0: Final[int] - TAB1: Final[int] - TAB2: Final[int] - TAB3: Final[int] - TABDLY: Final[int] - TCIFLUSH: Final[int] - TCIOFF: Final[int] - TCIOFLUSH: Final[int] - TCION: Final[int] - TCOFLUSH: Final[int] - TCOOFF: Final[int] - TCOON: Final[int] - TCSADRAIN: Final[int] - TCSAFLUSH: Final[int] - TCSANOW: Final[int] - TIOCCONS: Final[int] - TIOCEXCL: Final[int] - TIOCGETD: Final[int] - TIOCGPGRP: Final[int] - TIOCGWINSZ: Final[int] - TIOCM_CAR: Final[int] - TIOCM_CD: Final[int] - TIOCM_CTS: Final[int] - TIOCM_DSR: Final[int] - TIOCM_DTR: Final[int] - TIOCM_LE: Final[int] - TIOCM_RI: Final[int] - TIOCM_RNG: Final[int] - TIOCM_RTS: Final[int] - TIOCM_SR: Final[int] - TIOCM_ST: Final[int] - TIOCMBIC: Final[int] - TIOCMBIS: Final[int] - TIOCMGET: Final[int] - TIOCMSET: Final[int] - TIOCNOTTY: Final[int] - TIOCNXCL: Final[int] - TIOCOUTQ: Final[int] - TIOCPKT_DATA: Final[int] - TIOCPKT_DOSTOP: Final[int] - TIOCPKT_FLUSHREAD: Final[int] - TIOCPKT_FLUSHWRITE: Final[int] - TIOCPKT_NOSTOP: Final[int] - TIOCPKT_START: Final[int] - TIOCPKT_STOP: Final[int] - TIOCPKT: Final[int] - TIOCSCTTY: Final[int] - TIOCSETD: Final[int] - TIOCSPGRP: Final[int] - TIOCSTI: Final[int] - TIOCSWINSZ: Final[int] - TOSTOP: Final[int] - VDISCARD: Final[int] - VEOF: Final[int] - VEOL: Final[int] - VEOL2: Final[int] - VERASE: Final[int] - VINTR: Final[int] - VKILL: Final[int] - VLNEXT: Final[int] - VMIN: Final[int] - VQUIT: Final[int] - VREPRINT: Final[int] - VSTART: Final[int] - VSTOP: Final[int] - VSUSP: Final[int] - VT0: Final[int] - VT1: Final[int] - VTDLY: Final[int] - VTIME: Final[int] - VWERASE: Final[int] - - if sys.version_info >= (3, 13): - EXTPROC: Final[int] - IUTF8: Final[int] - - if sys.platform == "darwin" and sys.version_info >= (3, 13): - ALTWERASE: Final[int] - B14400: Final[int] - B28800: Final[int] - B7200: Final[int] - B76800: Final[int] - CCAR_OFLOW: Final[int] - CCTS_OFLOW: Final[int] - CDSR_OFLOW: Final[int] - CDTR_IFLOW: Final[int] - CIGNORE: Final[int] - CRTS_IFLOW: Final[int] - MDMBUF: Final[int] - NL2: Final[int] - NL3: Final[int] - NOKERNINFO: Final[int] - ONOEOT: Final[int] - OXTABS: Final[int] - VDSUSP: Final[int] - VSTATUS: Final[int] - - if sys.platform == "darwin" and sys.version_info >= (3, 11): - TIOCGSIZE: Final[int] - TIOCSSIZE: Final[int] - - if sys.platform == "linux": - B1152000: Final[int] - B576000: Final[int] - CBAUD: Final[int] - CBAUDEX: Final[int] - CIBAUD: Final[int] - IOCSIZE_MASK: Final[int] - IOCSIZE_SHIFT: Final[int] - IUCLC: Final[int] - N_MOUSE: Final[int] - N_PPP: Final[int] - N_SLIP: Final[int] - N_STRIP: Final[int] - N_TTY: Final[int] - NCC: Final[int] - OLCUC: Final[int] - TCFLSH: Final[int] - TCGETA: Final[int] - TCGETS: Final[int] - TCSBRK: Final[int] - TCSBRKP: Final[int] - TCSETA: Final[int] - TCSETAF: Final[int] - TCSETAW: Final[int] - TCSETS: Final[int] - TCSETSF: Final[int] - TCSETSW: Final[int] - TCXONC: Final[int] - TIOCGICOUNT: Final[int] - TIOCGLCKTRMIOS: Final[int] - TIOCGSERIAL: Final[int] - TIOCGSOFTCAR: Final[int] - TIOCINQ: Final[int] - TIOCLINUX: Final[int] - TIOCMIWAIT: Final[int] - TIOCTTYGSTRUCT: Final[int] - TIOCSER_TEMT: Final[int] - TIOCSERCONFIG: Final[int] - TIOCSERGETLSR: Final[int] - TIOCSERGETMULTI: Final[int] - TIOCSERGSTRUCT: Final[int] - TIOCSERGWILD: Final[int] - TIOCSERSETMULTI: Final[int] - TIOCSERSWILD: Final[int] - TIOCSLCKTRMIOS: Final[int] - TIOCSSERIAL: Final[int] - TIOCSSOFTCAR: Final[int] - VSWTC: Final[int] - VSWTCH: Final[int] - XCASE: Final[int] - XTABS: Final[int] - - if sys.platform != "darwin": - B1000000: Final[int] - B1500000: Final[int] - B2000000: Final[int] - B2500000: Final[int] - B3000000: Final[int] - B3500000: Final[int] - B4000000: Final[int] - B460800: Final[int] - B500000: Final[int] - B921600: Final[int] - - if sys.platform != "linux": - TCSASOFT: Final[int] - - if sys.platform != "darwin" and sys.platform != "linux": - # not available on FreeBSD either. - CDEL: Final[int] - CEOL2: Final[int] - CESC: Final[int] - CNUL: Final[int] - COMMON: Final[int] - CSWTCH: Final[int] - IBSHIFT: Final[int] - INIT_C_CC: Final[int] - NSWTCH: Final[int] - - def tcgetattr(fd: FileDescriptorLike, /) -> _AttrReturn: ... - def tcsetattr(fd: FileDescriptorLike, when: int, attributes: _Attr, /) -> None: ... - def tcsendbreak(fd: FileDescriptorLike, duration: int, /) -> None: ... - def tcdrain(fd: FileDescriptorLike, /) -> None: ... - def tcflush(fd: FileDescriptorLike, queue: int, /) -> None: ... - def tcflow(fd: FileDescriptorLike, action: int, /) -> None: ... - if sys.version_info >= (3, 11): - def tcgetwinsize(fd: FileDescriptorLike, /) -> tuple[int, int]: ... - def tcsetwinsize(fd: FileDescriptorLike, winsize: tuple[int, int], /) -> None: ... - - class error(Exception): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/textwrap.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/textwrap.vpi deleted file mode 100644 index c00cce3c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/textwrap.vpi +++ /dev/null @@ -1,103 +0,0 @@ -from collections.abc import Callable -from re import Pattern - -__all__ = ["TextWrapper", "wrap", "fill", "dedent", "indent", "shorten"] - -class TextWrapper: - width: int - initial_indent: str - subsequent_indent: str - expand_tabs: bool - replace_whitespace: bool - fix_sentence_endings: bool - drop_whitespace: bool - break_long_words: bool - break_on_hyphens: bool - tabsize: int - max_lines: int | None - placeholder: str - - # Attributes not present in documentation - sentence_end_re: Pattern[str] - wordsep_re: Pattern[str] - wordsep_simple_re: Pattern[str] - whitespace_trans: str - unicode_whitespace_trans: dict[int, int] - uspace: int - x: str # leaked loop variable - def __init__( - self, - width: int = 70, - initial_indent: str = "", - subsequent_indent: str = "", - expand_tabs: bool = True, - replace_whitespace: bool = True, - fix_sentence_endings: bool = False, - break_long_words: bool = True, - drop_whitespace: bool = True, - break_on_hyphens: bool = True, - tabsize: int = 8, - *, - max_lines: int | None = None, - placeholder: str = " [...]", - ) -> None: ... - # Private methods *are* part of the documented API for subclasses. - def _munge_whitespace(self, text: str) -> str: ... - def _split(self, text: str) -> list[str]: ... - def _fix_sentence_endings(self, chunks: list[str]) -> None: ... - def _handle_long_word(self, reversed_chunks: list[str], cur_line: list[str], cur_len: int, width: int) -> None: ... - def _wrap_chunks(self, chunks: list[str]) -> list[str]: ... - def _split_chunks(self, text: str) -> list[str]: ... - def wrap(self, text: str) -> list[str]: ... - def fill(self, text: str) -> str: ... - -def wrap( - text: str, - width: int = 70, - *, - initial_indent: str = "", - subsequent_indent: str = "", - expand_tabs: bool = True, - tabsize: int = 8, - replace_whitespace: bool = True, - fix_sentence_endings: bool = False, - break_long_words: bool = True, - break_on_hyphens: bool = True, - drop_whitespace: bool = True, - max_lines: int | None = None, - placeholder: str = " [...]", -) -> list[str]: ... -def fill( - text: str, - width: int = 70, - *, - initial_indent: str = "", - subsequent_indent: str = "", - expand_tabs: bool = True, - tabsize: int = 8, - replace_whitespace: bool = True, - fix_sentence_endings: bool = False, - break_long_words: bool = True, - break_on_hyphens: bool = True, - drop_whitespace: bool = True, - max_lines: int | None = None, - placeholder: str = " [...]", -) -> str: ... -def shorten( - text: str, - width: int, - *, - initial_indent: str = "", - subsequent_indent: str = "", - expand_tabs: bool = True, - tabsize: int = 8, - replace_whitespace: bool = True, - fix_sentence_endings: bool = False, - break_long_words: bool = True, - break_on_hyphens: bool = True, - drop_whitespace: bool = True, - # Omit `max_lines: int = None`, it is forced to 1 here. - placeholder: str = " [...]", -) -> str: ... -def dedent(text: str) -> str: ... -def indent(text: str, prefix: str, predicate: Callable[[str], bool] | None = None) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/threading.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/threading.vpi deleted file mode 100644 index 6b51b424..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/threading.vpi +++ /dev/null @@ -1,221 +0,0 @@ -import _thread -import sys -from _thread import _ExceptHookArgs, get_native_id as get_native_id -from _typeshed import ProfileFunction, TraceFunction -from collections.abc import Callable, Iterable, Iterator, Mapping -from contextvars import Context -from types import TracebackType -from typing import Any, Final, TypeVar, final -from typing_extensions import Self, deprecated - -_T = TypeVar("_T") - -__all__ = [ - "get_ident", - "active_count", - "Condition", - "current_thread", - "enumerate", - "main_thread", - "TIMEOUT_MAX", - "Event", - "Lock", - "RLock", - "Semaphore", - "BoundedSemaphore", - "Thread", - "Barrier", - "BrokenBarrierError", - "Timer", - "ThreadError", - "ExceptHookArgs", - "getprofile", - "gettrace", - "setprofile", - "settrace", - "local", - "stack_size", - "excepthook", - "get_native_id", -] - -if sys.version_info >= (3, 12): - __all__ += ["setprofile_all_threads", "settrace_all_threads"] - -if sys.version_info >= (3, 15): - __all__ += ["concurrent_tee", "serialize_iterator", "synchronized_iterator"] - -_profile_hook: ProfileFunction | None - -def active_count() -> int: ... -@deprecated("Deprecated since Python 3.10. Use `active_count()` instead.") -def activeCount() -> int: ... -def current_thread() -> Thread: ... -@deprecated("Deprecated since Python 3.10. Use `current_thread()` instead.") -def currentThread() -> Thread: ... -def get_ident() -> int: ... -def enumerate() -> list[Thread]: ... -def main_thread() -> Thread: ... -def settrace(func: TraceFunction | None) -> None: ... -def setprofile(func: ProfileFunction | None) -> None: ... - -if sys.version_info >= (3, 12): - def setprofile_all_threads(func: ProfileFunction | None) -> None: ... - def settrace_all_threads(func: TraceFunction | None) -> None: ... - -def gettrace() -> TraceFunction | None: ... -def getprofile() -> ProfileFunction | None: ... - -if sys.version_info >= (3, 15): - @final - class serialize_iterator(Iterator[_T]): - def __init__(self, iterable: Iterable[_T]) -> None: ... - def __iter__(self) -> Self: ... - def __next__(self) -> _T: ... - def send(self, value: Any, /) -> _T: ... - def throw(self, typ: type[BaseException], val: BaseException | object = ..., tb: TracebackType | None = ...) -> _T: ... - def close(self) -> None: ... - - def synchronized_iterator(func: Callable[..., Iterable[_T]]) -> Callable[..., Iterator[_T]]: ... - def concurrent_tee(iterable: Iterable[_T], n: int = 2) -> tuple[Iterator[_T], ...]: ... - -def stack_size(size: int = 0, /) -> int: ... - -TIMEOUT_MAX: Final[float] - -ThreadError = _thread.error -local = _thread._local - -class Thread: - name: str - @property - def ident(self) -> int | None: ... - daemon: bool - if sys.version_info >= (3, 14): - def __init__( - self, - group: None = None, - target: Callable[..., object] | None = None, - name: str | None = None, - args: Iterable[Any] = (), - kwargs: Mapping[str, Any] | None = None, - *, - daemon: bool | None = None, - context: Context | None = None, - ) -> None: ... - else: - def __init__( - self, - group: None = None, - target: Callable[..., object] | None = None, - name: str | None = None, - args: Iterable[Any] = (), - kwargs: Mapping[str, Any] | None = None, - *, - daemon: bool | None = None, - ) -> None: ... - - def start(self) -> None: ... - def run(self) -> None: ... - def join(self, timeout: float | None = None) -> None: ... - @property - def native_id(self) -> int | None: ... # only available on some platforms - def is_alive(self) -> bool: ... - @deprecated("Deprecated since Python 3.10. Read the `daemon` attribute instead.") - def isDaemon(self) -> bool: ... - @deprecated("Deprecated since Python 3.10. Set the `daemon` attribute instead.") - def setDaemon(self, daemonic: bool) -> None: ... - @deprecated("Deprecated since Python 3.10. Read the `name` attribute instead.") - def getName(self) -> str: ... - @deprecated("Deprecated since Python 3.10. Set the `name` attribute instead.") - def setName(self, name: str) -> None: ... - -class _DummyThread(Thread): - def __init__(self) -> None: ... - -# This is actually the function _thread.allocate_lock for <= 3.12 -Lock = _thread.LockType - -# Python implementation of RLock. -@final -class _RLock: - _count: int - def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ... - def release(self) -> None: ... - __enter__ = acquire - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - - if sys.version_info >= (3, 14): - def locked(self) -> bool: ... - -RLock = _thread.RLock # Actually a function at runtime. - -class Condition: - def __init__(self, lock: Lock | _RLock | RLock | None = None) -> None: ... - def __enter__(self) -> bool: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ... - def release(self) -> None: ... - if sys.version_info >= (3, 14): - def locked(self) -> bool: ... - - def wait(self, timeout: float | None = None) -> bool: ... - def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ... - def notify(self, n: int = 1) -> None: ... - def notify_all(self) -> None: ... - @deprecated("Deprecated since Python 3.10. Use `notify_all()` instead.") - def notifyAll(self) -> None: ... - -class Semaphore: - _value: int - def __init__(self, value: int = 1) -> None: ... - def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ... - def acquire(self, blocking: bool = True, timeout: float | None = None) -> bool: ... - def __enter__(self, blocking: bool = True, timeout: float | None = None) -> bool: ... - def release(self, n: int = 1) -> None: ... - -class BoundedSemaphore(Semaphore): ... - -class Event: - def is_set(self) -> bool: ... - @deprecated("Deprecated since Python 3.10. Use `is_set()` instead.") - def isSet(self) -> bool: ... - def set(self) -> None: ... - def clear(self) -> None: ... - def wait(self, timeout: float | None = None) -> bool: ... - -excepthook: Callable[[_ExceptHookArgs], object] -__excepthook__: Callable[[_ExceptHookArgs], object] -ExceptHookArgs = _ExceptHookArgs - -class Timer(Thread): - args: Iterable[Any] # undocumented - finished: Event # undocumented - function: Callable[..., Any] # undocumented - interval: float # undocumented - kwargs: Mapping[str, Any] # undocumented - - def __init__( - self, - interval: float, - function: Callable[..., object], - args: Iterable[Any] | None = None, - kwargs: Mapping[str, Any] | None = None, - ) -> None: ... - def cancel(self) -> None: ... - -class Barrier: - @property - def parties(self) -> int: ... - @property - def n_waiting(self) -> int: ... - @property - def broken(self) -> bool: ... - def __init__(self, parties: int, action: Callable[[], None] | None = None, timeout: float | None = None) -> None: ... - def wait(self, timeout: float | None = None) -> int: ... - def reset(self) -> None: ... - def abort(self) -> None: ... - -class BrokenBarrierError(RuntimeError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/time.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/time.vpi deleted file mode 100644 index ac53089b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/time.vpi +++ /dev/null @@ -1,117 +0,0 @@ -import sys -from _typeshed import structseq -from typing import Any, Final, Literal, Protocol, SupportsFloat, SupportsIndex, TypeAlias, final, type_check_only - -_TimeTuple: TypeAlias = tuple[int, int, int, int, int, int, int, int, int] - -if sys.version_info >= (3, 15): - # anticipate on https://github.com/python/cpython/pull/139224 - _SupportsFloatOrIndex: TypeAlias = SupportsFloat | SupportsIndex -else: - # before, time functions only accept (subclass of) float, *not* SupportsFloat - _SupportsFloatOrIndex: TypeAlias = float | SupportsIndex - -altzone: int -daylight: int -timezone: int -tzname: tuple[str, str] - -if sys.platform == "linux": - CLOCK_BOOTTIME: Final[int] -if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin": - CLOCK_PROF: Final[int] # FreeBSD, NetBSD, OpenBSD - CLOCK_UPTIME: Final[int] # FreeBSD, OpenBSD - -if sys.platform != "win32": - CLOCK_MONOTONIC: Final[int] - CLOCK_MONOTONIC_RAW: Final[int] - CLOCK_PROCESS_CPUTIME_ID: Final[int] - CLOCK_REALTIME: Final[int] - CLOCK_THREAD_CPUTIME_ID: Final[int] - if sys.platform != "linux" and sys.platform != "darwin": - CLOCK_HIGHRES: Final[int] # Solaris only - -if sys.platform == "darwin": - CLOCK_UPTIME_RAW: Final[int] - if sys.version_info >= (3, 13): - CLOCK_UPTIME_RAW_APPROX: Final[int] - CLOCK_MONOTONIC_RAW_APPROX: Final[int] - -if sys.platform == "linux": - CLOCK_TAI: Final[int] - -# Constructor takes an iterable of any type, of length between 9 and 11 elements. -# However, it always *behaves* like a tuple of 9 elements, -# even if an iterable with length >9 is passed. -# https://github.com/python/typeshed/pull/6560#discussion_r767162532 -@final -class struct_time(structseq[Any | int], _TimeTuple): - __match_args__: Final = ("tm_year", "tm_mon", "tm_mday", "tm_hour", "tm_min", "tm_sec", "tm_wday", "tm_yday", "tm_isdst") - - @property - def tm_year(self) -> int: ... - @property - def tm_mon(self) -> int: ... - @property - def tm_mday(self) -> int: ... - @property - def tm_hour(self) -> int: ... - @property - def tm_min(self) -> int: ... - @property - def tm_sec(self) -> int: ... - @property - def tm_wday(self) -> int: ... - @property - def tm_yday(self) -> int: ... - @property - def tm_isdst(self) -> int: ... - # These final two properties only exist if a 10- or 11-item sequence was passed to the constructor. - @property - def tm_zone(self) -> str: ... - @property - def tm_gmtoff(self) -> int: ... - -def asctime(time_tuple: _TimeTuple | struct_time = ..., /) -> str: ... -def ctime(seconds: _SupportsFloatOrIndex | None = None, /) -> str: ... -def gmtime(seconds: _SupportsFloatOrIndex | None = None, /) -> struct_time: ... -def localtime(seconds: _SupportsFloatOrIndex | None = None, /) -> struct_time: ... -def mktime(time_tuple: _TimeTuple | struct_time, /) -> float: ... -def sleep(seconds: _SupportsFloatOrIndex, /) -> None: ... -def strftime(format: str, time_tuple: _TimeTuple | struct_time = ..., /) -> str: ... -def strptime(data_string: str, format: str = "%a %b %d %H:%M:%S %Y", /) -> struct_time: ... -def time() -> float: ... - -if sys.platform != "win32": - def tzset() -> None: ... # Unix only - -@type_check_only -class _ClockInfo(Protocol): - adjustable: bool - implementation: str - monotonic: bool - resolution: float - -def get_clock_info(name: Literal["monotonic", "perf_counter", "process_time", "time", "thread_time"], /) -> _ClockInfo: ... -def monotonic() -> float: ... -def perf_counter() -> float: ... -def process_time() -> float: ... - -if sys.platform != "win32": - def clock_getres(clk_id: int, /) -> float: ... # Unix only - def clock_gettime(clk_id: int, /) -> float: ... # Unix only - def clock_settime(clk_id: int, time: float, /) -> None: ... # Unix only - -if sys.platform != "win32": - def clock_gettime_ns(clk_id: int, /) -> int: ... - def clock_settime_ns(clock_id: int, time: int, /) -> int: ... - -if sys.platform == "linux": - def pthread_getcpuclockid(thread_id: int, /) -> int: ... - -def monotonic_ns() -> int: ... -def perf_counter_ns() -> int: ... -def process_time_ns() -> int: ... -def time_ns() -> int: ... -def thread_time() -> float: ... -def thread_time_ns() -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/timeit.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/timeit.vpi deleted file mode 100644 index cc2b2027..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/timeit.vpi +++ /dev/null @@ -1,46 +0,0 @@ -import sys -import time -from collections.abc import Callable, Sequence -from typing import IO, Any, TypeAlias - -__all__ = ["Timer", "timeit", "repeat", "default_timer"] - -_Timer: TypeAlias = Callable[[], float] -_Stmt: TypeAlias = str | Callable[[], object] - -default_timer: _Timer - -class Timer: - def __init__( - self, - stmt: _Stmt = "pass", - setup: _Stmt = "pass", - timer: _Timer = time.perf_counter, - globals: dict[str, Any] | None = None, - ) -> None: ... - def print_exc(self, file: IO[str] | None = None) -> None: ... - def timeit(self, number: int = 1000000) -> float: ... - def repeat(self, repeat: int = 5, number: int = 1000000) -> list[float]: ... - if sys.version_info >= (3, 15): - def autorange( - self, callback: Callable[[int, float], object] | None = None, target_time: float = 0.2 - ) -> tuple[int, float]: ... - else: - def autorange(self, callback: Callable[[int, float], object] | None = None) -> tuple[int, float]: ... - -def timeit( - stmt: _Stmt = "pass", - setup: _Stmt = "pass", - timer: _Timer = time.perf_counter, - number: int = 1000000, - globals: dict[str, Any] | None = None, -) -> float: ... -def repeat( - stmt: _Stmt = "pass", - setup: _Stmt = "pass", - timer: _Timer = time.perf_counter, - repeat: int = 5, - number: int = 1000000, - globals: dict[str, Any] | None = None, -) -> list[float]: ... -def main(args: Sequence[str] | None = None, *, _wrap_timer: Callable[[_Timer], _Timer] | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/__init__.vpi deleted file mode 100644 index 94787911..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/__init__.vpi +++ /dev/null @@ -1,4370 +0,0 @@ -import _tkinter -import sys -from _typeshed import FileDescriptorLike, Incomplete, MaybeNone, StrOrBytesPath -from collections.abc import Callable, Iterable, Mapping, Sequence -from tkinter.constants import * -from tkinter.font import _FontDescription -from types import GenericAlias, TracebackType -from typing import ( - Any, - ClassVar, - Final, - Generic, - Literal, - NamedTuple, - ParamSpec, - Protocol, - TypeAlias, - TypedDict, - TypeVar, - overload, - type_check_only, -) -from typing_extensions import TypeVarTuple, Unpack, deprecated, disjoint_base - -if sys.version_info >= (3, 11): - from enum import StrEnum -else: - from enum import Enum - -__all__ = [ - "TclError", - "NO", - "FALSE", - "OFF", - "YES", - "TRUE", - "ON", - "N", - "S", - "W", - "E", - "NW", - "SW", - "NE", - "SE", - "NS", - "EW", - "NSEW", - "CENTER", - "NONE", - "X", - "Y", - "BOTH", - "LEFT", - "TOP", - "RIGHT", - "BOTTOM", - "RAISED", - "SUNKEN", - "FLAT", - "RIDGE", - "GROOVE", - "SOLID", - "HORIZONTAL", - "VERTICAL", - "NUMERIC", - "CHAR", - "WORD", - "BASELINE", - "INSIDE", - "OUTSIDE", - "SEL", - "SEL_FIRST", - "SEL_LAST", - "END", - "INSERT", - "CURRENT", - "ANCHOR", - "ALL", - "NORMAL", - "DISABLED", - "ACTIVE", - "HIDDEN", - "CASCADE", - "CHECKBUTTON", - "COMMAND", - "RADIOBUTTON", - "SEPARATOR", - "SINGLE", - "BROWSE", - "MULTIPLE", - "EXTENDED", - "DOTBOX", - "UNDERLINE", - "PIESLICE", - "CHORD", - "ARC", - "FIRST", - "LAST", - "BUTT", - "PROJECTING", - "ROUND", - "BEVEL", - "MITER", - "MOVETO", - "SCROLL", - "UNITS", - "PAGES", - "TkVersion", - "TclVersion", - "READABLE", - "WRITABLE", - "EXCEPTION", - "EventType", - "Event", - "NoDefaultRoot", - "Variable", - "StringVar", - "IntVar", - "DoubleVar", - "BooleanVar", - "mainloop", - "getint", - "getdouble", - "getboolean", - "Misc", - "CallWrapper", - "XView", - "YView", - "Wm", - "Tk", - "Tcl", - "Pack", - "Place", - "Grid", - "BaseWidget", - "Widget", - "Toplevel", - "Button", - "Canvas", - "Checkbutton", - "Entry", - "Frame", - "Label", - "Listbox", - "Menu", - "Menubutton", - "Message", - "Radiobutton", - "Scale", - "Scrollbar", - "Text", - "OptionMenu", - "Image", - "PhotoImage", - "BitmapImage", - "image_names", - "image_types", - "Spinbox", - "LabelFrame", - "PanedWindow", -] - -# Using anything from tkinter.font in this file means that 'import tkinter' -# seems to also load tkinter.font. That's not how it actually works, but -# unfortunately not much can be done about it. https://github.com/python/typeshed/pull/4346 - -TclError = _tkinter.TclError -wantobjects: int -TkVersion: Final[float] -TclVersion: Final[float] -READABLE: Final = _tkinter.READABLE -WRITABLE: Final = _tkinter.WRITABLE -EXCEPTION: Final = _tkinter.EXCEPTION - -# Quick guide for figuring out which widget class to choose: -# - Misc: any widget (don't use BaseWidget because Tk doesn't inherit from BaseWidget) -# - Widget: anything that is meant to be put into another widget with e.g. pack or grid -# -# Don't trust tkinter's docstrings, because they have been created by copy/pasting from -# Tk's manual pages more than 10 years ago. Use the latest manual pages instead: -# -# $ sudo apt install tk-doc tcl-doc -# $ man 3tk label # tkinter.Label -# $ man 3tk ttk_label # tkinter.ttk.Label -# $ man 3tcl after # tkinter.Misc.after -# -# You can also read the manual pages online: https://www.tcl.tk/doc/ - -# manual page: Tk_GetCursor -_Cursor: TypeAlias = str | tuple[str] | tuple[str, str] | tuple[str, str, str] | tuple[str, str, str, str] - -if sys.version_info >= (3, 11): - @type_check_only - class _VersionInfoTypeBase(NamedTuple): - major: int - minor: int - micro: int - releaselevel: str - serial: int - - if sys.version_info >= (3, 12): - class _VersionInfoType(_VersionInfoTypeBase): ... - else: - @disjoint_base - class _VersionInfoType(_VersionInfoTypeBase): ... - -if sys.version_info >= (3, 11): - class EventType(StrEnum): - Activate = "36" - ButtonPress = "4" - Button = ButtonPress - ButtonRelease = "5" - Circulate = "26" - CirculateRequest = "27" - ClientMessage = "33" - Colormap = "32" - Configure = "22" - ConfigureRequest = "23" - Create = "16" - Deactivate = "37" - Destroy = "17" - Enter = "7" - Expose = "12" - FocusIn = "9" - FocusOut = "10" - GraphicsExpose = "13" - Gravity = "24" - KeyPress = "2" - Key = "2" - KeyRelease = "3" - Keymap = "11" - Leave = "8" - Map = "19" - MapRequest = "20" - Mapping = "34" - Motion = "6" - MouseWheel = "38" - NoExpose = "14" - Property = "28" - Reparent = "21" - ResizeRequest = "25" - Selection = "31" - SelectionClear = "29" - SelectionRequest = "30" - Unmap = "18" - VirtualEvent = "35" - Visibility = "15" - -else: - class EventType(str, Enum): - Activate = "36" - ButtonPress = "4" - Button = ButtonPress - ButtonRelease = "5" - Circulate = "26" - CirculateRequest = "27" - ClientMessage = "33" - Colormap = "32" - Configure = "22" - ConfigureRequest = "23" - Create = "16" - Deactivate = "37" - Destroy = "17" - Enter = "7" - Expose = "12" - FocusIn = "9" - FocusOut = "10" - GraphicsExpose = "13" - Gravity = "24" - KeyPress = "2" - Key = KeyPress - KeyRelease = "3" - Keymap = "11" - Leave = "8" - Map = "19" - MapRequest = "20" - Mapping = "34" - Motion = "6" - MouseWheel = "38" - NoExpose = "14" - Property = "28" - Reparent = "21" - ResizeRequest = "25" - Selection = "31" - SelectionClear = "29" - SelectionRequest = "30" - Unmap = "18" - VirtualEvent = "35" - Visibility = "15" - -_W = TypeVar("_W", bound=Misc) -# Events considered covariant because you should never assign to event.widget. -_W_co = TypeVar("_W_co", covariant=True, bound=Misc, default=Misc) - -class Event(Generic[_W_co]): - serial: int - num: int - focus: bool - height: int - width: int - keycode: int - state: int | str - time: int - x: int - y: int - x_root: int - y_root: int - char: str - send_event: bool - keysym: str - keysym_num: int - type: EventType - widget: _W_co - delta: int - if sys.version_info >= (3, 15): - detail: str - user_data: str - if sys.version_info >= (3, 14): - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -def NoDefaultRoot() -> None: ... - -class Variable: - def __init__(self, master: Misc | None = None, value=None, name: str | None = None) -> None: ... - def set(self, value) -> None: ... - initialize = set - def get(self): ... - def trace_add(self, mode: Literal["array", "read", "write", "unset"], callback: Callable[[str, str, str], object]) -> str: ... - def trace_remove(self, mode: Literal["array", "read", "write", "unset"], cbname: str) -> None: ... - def trace_info(self) -> list[tuple[tuple[Literal["array", "read", "write", "unset"], ...], str]]: ... - @deprecated("Deprecated since Python 3.14. Use `trace_add()` instead.") - def trace(self, mode, callback) -> str: ... - @deprecated("Deprecated since Python 3.14. Use `trace_add()` instead.") - def trace_variable(self, mode, callback) -> str: ... - @deprecated("Deprecated since Python 3.14. Use `trace_remove()` instead.") - def trace_vdelete(self, mode, cbname) -> None: ... - @deprecated("Deprecated since Python 3.14. Use `trace_info()` instead.") - def trace_vinfo(self) -> list[Incomplete]: ... - def __eq__(self, other: object) -> bool: ... - def __del__(self) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -class StringVar(Variable): - def __init__(self, master: Misc | None = None, value: str | None = None, name: str | None = None) -> None: ... - def set(self, value: str) -> None: ... - initialize = set - def get(self) -> str: ... - -class IntVar(Variable): - def __init__(self, master: Misc | None = None, value: int | None = None, name: str | None = None) -> None: ... - def set(self, value: int) -> None: ... - initialize = set - def get(self) -> int: ... - -class DoubleVar(Variable): - def __init__(self, master: Misc | None = None, value: float | None = None, name: str | None = None) -> None: ... - def set(self, value: float) -> None: ... - initialize = set - def get(self) -> float: ... - -class BooleanVar(Variable): - def __init__(self, master: Misc | None = None, value: bool | None = None, name: str | None = None) -> None: ... - def set(self, value: bool) -> None: ... - initialize = set - def get(self) -> bool: ... - -def mainloop(n: int = 0) -> None: ... - -getint = int -getdouble = float - -def getboolean(s) -> bool: ... - -_Ts = TypeVarTuple("_Ts") -_P = ParamSpec("_P") - -@type_check_only -class _GridIndexInfo(TypedDict, total=False): - minsize: float | str - pad: float | str - uniform: str | None - weight: int - -@type_check_only -class _BusyInfo(TypedDict): - cursor: _Cursor - -class Misc: - master: Misc | None - tk: _tkinter.TkappType - children: dict[str, Widget] - def destroy(self) -> None: ... - def deletecommand(self, name: str) -> None: ... - def tk_strictMotif(self, boolean=None): ... - def tk_bisque(self) -> None: ... - def tk_setPalette(self, *args, **kw) -> None: ... - def wait_variable(self, name: str | Variable = "PY_VAR") -> None: ... - waitvar = wait_variable - def wait_window(self, window: Misc | None = None) -> None: ... - def wait_visibility(self, window: Misc | None = None) -> None: ... - def setvar(self, name: str = "PY_VAR", value: str = "1") -> None: ... - def getvar(self, name: str = "PY_VAR"): ... - def getint(self, s) -> int: ... - def getdouble(self, s) -> float: ... - def getboolean(self, s) -> bool: ... - def focus_set(self) -> None: ... - focus = focus_set - def focus_force(self) -> None: ... - def focus_get(self) -> Misc | None: ... - def focus_displayof(self) -> Misc | None: ... - def focus_lastfor(self) -> Misc | None: ... - def tk_focusFollowsMouse(self) -> None: ... - def tk_focusNext(self) -> Misc | None: ... - def tk_focusPrev(self) -> Misc | None: ... - if sys.version_info >= (3, 14): - # .after() can be called without the "func" argument, but it is basically never what you want. - # It behaves like time.sleep() and freezes the GUI app. - def after(self, ms: int | Literal["idle"], func: Callable[_P, object], *args: _P.args, **kwargs: _P.kwargs) -> str: ... - # after_idle is essentially partialmethod(after, "idle") - def after_idle(self, func: Callable[_P, object], *args: _P.args, **kwargs: _P.kwargs) -> str: ... - else: - # .after() can be called without the "func" argument, but it is basically never what you want. - # It behaves like time.sleep() and freezes the GUI app. - def after(self, ms: int | Literal["idle"], func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ... - # after_idle is essentially partialmethod(after, "idle") - def after_idle(self, func: Callable[[Unpack[_Ts]], object], *args: Unpack[_Ts]) -> str: ... - - def after_cancel(self, id: str) -> None: ... - if sys.version_info >= (3, 13): - def after_info(self, id: str | None = None) -> tuple[str, ...]: ... - - def bell(self, displayof: Literal[0] | Misc | None = 0) -> None: ... - if sys.version_info >= (3, 13): - # Supports options from `_BusyInfo`` - def tk_busy_cget(self, option: Literal["cursor"]) -> _Cursor: ... - busy_cget = tk_busy_cget - def tk_busy_configure(self, cnf: Any = None, **kw: Any) -> Any: ... - tk_busy_config = tk_busy_configure - busy_configure = tk_busy_configure - busy_config = tk_busy_configure - def tk_busy_current(self, pattern: str | None = None) -> list[Misc]: ... - busy_current = tk_busy_current - def tk_busy_forget(self) -> None: ... - busy_forget = tk_busy_forget - def tk_busy_hold(self, **kw: Unpack[_BusyInfo]) -> None: ... - tk_busy = tk_busy_hold - busy_hold = tk_busy_hold - busy = tk_busy_hold - def tk_busy_status(self) -> bool: ... - busy_status = tk_busy_status - - def clipboard_get(self, *, displayof: Misc = ..., type: str = ...) -> str: ... - def clipboard_clear(self, *, displayof: Misc = ...) -> None: ... - def clipboard_append(self, string: str, *, displayof: Misc = ..., format: str = ..., type: str = ...) -> None: ... - def grab_current(self): ... - def grab_release(self) -> None: ... - def grab_set(self) -> None: ... - def grab_set_global(self) -> None: ... - def grab_status(self) -> Literal["local", "global"] | None: ... - def option_add( - self, pattern, value, priority: int | Literal["widgetDefault", "startupFile", "userDefault", "interactive"] | None = None - ) -> None: ... - def option_clear(self) -> None: ... - def option_get(self, name, className): ... - def option_readfile(self, fileName, priority=None) -> None: ... - def selection_clear(self, **kw) -> None: ... - def selection_get(self, **kw): ... - def selection_handle(self, command, **kw) -> None: ... - def selection_own(self, **kw) -> None: ... - def selection_own_get(self, **kw): ... - def send(self, interp, cmd, *args): ... - def lower(self, belowThis=None) -> None: ... - def tkraise(self, aboveThis=None) -> None: ... - lift = tkraise - if sys.version_info >= (3, 11): - def info_patchlevel(self) -> _VersionInfoType: ... - - def winfo_atom(self, name: str, displayof: Literal[0] | Misc | None = 0) -> int: ... - def winfo_atomname(self, id: int, displayof: Literal[0] | Misc | None = 0) -> str: ... - def winfo_cells(self) -> int: ... - def winfo_children(self) -> list[Widget | Toplevel]: ... - def winfo_class(self) -> str: ... - def winfo_colormapfull(self) -> bool: ... - def winfo_containing(self, rootX: int, rootY: int, displayof: Literal[0] | Misc | None = 0) -> Misc | None: ... - def winfo_depth(self) -> int: ... - def winfo_exists(self) -> bool: ... - def winfo_fpixels(self, number: float | str) -> float: ... - def winfo_geometry(self) -> str: ... - def winfo_height(self) -> int: ... - def winfo_id(self) -> int: ... - def winfo_interps(self, displayof: Literal[0] | Misc | None = 0) -> tuple[str, ...]: ... - def winfo_ismapped(self) -> bool: ... - def winfo_manager(self) -> str: ... - def winfo_name(self) -> str: ... - def winfo_parent(self) -> str: ... # return value needs nametowidget() - def winfo_pathname(self, id: int, displayof: Literal[0] | Misc | None = 0): ... - def winfo_pixels(self, number: float | str) -> int: ... - def winfo_pointerx(self) -> int: ... - def winfo_pointerxy(self) -> tuple[int, int]: ... - def winfo_pointery(self) -> int: ... - def winfo_reqheight(self) -> int: ... - def winfo_reqwidth(self) -> int: ... - def winfo_rgb(self, color: str) -> tuple[int, int, int]: ... - def winfo_rootx(self) -> int: ... - def winfo_rooty(self) -> int: ... - def winfo_screen(self) -> str: ... - def winfo_screencells(self) -> int: ... - def winfo_screendepth(self) -> int: ... - def winfo_screenheight(self) -> int: ... - def winfo_screenmmheight(self) -> int: ... - def winfo_screenmmwidth(self) -> int: ... - def winfo_screenvisual(self) -> str: ... - def winfo_screenwidth(self) -> int: ... - def winfo_server(self) -> str: ... - def winfo_toplevel(self) -> Tk | Toplevel: ... - def winfo_viewable(self) -> bool: ... - def winfo_visual(self) -> str: ... - def winfo_visualid(self) -> str: ... - def winfo_visualsavailable(self, includeids: bool = False) -> list[tuple[str, int]]: ... - def winfo_vrootheight(self) -> int: ... - def winfo_vrootwidth(self) -> int: ... - def winfo_vrootx(self) -> int: ... - def winfo_vrooty(self) -> int: ... - def winfo_width(self) -> int: ... - def winfo_x(self) -> int: ... - def winfo_y(self) -> int: ... - def update(self) -> None: ... - def update_idletasks(self) -> None: ... - - @overload - def bindtags(self, tagList: None = None) -> tuple[str, ...]: ... - @overload - def bindtags(self, tagList: list[str] | tuple[str, ...]) -> None: ... - - # bind with isinstance(func, str) doesn't return anything, but all other - # binds do. The default value of func is not str. - @overload - def bind( - self, - sequence: str | None = None, - func: Callable[[Event[Misc]], object] | None = None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def bind(self, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - @overload - def bind(self, *, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - - # There's no way to know what type of widget bind_all and bind_class - # callbacks will get, so those are Misc. - @overload - def bind_all( - self, - sequence: str | None = None, - func: Callable[[Event[Misc]], object] | None = None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def bind_all(self, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - @overload - def bind_all(self, *, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - - @overload - def bind_class( - self, - className: str, - sequence: str | None = None, - func: Callable[[Event[Misc]], object] | None = None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def bind_class(self, className: str, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - @overload - def bind_class(self, className: str, *, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - - def unbind(self, sequence: str, funcid: str | None = None) -> None: ... - def unbind_all(self, sequence: str) -> None: ... - def unbind_class(self, className: str, sequence: str) -> None: ... - def mainloop(self, n: int = 0) -> None: ... - def quit(self) -> None: ... - @property - def _windowingsystem(self) -> Literal["win32", "aqua", "x11"]: ... - def nametowidget(self, name: str | Misc | _tkinter.Tcl_Obj) -> Any: ... - def register( - self, func: Callable[..., object], subst: Callable[..., Sequence[Any]] | None = None, needcleanup: int = 1 - ) -> str: ... - def keys(self) -> list[str]: ... - - @overload - def pack_propagate(self, flag: bool) -> bool | None: ... - @overload - def pack_propagate(self) -> None: ... - - propagate = pack_propagate - def grid_anchor(self, anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] | None = None) -> None: ... - anchor = grid_anchor - - @overload - def grid_bbox( - self, column: None = None, row: None = None, col2: None = None, row2: None = None - ) -> tuple[int, int, int, int] | None: ... - @overload - def grid_bbox(self, column: int, row: int, col2: None = None, row2: None = None) -> tuple[int, int, int, int] | None: ... - @overload - def grid_bbox(self, column: int, row: int, col2: int, row2: int) -> tuple[int, int, int, int] | None: ... - - bbox = grid_bbox - def grid_columnconfigure( - self, - index: int | str | list[int] | tuple[int, ...], - cnf: _GridIndexInfo = {}, - *, - minsize: float | str = ..., - pad: float | str = ..., - uniform: str = ..., - weight: int = ..., - ) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check - def grid_rowconfigure( - self, - index: int | str | list[int] | tuple[int, ...], - cnf: _GridIndexInfo = {}, - *, - minsize: float | str = ..., - pad: float | str = ..., - uniform: str = ..., - weight: int = ..., - ) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check - columnconfigure = grid_columnconfigure - rowconfigure = grid_rowconfigure - def grid_location(self, x: float | str, y: float | str) -> tuple[int, int]: ... - - @overload - def grid_propagate(self, flag: bool) -> None: ... - @overload - def grid_propagate(self) -> bool: ... - - def grid_size(self) -> tuple[int, int]: ... - size = grid_size - # Widget because Toplevel or Tk is never a slave - def pack_slaves(self) -> list[Widget]: ... - def grid_slaves(self, row: int | None = None, column: int | None = None) -> list[Widget]: ... - def place_slaves(self) -> list[Widget]: ... - slaves = pack_slaves - if sys.version_info >= (3, 15): - def pack_content(self) -> list[Widget]: ... - def grid_content(self, row: int | None = None, column: int | None = None) -> list[Widget]: ... - def place_content(self) -> list[Widget]: ... - content = pack_content - - def event_add(self, virtual: str, *sequences: str) -> None: ... - def event_delete(self, virtual: str, *sequences: str) -> None: ... - def event_generate( - self, - sequence: str, - *, - above: Misc | int = ..., - borderwidth: float | str = ..., - button: int = ..., - count: int = ..., - data: Any = ..., # anything with usable str() value - delta: int = ..., - detail: str = ..., - focus: bool = ..., - height: float | str = ..., - keycode: int = ..., - keysym: str = ..., - mode: str = ..., - override: bool = ..., - place: Literal["PlaceOnTop", "PlaceOnBottom"] = ..., - root: Misc | int = ..., - rootx: float | str = ..., - rooty: float | str = ..., - sendevent: bool = ..., - serial: int = ..., - state: int | str = ..., - subwindow: Misc | int = ..., - time: int = ..., - warp: bool = ..., - width: float | str = ..., - when: Literal["now", "tail", "head", "mark"] = ..., - x: float | str = ..., - y: float | str = ..., - ) -> None: ... - def event_info(self, virtual: str | None = None) -> tuple[str, ...]: ... - def image_names(self) -> tuple[str, ...]: ... - def image_types(self) -> tuple[str, ...]: ... - # See #4363 and #4891 - def __setitem__(self, key: str, value: Any) -> None: ... - def __getitem__(self, key: str) -> Any: ... - def cget(self, key: str) -> Any: ... - def configure(self, cnf: Any = None) -> Any: ... - config = configure - -class CallWrapper: - func: Incomplete - subst: Incomplete - widget: Incomplete - def __init__(self, func, subst, widget) -> None: ... - def __call__(self, *args): ... - -class XView: - @overload - def xview(self) -> tuple[float, float]: ... - @overload - def xview(self, *args) -> None: ... - - def xview_moveto(self, fraction: float) -> None: ... - - @overload - def xview_scroll(self, number: int, what: Literal["units", "pages"]) -> None: ... - @overload - def xview_scroll(self, number: float | str, what: Literal["pixels"]) -> None: ... - -class YView: - @overload - def yview(self) -> tuple[float, float]: ... - @overload - def yview(self, *args) -> None: ... - - def yview_moveto(self, fraction: float) -> None: ... - - @overload - def yview_scroll(self, number: int, what: Literal["units", "pages"]) -> None: ... - @overload - def yview_scroll(self, number: float | str, what: Literal["pixels"]) -> None: ... - -if sys.platform == "darwin": - @type_check_only - class _WmAttributes(TypedDict): - alpha: float - fullscreen: bool - modified: bool - notify: bool - titlepath: str - topmost: bool - transparent: bool - type: str # Present, but not actually used on darwin - -elif sys.platform == "win32": - @type_check_only - class _WmAttributes(TypedDict): - alpha: float - transparentcolor: str - disabled: bool - fullscreen: bool - toolwindow: bool - topmost: bool - -else: - # X11 - @type_check_only - class _WmAttributes(TypedDict): - alpha: float - topmost: bool - zoomed: bool - fullscreen: bool - type: str - -class Wm: - @overload - def wm_aspect(self, minNumer: int, minDenom: int, maxNumer: int, maxDenom: int) -> None: ... - @overload - def wm_aspect( - self, minNumer: None = None, minDenom: None = None, maxNumer: None = None, maxDenom: None = None - ) -> tuple[int, int, int, int] | None: ... - - aspect = wm_aspect - - # wm_attributes: Get all attributes - if sys.version_info >= (3, 13): - @overload - def wm_attributes(self, *, return_python_dict: Literal[False] = False) -> tuple[Any, ...]: ... - @overload - def wm_attributes(self, *, return_python_dict: Literal[True]) -> _WmAttributes: ... - else: - @overload - def wm_attributes(self) -> tuple[Any, ...]: ... - - # wm_attributes: Get one attribute (old variant using string that starts with "-") - @overload - def wm_attributes(self, option: Literal["-alpha"], /) -> float: ... - @overload - def wm_attributes(self, option: Literal["-fullscreen"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-topmost"], /) -> bool: ... - if sys.platform == "darwin": - @overload - def wm_attributes(self, option: Literal["-modified"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-notify"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-titlepath"], /) -> str: ... - @overload - def wm_attributes(self, option: Literal["-transparent"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-type"], /) -> str: ... - elif sys.platform == "win32": - @overload - def wm_attributes(self, option: Literal["-transparentcolor"], /) -> str: ... - @overload - def wm_attributes(self, option: Literal["-disabled"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-toolwindow"], /) -> bool: ... - else: - # X11 - @overload - def wm_attributes(self, option: Literal["-zoomed"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["-type"], /) -> str: ... - if sys.version_info >= (3, 13): - # wm_attributes: Get one attribute (new variant without "-") - @overload - def wm_attributes(self, option: Literal["alpha"], /) -> float: ... - @overload - def wm_attributes(self, option: Literal["fullscreen"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["topmost"], /) -> bool: ... - if sys.platform == "darwin": - @overload - def wm_attributes(self, option: Literal["modified"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["notify"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["titlepath"], /) -> str: ... - @overload - def wm_attributes(self, option: Literal["transparent"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["type"], /) -> str: ... - elif sys.platform == "win32": - @overload - def wm_attributes(self, option: Literal["transparentcolor"], /) -> str: ... - @overload - def wm_attributes(self, option: Literal["disabled"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["toolwindow"], /) -> bool: ... - else: - # X11 - @overload - def wm_attributes(self, option: Literal["zoomed"], /) -> bool: ... - @overload - def wm_attributes(self, option: Literal["type"], /) -> str: ... - - # wm_attributes: Set an attribute (old variant using string that starts with "-") - @overload - def wm_attributes(self, option: str, /): ... - @overload - def wm_attributes(self, option: Literal["-alpha"], value: float, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-fullscreen"], value: bool, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-topmost"], value: bool, /) -> Literal[""]: ... - if sys.platform == "darwin": - @overload - def wm_attributes(self, option: Literal["-modified"], value: bool, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-notify"], value: bool, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-titlepath"], value: str, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-transparent"], value: bool, /) -> Literal[""]: ... - elif sys.platform == "win32": - @overload - def wm_attributes(self, option: Literal["-transparentcolor"], value: str, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-disabled"], value: bool, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-toolwindow"], value: bool, /) -> Literal[""]: ... - else: - # X11 - @overload - def wm_attributes(self, option: Literal["-zoomed"], value: bool, /) -> Literal[""]: ... - @overload - def wm_attributes(self, option: Literal["-type"], value: str, /) -> Literal[""]: ... - - # wm_attributes: Set multiple attributes (old variant using strings that start with "-") - @overload - def wm_attributes(self, option: str, value, /, *__other_option_value_pairs: Any) -> Literal[""]: ... - - # wm_attributes: Set an attribute (new variant with kwarg instead of string) - if sys.version_info >= (3, 13): - if sys.platform == "darwin": - @overload - def wm_attributes( - self, - *, - alpha: float = ..., - fullscreen: bool = ..., - modified: bool = ..., - notify: bool = ..., - titlepath: str = ..., - topmost: bool = ..., - transparent: bool = ..., - ) -> None: ... - elif sys.platform == "win32": - @overload - def wm_attributes( - self, - *, - alpha: float = ..., - transparentcolor: str = ..., - disabled: bool = ..., - fullscreen: bool = ..., - toolwindow: bool = ..., - topmost: bool = ..., - ) -> None: ... - else: - # X11 - @overload - def wm_attributes( - self, *, alpha: float = ..., topmost: bool = ..., zoomed: bool = ..., fullscreen: bool = ..., type: str = ... - ) -> None: ... - - attributes = wm_attributes - def wm_client(self, name: str | None = None) -> str: ... - client = wm_client - - @overload - def wm_colormapwindows(self) -> list[Misc]: ... - @overload - def wm_colormapwindows(self, wlist: list[Misc] | tuple[Misc, ...], /) -> None: ... - @overload - def wm_colormapwindows(self, first_wlist_item: Misc, /, *other_wlist_items: Misc) -> None: ... - - colormapwindows = wm_colormapwindows - def wm_command(self, value: str | None = None) -> str: ... - command = wm_command - # Some of these always return empty string, but return type is set to None to prevent accidentally using it - def wm_deiconify(self) -> None: ... - deiconify = wm_deiconify - def wm_focusmodel(self, model: Literal["active", "passive"] | None = None) -> Literal["active", "passive", ""]: ... - focusmodel = wm_focusmodel - def wm_forget(self, window: Wm) -> None: ... - forget = wm_forget - def wm_frame(self) -> str: ... - frame = wm_frame - - @overload - def wm_geometry(self, newGeometry: None = None) -> str: ... - @overload - def wm_geometry(self, newGeometry: str) -> None: ... - - geometry = wm_geometry - def wm_grid(self, baseWidth=None, baseHeight=None, widthInc=None, heightInc=None): ... - grid = wm_grid - def wm_group(self, pathName=None): ... - group = wm_group - def wm_iconbitmap(self, bitmap=None, default=None): ... - iconbitmap = wm_iconbitmap - def wm_iconify(self) -> None: ... - iconify = wm_iconify - def wm_iconmask(self, bitmap=None): ... - iconmask = wm_iconmask - def wm_iconname(self, newName=None) -> str: ... - iconname = wm_iconname - def wm_iconphoto(self, default: bool, image1: _PhotoImageLike | str, /, *args: _PhotoImageLike | str) -> None: ... - iconphoto = wm_iconphoto - def wm_iconposition(self, x: int | None = None, y: int | None = None) -> tuple[int, int] | None: ... - iconposition = wm_iconposition - def wm_iconwindow(self, pathName=None): ... - iconwindow = wm_iconwindow - def wm_manage(self, widget) -> None: ... - manage = wm_manage - - @overload - def wm_maxsize(self, width: None = None, height: None = None) -> tuple[int, int]: ... - @overload - def wm_maxsize(self, width: int, height: int) -> None: ... - - maxsize = wm_maxsize - - @overload - def wm_minsize(self, width: None = None, height: None = None) -> tuple[int, int]: ... - @overload - def wm_minsize(self, width: int, height: int) -> None: ... - - minsize = wm_minsize - - @overload - def wm_overrideredirect(self, boolean: None = None) -> bool | None: ... # returns True or None - @overload - def wm_overrideredirect(self, boolean: bool) -> None: ... - - overrideredirect = wm_overrideredirect - def wm_positionfrom(self, who: Literal["program", "user"] | None = None) -> Literal["", "program", "user"]: ... - positionfrom = wm_positionfrom - - @overload - def wm_protocol(self, name: str, func: Callable[[], object] | str) -> None: ... - @overload - def wm_protocol(self, name: str, func: None = None) -> str: ... - @overload - def wm_protocol(self, name: None = None, func: None = None) -> tuple[str, ...]: ... - - protocol = wm_protocol - - @overload - def wm_resizable(self, width: None = None, height: None = None) -> tuple[bool, bool]: ... - @overload - def wm_resizable(self, width: bool, height: bool) -> None: ... - - resizable = wm_resizable - def wm_sizefrom(self, who: Literal["program", "user"] | None = None) -> Literal["", "program", "user"]: ... - sizefrom = wm_sizefrom - - @overload - def wm_state(self, newstate: None = None) -> str: ... - @overload - def wm_state(self, newstate: str) -> None: ... - - state = wm_state - - @overload - def wm_title(self, string: None = None) -> str: ... - @overload - def wm_title(self, string: str) -> None: ... - - title = wm_title - - @overload - def wm_transient(self, master: None = None) -> _tkinter.Tcl_Obj: ... - @overload - def wm_transient(self, master: Wm | _tkinter.Tcl_Obj) -> None: ... - - transient = wm_transient - def wm_withdraw(self) -> None: ... - withdraw = wm_withdraw - -class Tk(Misc, Wm): - master: None - def __init__( - # Make sure to keep in sync with other functions that use the same - # args. - # use `git grep screenName` to find them - self, - screenName: str | None = None, - baseName: str | None = None, - className: str = "Tk", - useTk: bool = True, - sync: bool = False, - use: str | None = None, - ) -> None: ... - - # Keep this in sync with ttktheme.ThemedTk. See issue #13858 - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - menu: Menu = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def destroy(self) -> None: ... - def readprofile(self, baseName: str, className: str) -> None: ... - report_callback_exception: Callable[[type[BaseException], BaseException, TracebackType | None], object] - # Tk has __getattr__ so that tk_instance.foo falls back to tk_instance.tk.foo - # Please keep in sync with _tkinter.TkappType. - # Some methods are intentionally missing because they are inherited from Misc instead. - def adderrorinfo(self, msg: str, /) -> None: ... - def call(self, command: Any, /, *args: Any) -> Any: ... - # TODO: Figure out what arguments the following `func` callbacks should accept - def createcommand(self, name: str, func: Callable[..., object], /) -> None: ... - if sys.platform != "win32": - def createfilehandler(self, file: FileDescriptorLike, mask: int, func: Callable[..., object], /) -> None: ... - def deletefilehandler(self, file: FileDescriptorLike, /) -> None: ... - - def createtimerhandler(self, milliseconds: int, func: Callable[..., object], /): ... - def dooneevent(self, flags: int = 0, /) -> int: ... - def eval(self, script: str, /) -> str: ... - def evalfile(self, fileName: str, /) -> str: ... - def exprboolean(self, s: str, /) -> Literal[0, 1]: ... - def exprdouble(self, s: str, /) -> float: ... - def exprlong(self, s: str, /) -> int: ... - def exprstring(self, s: str, /) -> str: ... - def globalgetvar(self, *args, **kwargs): ... - def globalsetvar(self, *args, **kwargs): ... - def globalunsetvar(self, *args, **kwargs): ... - def interpaddr(self) -> int: ... - def loadtk(self) -> None: ... - def record(self, script: str, /) -> str: ... - if sys.version_info < (3, 11): - @deprecated("Deprecated since Python 3.9; removed in Python 3.11. Use `splitlist()` instead.") - def split(self, arg, /): ... - - def splitlist(self, arg, /) -> tuple[Incomplete, ...]: ... - def unsetvar(self, *args, **kwargs): ... - - if sys.version_info >= (3, 14): - @overload - def wantobjects(self) -> Literal[0, 1]: ... - else: - @overload - def wantobjects(self) -> bool: ... - - @overload - def wantobjects(self, wantobjects: Literal[0, 1] | bool, /) -> None: ... - - def willdispatch(self) -> None: ... - -def Tcl(screenName: str | None = None, baseName: str | None = None, className: str = "Tk", useTk: bool = False) -> Tk: ... - -_InMiscTotal = TypedDict("_InMiscTotal", {"in": Misc}) -_InMiscNonTotal = TypedDict("_InMiscNonTotal", {"in": Misc}, total=False) - -@type_check_only -class _PackInfo(_InMiscTotal): - # 'before' and 'after' never appear in _PackInfo - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] - expand: bool - fill: Literal["none", "x", "y", "both"] - side: Literal["left", "right", "top", "bottom"] - # Paddings come out as int or tuple of int, even though any screen units - # can be specified in pack(). - ipadx: int - ipady: int - padx: int | tuple[int, int] - pady: int | tuple[int, int] - -class Pack: - # _PackInfo is not the valid type for cnf because pad stuff accepts any - # screen units instead of int only. I didn't bother to create another - # TypedDict for cnf because it appears to be a legacy thing that was - # replaced by **kwargs. - def pack_configure( - self, - cnf: Mapping[str, Any] | None = {}, - *, - after: Misc = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - before: Misc = ..., - expand: bool | Literal[0, 1] = 0, - fill: Literal["none", "x", "y", "both"] = ..., - side: Literal["left", "right", "top", "bottom"] = ..., - ipadx: float | str = ..., - ipady: float | str = ..., - padx: float | str | tuple[float | str, float | str] = ..., - pady: float | str | tuple[float | str, float | str] = ..., - in_: Misc = ..., - **kw: Any, # allow keyword argument named 'in', see #4836 - ) -> None: ... - def pack_forget(self) -> None: ... - def pack_info(self) -> _PackInfo: ... # errors if widget hasn't been packed - pack = pack_configure - forget = pack_forget - propagate = Misc.pack_propagate - -@type_check_only -class _PlaceInfo(_InMiscNonTotal): # empty dict if widget hasn't been placed - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] - bordermode: Literal["inside", "outside", "ignore"] - width: str # can be int()ed (even after e.g. widget.place(height='2.3c') or similar) - height: str # can be int()ed - x: str # can be int()ed - y: str # can be int()ed - relheight: str # can be float()ed if not empty string - relwidth: str # can be float()ed if not empty string - relx: str # can be float()ed if not empty string - rely: str # can be float()ed if not empty string - -class Place: - def place_configure( - self, - cnf: Mapping[str, Any] | None = {}, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - bordermode: Literal["inside", "outside", "ignore"] = ..., - width: float | str = ..., - height: float | str = ..., - x: float | str = ..., - y: float | str = ..., - # str allowed for compatibility with place_info() - relheight: str | float = ..., - relwidth: str | float = ..., - relx: str | float = ..., - rely: str | float = ..., - in_: Misc = ..., - **kw: Any, # allow keyword argument named 'in', see #4836 - ) -> None: ... - def place_forget(self) -> None: ... - def place_info(self) -> _PlaceInfo: ... - place = place_configure - info = place_info - -@type_check_only -class _GridInfo(_InMiscNonTotal): # empty dict if widget hasn't been gridded - column: int - columnspan: int - row: int - rowspan: int - ipadx: int - ipady: int - padx: int | tuple[int, int] - pady: int | tuple[int, int] - sticky: str # consists of letters 'n', 's', 'w', 'e', no repeats, may be empty - -class Grid: - def grid_configure( - self, - cnf: Mapping[str, Any] | None = {}, - *, - column: int = ..., - columnspan: int = ..., - row: int = ..., - rowspan: int = ..., - ipadx: float | str = ..., - ipady: float | str = ..., - padx: float | str | tuple[float | str, float | str] = ..., - pady: float | str | tuple[float | str, float | str] = ..., - sticky: ( - str | list[str] | tuple[str, ...] - ) = ..., # consists of letters 'n', 's', 'w', 'e', may contain repeats, may be empty - in_: Misc = ..., - **kw: Any, # allow keyword argument named 'in', see #4836 - ) -> None: ... - def grid_forget(self) -> None: ... - def grid_remove(self) -> None: ... - def grid_info(self) -> _GridInfo: ... - grid = grid_configure - location = Misc.grid_location - size = Misc.grid_size - -class BaseWidget(Misc): - master: Misc - widgetName: str - def __init__(self, master, widgetName: str, cnf={}, kw={}, extra=()) -> None: ... - def destroy(self) -> None: ... - -# This class represents any widget except Toplevel or Tk. -class Widget(BaseWidget, Pack, Place, Grid): - # Allow bind callbacks to take e.g. Event[Label] instead of Event[Misc]. - # Tk and Toplevel get notified for their child widgets' events, but other - # widgets don't. - @overload - def bind( - self: _W, - sequence: str | None = None, - func: Callable[[Event[_W]], object] | None = None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def bind(self, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - @overload - def bind(self, *, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - -class Toplevel(BaseWidget, Wm): - # Toplevel and Tk have the same options because they correspond to the same - # Tcl/Tk toplevel widget. For some reason, config and configure must be - # copy/pasted here instead of aliasing as 'config = Tk.config'. - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = 0, - bg: str = ..., - border: float | str = 0, - borderwidth: float | str = 0, - class_: str = "Toplevel", - colormap: Literal["new", ""] | Misc = "", - container: bool = False, - cursor: _Cursor = "", - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - menu: Menu = ..., - name: str = ..., - padx: float | str = 0, - pady: float | str = 0, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - screen: str = "", # can't be changed after creating widget - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - use: int = ..., - visual: str | tuple[str, int] = "", - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - menu: Menu = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Button(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center", - background: str = ..., - bd: float | str = ..., # same as borderwidth - bg: str = ..., # same as background - bitmap: str = "", - border: float | str = ..., # same as borderwidth - borderwidth: float | str = ..., - command: str | Callable[[], Any] = "", - compound: Literal["top", "left", "center", "right", "bottom", "none"] = "none", - cursor: _Cursor = "", - default: Literal["normal", "active", "disabled"] = "disabled", - disabledforeground: str = ..., - fg: str = ..., # same as foreground - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - # width and height must be int for buttons containing just text, but - # buttons with an image accept any screen units. - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 1, - image: _Image | str = "", - justify: Literal["left", "center", "right"] = "center", - name: str = ..., - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = "", - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = ..., - repeatinterval: int = ..., - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - text: float | str = "", - # We allow the textvariable to be any Variable, not necessarily - # StringVar. This is useful for e.g. a button that displays the value - # of an IntVar. - textvariable: Variable = ..., - underline: int = -1, - width: float | str = 0, - wraplength: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[], Any] = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - cursor: _Cursor = ..., - default: Literal["normal", "active", "disabled"] = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - image: _Image | str = ..., - justify: Literal["left", "center", "right"] = ..., - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = ..., - repeatinterval: int = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - underline: int = ..., - width: float | str = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def flash(self) -> None: ... - def invoke(self) -> Any: ... - -class Canvas(Widget, XView, YView): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = 0, - bg: str = ..., - border: float | str = 0, - borderwidth: float | str = 0, - closeenough: float = 1.0, - confine: bool = True, - cursor: _Cursor = "", - height: float | str = ..., # see COORDINATES in canvas manual page - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = 0, - insertofftime: int = 300, - insertontime: int = 600, - insertwidth: float | str = 2, - name: str = ..., - offset=..., # undocumented - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - # Setting scrollregion to None doesn't reset it back to empty, - # but setting it to () does. - scrollregion: tuple[float | str, float | str, float | str, float | str] | tuple[()] = (), - selectbackground: str = ..., - selectborderwidth: float | str = 1, - selectforeground: str = ..., - # man page says that state can be 'hidden', but it can't - state: Literal["normal", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - width: float | str = ..., - xscrollcommand: str | Callable[[float, float], object] = "", - xscrollincrement: float | str = 0, - yscrollcommand: str | Callable[[float, float], object] = "", - yscrollincrement: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - closeenough: float = ..., - confine: bool = ..., - cursor: _Cursor = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = ..., - insertofftime: int = ..., - insertontime: int = ..., - insertwidth: float | str = ..., - offset=..., # undocumented - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - scrollregion: tuple[float | str, float | str, float | str, float | str] | tuple[()] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - state: Literal["normal", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: float | str = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - xscrollincrement: float | str = ..., - yscrollcommand: str | Callable[[float, float], object] = ..., - yscrollincrement: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def addtag(self, *args): ... # internal method - def addtag_above(self, newtag: str, tagOrId: str | int) -> None: ... - def addtag_all(self, newtag: str) -> None: ... - def addtag_below(self, newtag: str, tagOrId: str | int) -> None: ... - def addtag_closest( - self, newtag: str, x: float | str, y: float | str, halo: float | str | None = None, start: str | int | None = None - ) -> None: ... - def addtag_enclosed(self, newtag: str, x1: float | str, y1: float | str, x2: float | str, y2: float | str) -> None: ... - def addtag_overlapping(self, newtag: str, x1: float | str, y1: float | str, x2: float | str, y2: float | str) -> None: ... - def addtag_withtag(self, newtag: str, tagOrId: str | int) -> None: ... - def find(self, *args): ... # internal method - def find_above(self, tagOrId: str | int) -> tuple[int, ...]: ... - def find_all(self) -> tuple[int, ...]: ... - def find_below(self, tagOrId: str | int) -> tuple[int, ...]: ... - def find_closest( - self, x: float | str, y: float | str, halo: float | str | None = None, start: str | int | None = None - ) -> tuple[int, ...]: ... - def find_enclosed(self, x1: float | str, y1: float | str, x2: float | str, y2: float | str) -> tuple[int, ...]: ... - def find_overlapping(self, x1: float | str, y1: float | str, x2: float | str, y2: float) -> tuple[int, ...]: ... - def find_withtag(self, tagOrId: str | int) -> tuple[int, ...]: ... - # Incompatible with Misc.bbox(), tkinter violates LSP - def bbox(self, *args: str | int) -> tuple[int, int, int, int]: ... # type: ignore[override] - - @overload - def tag_bind( - self, - tagOrId: str | int, - sequence: str | None = None, - func: Callable[[Event[Canvas]], object] | None = None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def tag_bind( - self, tagOrId: str | int, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None - ) -> None: ... - @overload - def tag_bind(self, tagOrId: str | int, *, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - - def tag_unbind(self, tagOrId: str | int, sequence: str, funcid: str | None = None) -> None: ... - def canvasx(self, screenx: float | str, gridspacing: float | str | None = None) -> float: ... - def canvasy(self, screeny: float | str, gridspacing: float | str | None = None) -> float: ... - - @overload - def coords(self, tagOrId: str | int, /) -> list[float]: ... - @overload - def coords(self, tagOrId: str | int, args: list[int] | list[float] | tuple[float, ...], /) -> None: ... - @overload - def coords(self, tagOrId: str | int, x1: float, y1: float, /, *args: float) -> None: ... - - # create_foo() methods accept coords as a list or tuple, or as separate arguments. - # Lists and tuples can be flat as in [1, 2, 3, 4], or nested as in [(1, 2), (3, 4)]. - # Keyword arguments should be the same in all overloads of each method. - def create_arc(self, *args, **kw) -> int: ... - def create_bitmap(self, *args, **kw) -> int: ... - def create_image(self, *args, **kw) -> int: ... - - @overload - def create_line( - self, - x0: float, - y0: float, - x1: float, - y1: float, - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - arrow: Literal["first", "last", "both"] = ..., - arrowshape: tuple[float, float, float] = ..., - capstyle: Literal["round", "projecting", "butt"] = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_line( - self, - xy_pair_0: tuple[float, float], - xy_pair_1: tuple[float, float], - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - arrow: Literal["first", "last", "both"] = ..., - arrowshape: tuple[float, float, float] = ..., - capstyle: Literal["round", "projecting", "butt"] = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_line( - self, - coords: ( - tuple[float, float, float, float] - | tuple[tuple[float, float], tuple[float, float]] - | list[int] - | list[float] - | list[tuple[int, int]] - | list[tuple[float, float]] - ), - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - arrow: Literal["first", "last", "both"] = ..., - arrowshape: tuple[float, float, float] = ..., - capstyle: Literal["round", "projecting", "butt"] = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - - @overload - def create_oval( - self, - x0: float, - y0: float, - x1: float, - y1: float, - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_oval( - self, - xy_pair_0: tuple[float, float], - xy_pair_1: tuple[float, float], - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_oval( - self, - coords: ( - tuple[float, float, float, float] - | tuple[tuple[float, float], tuple[float, float]] - | list[int] - | list[float] - | list[tuple[int, int]] - | list[tuple[float, float]] - ), - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - - @overload - def create_polygon( - self, - x0: float, - y0: float, - x1: float, - y1: float, - /, - *xy_pairs: float, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_polygon( - self, - xy_pair_0: tuple[float, float], - xy_pair_1: tuple[float, float], - /, - *xy_pairs: tuple[float, float], - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_polygon( - self, - coords: ( - tuple[float, ...] - | tuple[tuple[float, float], ...] - | list[int] - | list[float] - | list[tuple[int, int]] - | list[tuple[float, float]] - ), - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - joinstyle: Literal["round", "bevel", "miter"] = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - smooth: bool = ..., - splinesteps: float = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - - @overload - def create_rectangle( - self, - x0: float, - y0: float, - x1: float, - y1: float, - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_rectangle( - self, - xy_pair_0: tuple[float, float], - xy_pair_1: tuple[float, float], - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_rectangle( - self, - coords: ( - tuple[float, float, float, float] - | tuple[tuple[float, float], tuple[float, float]] - | list[int] - | list[float] - | list[tuple[int, int]] - | list[tuple[float, float]] - ), - /, - *, - activedash: str | int | list[int] | tuple[int, ...] = ..., - activefill: str = ..., - activeoutline: str = ..., - activeoutlinestipple: str = ..., - activestipple: str = ..., - activewidth: float | str = ..., - dash: str | int | list[int] | tuple[int, ...] = ..., - dashoffset: float | str = ..., - disableddash: str | int | list[int] | tuple[int, ...] = ..., - disabledfill: str = ..., - disabledoutline: str = ..., - disabledoutlinestipple: str = ..., - disabledstipple: str = ..., - disabledwidth: float | str = ..., - fill: str = ..., - offset: float | str = ..., - outline: str = ..., - outlineoffset: float | str = ..., - outlinestipple: str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - ) -> int: ... - - @overload - def create_text( - self, - x: float, - y: float, - /, - *, - activefill: str = ..., - activestipple: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - angle: float | str = ..., - disabledfill: str = ..., - disabledstipple: str = ..., - fill: str = ..., - font: _FontDescription = ..., - justify: Literal["left", "center", "right"] = ..., - offset: float | str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - text: float | str = ..., - width: float | str = ..., - ) -> int: ... - @overload - def create_text( - self, - coords: tuple[float, float] | list[int] | list[float], - /, - *, - activefill: str = ..., - activestipple: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - angle: float | str = ..., - disabledfill: str = ..., - disabledstipple: str = ..., - fill: str = ..., - font: _FontDescription = ..., - justify: Literal["left", "center", "right"] = ..., - offset: float | str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - stipple: str = ..., - tags: str | list[str] | tuple[str, ...] = ..., - text: float | str = ..., - width: float | str = ..., - ) -> int: ... - - @overload - def create_window( - self, - x: float, - y: float, - /, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - height: float | str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - window: Widget = ..., - ) -> int: ... - @overload - def create_window( - self, - coords: tuple[float, float] | list[int] | list[float], - /, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - height: float | str = ..., - state: Literal["normal", "hidden", "disabled"] = ..., - tags: str | list[str] | tuple[str, ...] = ..., - width: float | str = ..., - window: Widget = ..., - ) -> int: ... - - def dchars(self, *args) -> None: ... - def delete(self, *tagsOrCanvasIds: str | int) -> None: ... - - @overload - def dtag(self, tag: str, tag_to_delete: str | None = ..., /) -> None: ... - @overload - def dtag(self, id: int, tag_to_delete: str, /) -> None: ... - - def focus(self, *args): ... - def gettags(self, tagOrId: str | int, /) -> tuple[str, ...]: ... - def icursor(self, *args) -> None: ... - def index(self, *args): ... - def insert(self, *args) -> None: ... - def itemcget(self, tagOrId, option): ... - # itemconfigure kwargs depend on item type, which is not known when type checking - def itemconfigure( - self, tagOrId: str | int, cnf: dict[str, Any] | None = None, **kw: Any - ) -> dict[str, tuple[str, str, str, str, str]] | None: ... - itemconfig = itemconfigure - def move(self, *args) -> None: ... - def moveto(self, tagOrId: str | int, x: Literal[""] | float = "", y: Literal[""] | float = "") -> None: ... - def postscript(self, cnf={}, **kw): ... - # tkinter does: - # lower = tag_lower - # lift = tkraise = tag_raise - # - # But mypy doesn't like aliasing here (maybe because Misc defines the same names) - def tag_lower(self, first: str | int, second: str | int | None = ..., /) -> None: ... - def lower(self, first: str | int, second: str | int | None = ..., /) -> None: ... # type: ignore[override] - def tag_raise(self, first: str | int, second: str | int | None = ..., /) -> None: ... - def tkraise(self, first: str | int, second: str | int | None = ..., /) -> None: ... # type: ignore[override] - def lift(self, first: str | int, second: str | int | None = ..., /) -> None: ... # type: ignore[override] - def scale(self, tagOrId: str | int, xOrigin: float | str, yOrigin: float | str, xScale: float, yScale: float, /) -> None: ... - def scan_mark(self, x, y) -> None: ... - def scan_dragto(self, x, y, gain: int = 10) -> None: ... - def select_adjust(self, tagOrId, index) -> None: ... - def select_clear(self) -> None: ... - def select_from(self, tagOrId, index) -> None: ... - def select_item(self): ... - def select_to(self, tagOrId, index) -> None: ... - def type(self, tagOrId: str | int) -> int | None: ... - -class Checkbutton(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center", - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = "", - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[], Any] = "", - compound: Literal["top", "left", "center", "right", "bottom", "none"] = "none", - cursor: _Cursor = "", - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 1, - image: _Image | str = "", - indicatoron: bool = True, - justify: Literal["left", "center", "right"] = "center", - name: str = ..., - offrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - # The checkbutton puts a value to its variable when it's checked or - # unchecked. We don't restrict the type of that value here, so - # Any-typing is fine. - # - # I think Checkbutton shouldn't be generic, because then specifying - # "any checkbutton regardless of what variable it uses" would be - # difficult, and we might run into issues just like how list[float] - # and list[int] are incompatible. Also, we would need a way to - # specify "Checkbutton not associated with any variable", which is - # done by setting variable to empty string (the default). - offvalue: Any = 0, - onvalue: Any = 1, - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = "", - padx: float | str = 1, - pady: float | str = 1, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - selectcolor: str = ..., - selectimage: _Image | str = "", - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - text: float | str = "", - textvariable: Variable = ..., - tristateimage: _Image | str = "", - tristatevalue: Any = "", - underline: int = -1, - variable: Variable | Literal[""] = ..., - width: float | str = 0, - wraplength: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[], Any] = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - cursor: _Cursor = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - justify: Literal["left", "center", "right"] = ..., - offrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - offvalue: Any = ..., - onvalue: Any = ..., - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - tristateimage: _Image | str = ..., - tristatevalue: Any = ..., - underline: int = ..., - variable: Variable | Literal[""] = ..., - width: float | str = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def deselect(self) -> None: ... - def flash(self) -> None: ... - def invoke(self) -> Any: ... - def select(self) -> None: ... - def toggle(self) -> None: ... - -class Entry(Widget, XView): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = "xterm", - disabledbackground: str = ..., - disabledforeground: str = ..., - exportselection: bool = True, - fg: str = ..., - font: _FontDescription = "TkTextFont", - foreground: str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = 0, - insertofftime: int = 300, - insertontime: int = 600, - insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", # same as invalidcommand - justify: Literal["left", "center", "right"] = "left", - name: str = ..., - readonlybackground: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "sunken", - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - show: str = "", - state: Literal["normal", "disabled", "readonly"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - textvariable: Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = "none", - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - vcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", # same as validatecommand - width: int = 20, - xscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - disabledbackground: str = ..., - disabledforeground: str = ..., - exportselection: bool = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = ..., - insertofftime: int = ..., - insertontime: int = ..., - insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - readonlybackground: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - show: str = ..., - state: Literal["normal", "disabled", "readonly"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - vcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def delete(self, first: str | int, last: str | int | None = None) -> None: ... - def get(self) -> str: ... - def icursor(self, index: str | int) -> None: ... - def index(self, index: str | int) -> int: ... - def insert(self, index: str | int, string: str) -> None: ... - def scan_mark(self, x) -> None: ... - def scan_dragto(self, x) -> None: ... - def selection_adjust(self, index: str | int) -> None: ... - def selection_clear(self) -> None: ... # type: ignore[override] - def selection_from(self, index: str | int) -> None: ... - def selection_present(self) -> bool: ... - def selection_range(self, start: str | int, end: str | int) -> None: ... - def selection_to(self, index: str | int) -> None: ... - select_adjust = selection_adjust - select_clear = selection_clear - select_from = selection_from - select_present = selection_present - select_range = selection_range - select_to = selection_to - -class Frame(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = 0, - bg: str = ..., - border: float | str = 0, - borderwidth: float | str = 0, - class_: str = "Frame", # can't be changed with configure() - colormap: Literal["new", ""] | Misc = "", # can't be changed with configure() - container: bool = False, # can't be changed with configure() - cursor: _Cursor = "", - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - name: str = ..., - padx: float | str = 0, - pady: float | str = 0, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - visual: str | tuple[str, int] = "", # can't be changed with configure() - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Label(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center", - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = "", - border: float | str = ..., - borderwidth: float | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = "none", - cursor: _Cursor = "", - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - image: _Image | str = "", - justify: Literal["left", "center", "right"] = "center", - name: str = ..., - padx: float | str = 1, - pady: float | str = 1, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - text: float | str = "", - textvariable: Variable = ..., - underline: int = -1, - width: float | str = 0, - wraplength: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - cursor: _Cursor = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - image: _Image | str = ..., - justify: Literal["left", "center", "right"] = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - underline: int = ..., - width: float | str = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Listbox(Widget, XView, YView): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activestyle: Literal["dotbox", "none", "underline"] = ..., - background: str = ..., - bd: float | str = 1, - bg: str = ..., - border: float | str = 1, - borderwidth: float | str = 1, - cursor: _Cursor = "", - disabledforeground: str = ..., - exportselection: bool | Literal[0, 1] = 1, - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: int = 10, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - justify: Literal["left", "center", "right"] = "left", - # There's no tkinter.ListVar, but seems like bare tkinter.Variable - # actually works for this: - # - # >>> import tkinter - # >>> lb = tkinter.Listbox() - # >>> var = lb['listvariable'] = tkinter.Variable() - # >>> var.set(['foo', 'bar', 'baz']) - # >>> lb.get(0, 'end') - # ('foo', 'bar', 'baz') - listvariable: Variable = ..., - name: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = 0, - selectforeground: str = ..., - # from listbox man page: "The value of the [selectmode] option may be - # arbitrary, but the default bindings expect it to be either single, - # browse, multiple, or extended" - # - # I have never seen anyone setting this to something else than what - # "the default bindings expect", but let's support it anyway. - selectmode: str | Literal["single", "browse", "multiple", "extended"] = "browse", # noqa: Y051 - setgrid: bool = False, - state: Literal["normal", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - width: int = 20, - xscrollcommand: str | Callable[[float, float], object] = "", - yscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activestyle: Literal["dotbox", "none", "underline"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - disabledforeground: str = ..., - exportselection: bool = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: int = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - justify: Literal["left", "center", "right"] = ..., - listvariable: Variable = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - selectmode: str | Literal["single", "browse", "multiple", "extended"] = ..., # noqa: Y051 - setgrid: bool = ..., - state: Literal["normal", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - yscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def activate(self, index: str | int) -> None: ... - def bbox(self, index: str | int) -> tuple[int, int, int, int] | None: ... # type: ignore[override] - def curselection(self): ... - def delete(self, first: str | int, last: str | int | None = None) -> None: ... - def get(self, first: str | int, last: str | int | None = None): ... - def index(self, index: str | int) -> int: ... - def insert(self, index: str | int, *elements: str | float) -> None: ... - def nearest(self, y): ... - def scan_mark(self, x, y) -> None: ... - def scan_dragto(self, x, y) -> None: ... - def see(self, index: str | int) -> None: ... - def selection_anchor(self, index: str | int) -> None: ... - select_anchor = selection_anchor - def selection_clear(self, first: str | int, last: str | int | None = None) -> None: ... # type: ignore[override] - select_clear = selection_clear - def selection_includes(self, index: str | int): ... - select_includes = selection_includes - def selection_set(self, first: str | int, last: str | int | None = None) -> None: ... - select_set = selection_set - def size(self) -> int: ... # type: ignore[override] - def itemcget(self, index: str | int, option): ... - def itemconfigure(self, index: str | int, cnf=None, **kw): ... - itemconfig = itemconfigure - -class Menu(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeborderwidth: float | str = ..., - activeforeground: str = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = "arrow", - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - name: str = ..., - postcommand: Callable[[], object] | str = "", - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectcolor: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - tearoff: bool | Literal[0, 1] = 1, - # I guess tearoffcommand arguments are supposed to be widget objects, - # but they are widget name strings. Use nametowidget() to handle the - # arguments of tearoffcommand. - tearoffcommand: Callable[[str, str], object] | str = "", - title: str = "", - type: Literal["menubar", "tearoff", "normal"] = "normal", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeborderwidth: float | str = ..., - activeforeground: str = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - postcommand: Callable[[], object] | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectcolor: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - tearoff: bool = ..., - tearoffcommand: Callable[[str, str], object] | str = ..., - title: str = ..., - type: Literal["menubar", "tearoff", "normal"] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def tk_popup(self, x: int, y: int, entry: str | int = "") -> None: ... - def activate(self, index: str | int) -> None: ... - def add(self, itemType, cnf={}, **kw): ... # docstring says "Internal function." - def insert(self, index, itemType, cnf={}, **kw): ... # docstring says "Internal function." - def add_cascade( - self, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - label: str = ..., - menu: Menu = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - ) -> None: ... - def add_checkbutton( - self, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - label: str = ..., - offvalue: Any = ..., - onvalue: Any = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - variable: Variable = ..., - ) -> None: ... - def add_command( - self, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - label: str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - ) -> None: ... - def add_radiobutton( - self, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - label: str = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - value: Any = ..., - variable: Variable = ..., - ) -> None: ... - def add_separator(self, cnf: dict[str, Any] | None = {}, *, background: str = ...) -> None: ... - def insert_cascade( - self, - index: str | int, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - label: str = ..., - menu: Menu = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - ) -> None: ... - def insert_checkbutton( - self, - index: str | int, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - label: str = ..., - offvalue: Any = ..., - onvalue: Any = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - variable: Variable = ..., - ) -> None: ... - def insert_command( - self, - index: str | int, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - label: str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - ) -> None: ... - def insert_radiobutton( - self, - index: str | int, - cnf: dict[str, Any] | None = {}, - *, - accelerator: str = ..., - activebackground: str = ..., - activeforeground: str = ..., - background: str = ..., - bitmap: str = ..., - columnbreak: int = ..., - command: Callable[[], object] | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - font: _FontDescription = ..., - foreground: str = ..., - hidemargin: bool = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - label: str = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - underline: int = ..., - value: Any = ..., - variable: Variable = ..., - ) -> None: ... - def insert_separator(self, index: str | int, cnf: dict[str, Any] | None = {}, *, background: str = ...) -> None: ... - def delete(self, index1: str | int, index2: str | int | None = None) -> None: ... - def entrycget(self, index: str | int, option: str) -> Any: ... - def entryconfigure( - self, index: str | int, cnf: dict[str, Any] | None = None, **kw: Any - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - entryconfig = entryconfigure - def index(self, index: str | int) -> int | None: ... - def invoke(self, index: str | int) -> Any: ... - def post(self, x: int, y: int) -> None: ... - def type(self, index: str | int) -> Literal["cascade", "checkbutton", "command", "radiobutton", "separator"]: ... - def unpost(self) -> None: ... - def xposition(self, index: str | int) -> int: ... - def yposition(self, index: str | int) -> int: ... - -class Menubutton(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = "", - border: float | str = ..., - borderwidth: float | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = "none", - cursor: _Cursor = "", - direction: Literal["above", "below", "left", "right", "flush"] = "below", - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - image: _Image | str = "", - indicatoron: bool = ..., - justify: Literal["left", "center", "right"] = ..., - menu: Menu = ..., - name: str = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - text: float | str = "", - textvariable: Variable = ..., - underline: int = -1, - width: float | str = 0, - wraplength: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - cursor: _Cursor = ..., - direction: Literal["above", "below", "left", "right", "flush"] = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - justify: Literal["left", "center", "right"] = ..., - menu: Menu = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - underline: int = ..., - width: float | str = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Message(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center", - aspect: int = 150, - background: str = ..., - bd: float | str = 1, - bg: str = ..., - border: float | str = 1, - borderwidth: float | str = 1, - cursor: _Cursor = "", - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - justify: Literal["left", "center", "right"] = "left", - name: str = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - text: float | str = "", - textvariable: Variable = ..., - # there's width but no height - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - aspect: int = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - justify: Literal["left", "center", "right"] = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Radiobutton(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center", - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = "", - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[], Any] = "", - compound: Literal["top", "left", "center", "right", "bottom", "none"] = "none", - cursor: _Cursor = "", - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 1, - image: _Image | str = "", - indicatoron: bool = True, - justify: Literal["left", "center", "right"] = "center", - name: str = ..., - offrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = "", - padx: float | str = 1, - pady: float | str = 1, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - selectcolor: str = ..., - selectimage: _Image | str = "", - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - text: float | str = "", - textvariable: Variable = ..., - tristateimage: _Image | str = "", - tristatevalue: Any = "", - underline: int = -1, - value: Any = "", - variable: Variable | Literal[""] = ..., - width: float | str = 0, - wraplength: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activeforeground: str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bitmap: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[], Any] = ..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - cursor: _Cursor = ..., - disabledforeground: str = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - image: _Image | str = ..., - indicatoron: bool = ..., - justify: Literal["left", "center", "right"] = ..., - offrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - overrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove", ""] = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectcolor: str = ..., - selectimage: _Image | str = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: Variable = ..., - tristateimage: _Image | str = ..., - tristatevalue: Any = ..., - underline: int = ..., - value: Any = ..., - variable: Variable | Literal[""] = ..., - width: float | str = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def deselect(self) -> None: ... - def flash(self) -> None: ... - def invoke(self) -> Any: ... - def select(self) -> None: ... - -class Scale(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - background: str = ..., - bd: float | str = 1, - bg: str = ..., - bigincrement: float = 0.0, - border: float | str = 1, - borderwidth: float | str = 1, - # don't know why the callback gets string instead of float - command: str | Callable[[str], object] = "", - cursor: _Cursor = "", - digits: int = 0, - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - from_: float = 0.0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - label: str = "", - length: float | str = 100, - name: str = ..., - orient: Literal["horizontal", "vertical"] = "vertical", - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - repeatdelay: int = 300, - repeatinterval: int = 100, - resolution: float = 1.0, - showvalue: bool = True, - sliderlength: float | str = 30, - sliderrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "raised", - state: Literal["normal", "active", "disabled"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - tickinterval: float = 0.0, - to: float = 100.0, - troughcolor: str = ..., - variable: IntVar | DoubleVar = ..., - width: float | str = 15, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - bigincrement: float = ..., - border: float | str = ..., - borderwidth: float | str = ..., - command: str | Callable[[str], object] = ..., - cursor: _Cursor = ..., - digits: int = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - from_: float = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - label: str = ..., - length: float | str = ..., - orient: Literal["horizontal", "vertical"] = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = ..., - repeatinterval: int = ..., - resolution: float = ..., - showvalue: bool = ..., - sliderlength: float | str = ..., - sliderrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - state: Literal["normal", "active", "disabled"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - tickinterval: float = ..., - to: float = ..., - troughcolor: str = ..., - variable: IntVar | DoubleVar = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def get(self) -> float: ... - def set(self, value) -> None: ... - def coords(self, value: float | None = None) -> tuple[int, int]: ... - def identify(self, x, y) -> Literal["", "slider", "trough1", "trough2"]: ... - -class Scrollbar(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - activerelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "raised", - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - # There are many ways how the command may get called. Search for - # 'SCROLLING COMMANDS' in scrollbar man page. There doesn't seem to - # be any way to specify an overloaded callback function, so we say - # that it can take any args while it can't in reality. - command: Callable[..., tuple[float, float] | None] | str = "", - cursor: _Cursor = "", - elementborderwidth: float | str = -1, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - jump: bool = False, - name: str = ..., - orient: Literal["horizontal", "vertical"] = "vertical", - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = 300, - repeatinterval: int = 100, - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - troughcolor: str = ..., - width: float | str = ..., - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - activerelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - command: Callable[..., tuple[float, float] | None] | str = ..., - cursor: _Cursor = ..., - elementborderwidth: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - jump: bool = ..., - orient: Literal["horizontal", "vertical"] = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = ..., - repeatinterval: int = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - troughcolor: str = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def activate(self, index=None): ... - def delta(self, deltax: int, deltay: int) -> float: ... - def fraction(self, x: int, y: int) -> float: ... - def identify(self, x: int, y: int) -> Literal["arrow1", "arrow2", "slider", "trough1", "trough2", ""]: ... - def get(self) -> tuple[float, float, float, float] | tuple[float, float]: ... - def set(self, first: float | str, last: float | str) -> None: ... - -_WhatToCount: TypeAlias = Literal[ - "chars", "displaychars", "displayindices", "displaylines", "indices", "lines", "xpixels", "ypixels" -] - -class Text(Widget, XView, YView): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - autoseparators: bool = True, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - blockcursor: bool = False, - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = "xterm", - endline: int | Literal[""] = "", - exportselection: bool = True, - fg: str = ..., - font: _FontDescription = "TkFixedFont", - foreground: str = ..., - # width is always int, but height is allowed to be screen units. - # This doesn't make any sense to me, and this isn't documented. - # The docs seem to say that both should be integers. - height: float | str = 24, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - inactiveselectbackground: str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = 0, - insertofftime: int = 300, - insertontime: int = 600, - insertunfocussed: Literal["none", "hollow", "solid"] = "none", - insertwidth: float | str = ..., - maxundo: int = 0, - name: str = ..., - padx: float | str = 1, - pady: float | str = 1, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - setgrid: bool = False, - spacing1: float | str = 0, - spacing2: float | str = 0, - spacing3: float | str = 0, - startline: int | Literal[""] = "", - state: Literal["normal", "disabled"] = "normal", - # Literal inside Tuple doesn't actually work - tabs: float | str | tuple[float | str, ...] = "", - tabstyle: Literal["tabular", "wordprocessor"] = "tabular", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - undo: bool = False, - width: int = 80, - wrap: Literal["none", "char", "word"] = "char", - xscrollcommand: str | Callable[[float, float], object] = "", - yscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - autoseparators: bool = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - blockcursor: bool = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - endline: int | Literal[""] = ..., - exportselection: bool = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - inactiveselectbackground: str = ..., - insertbackground: str = ..., - insertborderwidth: float | str = ..., - insertofftime: int = ..., - insertontime: int = ..., - insertunfocussed: Literal["none", "hollow", "solid"] = ..., - insertwidth: float | str = ..., - maxundo: int = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - setgrid: bool = ..., - spacing1: float | str = ..., - spacing2: float | str = ..., - spacing3: float | str = ..., - startline: int | Literal[""] = ..., - state: Literal["normal", "disabled"] = ..., - tabs: float | str | tuple[float | str, ...] = ..., - tabstyle: Literal["tabular", "wordprocessor"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - undo: bool = ..., - width: int = ..., - wrap: Literal["none", "char", "word"] = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - yscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def bbox(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> tuple[int, int, int, int] | None: ... # type: ignore[override] - def compare( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - op: Literal["<", "<=", "==", ">=", ">", "!="], - index2: str | float | _tkinter.Tcl_Obj | Widget, - ) -> bool: ... - - if sys.version_info >= (3, 13): - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - *, - return_ints: Literal[True], - ) -> int: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg: _WhatToCount | Literal["update"], - /, - *, - return_ints: Literal[True], - ) -> int: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: Literal["update"], - arg2: _WhatToCount, - /, - *, - return_ints: Literal[True], - ) -> int: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: Literal["update"], - /, - *, - return_ints: Literal[True], - ) -> int: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: _WhatToCount, - /, - *, - return_ints: Literal[True], - ) -> tuple[int, int]: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount | Literal["update"], - arg2: _WhatToCount | Literal["update"], - arg3: _WhatToCount | Literal["update"], - /, - *args: _WhatToCount | Literal["update"], - return_ints: Literal[True], - ) -> tuple[int, ...]: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - *, - return_ints: Literal[False] = False, - ) -> tuple[int] | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg: _WhatToCount | Literal["update"], - /, - *, - return_ints: Literal[False] = False, - ) -> tuple[int] | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: Literal["update"], - arg2: _WhatToCount, - /, - *, - return_ints: Literal[False] = False, - ) -> int | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: Literal["update"], - /, - *, - return_ints: Literal[False] = False, - ) -> int | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: _WhatToCount, - /, - *, - return_ints: Literal[False] = False, - ) -> tuple[int, int]: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount | Literal["update"], - arg2: _WhatToCount | Literal["update"], - arg3: _WhatToCount | Literal["update"], - /, - *args: _WhatToCount | Literal["update"], - return_ints: Literal[False] = False, - ) -> tuple[int, ...]: ... - else: - @overload - def count( - self, index1: str | float | _tkinter.Tcl_Obj | Widget, index2: str | float | _tkinter.Tcl_Obj | Widget - ) -> tuple[int] | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg: _WhatToCount | Literal["update"], - /, - ) -> tuple[int] | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: Literal["update"], - arg2: _WhatToCount, - /, - ) -> int | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: Literal["update"], - /, - ) -> int | None: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount, - arg2: _WhatToCount, - /, - ) -> tuple[int, int]: ... - @overload - def count( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - arg1: _WhatToCount | Literal["update"], - arg2: _WhatToCount | Literal["update"], - arg3: _WhatToCount | Literal["update"], - /, - *args: _WhatToCount | Literal["update"], - ) -> tuple[int, ...]: ... - - @overload - def debug(self, boolean: None = None) -> bool: ... - @overload - def debug(self, boolean: bool) -> None: ... - - def delete( - self, index1: str | float | _tkinter.Tcl_Obj | Widget, index2: str | float | _tkinter.Tcl_Obj | Widget | None = None - ) -> None: ... - def dlineinfo(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> tuple[int, int, int, int, int] | None: ... - - @overload - def dump( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None = None, - command: None = None, - *, - all: bool = ..., - image: bool = ..., - mark: bool = ..., - tag: bool = ..., - text: bool = ..., - window: bool = ..., - ) -> list[tuple[str, str, str]]: ... - @overload - def dump( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None, - command: Callable[[str, str, str], object] | str, - *, - all: bool = ..., - image: bool = ..., - mark: bool = ..., - tag: bool = ..., - text: bool = ..., - window: bool = ..., - ) -> None: ... - @overload - def dump( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None = None, - *, - command: Callable[[str, str, str], object] | str, - all: bool = ..., - image: bool = ..., - mark: bool = ..., - tag: bool = ..., - text: bool = ..., - window: bool = ..., - ) -> None: ... - - def edit(self, *args): ... # docstring says "Internal method" - - @overload - def edit_modified(self, arg: None = None) -> bool: ... # actually returns Literal[0, 1] - @overload - def edit_modified(self, arg: bool) -> None: ... # actually returns empty string - - def edit_redo(self) -> None: ... # actually returns empty string - def edit_reset(self) -> None: ... # actually returns empty string - def edit_separator(self) -> None: ... # actually returns empty string - def edit_undo(self) -> None: ... # actually returns empty string - def get( - self, index1: str | float | _tkinter.Tcl_Obj | Widget, index2: str | float | _tkinter.Tcl_Obj | Widget | None = None - ) -> str: ... - - @overload - def image_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["image", "name"]) -> str: ... - @overload - def image_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["padx", "pady"]) -> int: ... - @overload - def image_cget( - self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["align"] - ) -> Literal["baseline", "bottom", "center", "top"]: ... - @overload - def image_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: str) -> Any: ... - - @overload - def image_configure( - self, index: str | float | _tkinter.Tcl_Obj | Widget, cnf: str - ) -> tuple[str, str, str, str, str | int]: ... - @overload - def image_configure( - self, - index: str | float | _tkinter.Tcl_Obj | Widget, - cnf: dict[str, Any] | None = None, - *, - align: Literal["baseline", "bottom", "center", "top"] = ..., - image: _Image | str = ..., - name: str = ..., - padx: float | str = ..., - pady: float | str = ..., - ) -> dict[str, tuple[str, str, str, str, str | int]] | None: ... - - def image_create( - self, - index: str | float | _tkinter.Tcl_Obj | Widget, - cnf: dict[str, Any] | None = {}, - *, - align: Literal["baseline", "bottom", "center", "top"] = ..., - image: _Image | str = ..., - name: str = ..., - padx: float | str = ..., - pady: float | str = ..., - ) -> str: ... - def image_names(self) -> tuple[str, ...]: ... - def index(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> str: ... - def insert( - self, index: str | float | _tkinter.Tcl_Obj | Widget, chars: str, *args: str | list[str] | tuple[str, ...] - ) -> None: ... - - @overload - def mark_gravity(self, markName: str, direction: None = None) -> Literal["left", "right"]: ... - @overload - def mark_gravity(self, markName: str, direction: Literal["left", "right"]) -> None: ... # actually returns empty string - - def mark_names(self) -> tuple[str, ...]: ... - def mark_set(self, markName: str, index: str | float | _tkinter.Tcl_Obj | Widget) -> None: ... - def mark_unset(self, *markNames: str) -> None: ... - def mark_next(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> str | None: ... - def mark_previous(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> str | None: ... - # **kw of peer_create is same as the kwargs of Text.__init__ - def peer_create(self, newPathName: str | Text, cnf: dict[str, Any] = {}, **kw) -> None: ... - def peer_names(self) -> tuple[_tkinter.Tcl_Obj, ...]: ... - def replace( - self, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget, - chars: str, - *args: str | list[str] | tuple[str, ...], - ) -> None: ... - def scan_mark(self, x: int, y: int) -> None: ... - def scan_dragto(self, x: int, y: int) -> None: ... - if sys.version_info >= (3, 15): - def search( - self, - pattern: str, - index: str | float | _tkinter.Tcl_Obj | Widget, - stopindex: str | float | _tkinter.Tcl_Obj | Widget | None = None, - forwards: bool | None = None, - backwards: bool | None = None, - exact: bool | None = None, - regexp: bool | None = None, - nocase: bool | None = None, - count: Variable | None = None, - elide: bool | None = None, - *, - nolinestop: bool | None = None, - strictlimits: bool | None = None, - ) -> str: ... # returns empty string for not found - def search_all( - self, - pattern: str, - index: str | float | _tkinter.Tcl_Obj | Widget, - stopindex: str | float | _tkinter.Tcl_Obj | Widget | None = None, - *, - forwards: bool | None = None, - backwards: bool | None = None, - exact: bool | None = None, - regexp: bool | None = None, - nocase: bool | None = None, - count: Variable | None = None, - elide: bool | None = None, - nolinestop: bool | None = None, - overlap: bool | None = None, - strictlimits: bool | None = None, - ) -> tuple[_tkinter.Tcl_Obj, ...]: ... - else: - def search( - self, - pattern: str, - index: str | float | _tkinter.Tcl_Obj | Widget, - stopindex: str | float | _tkinter.Tcl_Obj | Widget | None = None, - forwards: bool | None = None, - backwards: bool | None = None, - exact: bool | None = None, - regexp: bool | None = None, - nocase: bool | None = None, - count: Variable | None = None, - elide: bool | None = None, - ) -> str: ... # returns empty string for not found - - def see(self, index: str | float | _tkinter.Tcl_Obj | Widget) -> None: ... - def tag_add( - self, tagName: str, index1: str | float | _tkinter.Tcl_Obj | Widget, *args: str | float | _tkinter.Tcl_Obj | Widget - ) -> None: ... - - # tag_bind stuff is very similar to Canvas - @overload - def tag_bind( - self, - tagName: str, - sequence: str | None, - func: Callable[[Event[Text]], object] | None, - add: Literal["", "+"] | bool | None = None, - ) -> str: ... - @overload - def tag_bind(self, tagName: str, sequence: str | None, func: str, add: Literal["", "+"] | bool | None = None) -> None: ... - - def tag_unbind(self, tagName: str, sequence: str, funcid: str | None = None) -> None: ... - # allowing any string for cget instead of just Literals because there's no other way to look up tag options - def tag_cget(self, tagName: str, option: str): ... - - @overload - def tag_configure( - self, - tagName: str, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bgstipple: str = ..., - borderwidth: float | str = ..., - border: float | str = ..., # alias for borderwidth - elide: bool = ..., - fgstipple: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - justify: Literal["left", "right", "center"] = ..., - lmargin1: float | str = ..., - lmargin2: float | str = ..., - lmargincolor: str = ..., - offset: float | str = ..., - overstrike: bool = ..., - overstrikefg: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - rmargin: float | str = ..., - rmargincolor: str = ..., - selectbackground: str = ..., - selectforeground: str = ..., - spacing1: float | str = ..., - spacing2: float | str = ..., - spacing3: float | str = ..., - tabs: Any = ..., # the exact type is kind of complicated, see manual page - tabstyle: Literal["tabular", "wordprocessor"] = ..., - underline: bool = ..., - underlinefg: str = ..., - wrap: Literal["none", "char", "word"] = ..., # be careful with "none" vs None - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def tag_configure(self, tagName: str, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - tag_config = tag_configure - def tag_delete(self, first_tag_name: str, /, *tagNames: str) -> None: ... # error if no tag names given - def tag_lower(self, tagName: str, belowThis: str | None = None) -> None: ... - def tag_names(self, index: str | float | _tkinter.Tcl_Obj | Widget | None = None) -> tuple[str, ...]: ... - def tag_nextrange( - self, - tagName: str, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None = None, - ) -> tuple[str, str] | tuple[()]: ... - def tag_prevrange( - self, - tagName: str, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None = None, - ) -> tuple[str, str] | tuple[()]: ... - def tag_raise(self, tagName: str, aboveThis: str | None = None) -> None: ... - def tag_ranges(self, tagName: str) -> tuple[_tkinter.Tcl_Obj, ...]: ... - # tag_remove and tag_delete are different - def tag_remove( - self, - tagName: str, - index1: str | float | _tkinter.Tcl_Obj | Widget, - index2: str | float | _tkinter.Tcl_Obj | Widget | None = None, - ) -> None: ... - - @overload - def window_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["padx", "pady"]) -> int: ... - @overload - def window_cget( - self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["stretch"] - ) -> bool: ... # actually returns Literal[0, 1] - @overload - def window_cget( - self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["align"] - ) -> Literal["baseline", "bottom", "center", "top"]: ... - @overload # window is set to a widget, but read as the string name. - def window_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: Literal["create", "window"]) -> str: ... - @overload - def window_cget(self, index: str | float | _tkinter.Tcl_Obj | Widget, option: str) -> Any: ... - - @overload - def window_configure( - self, index: str | float | _tkinter.Tcl_Obj | Widget, cnf: str - ) -> tuple[str, str, str, str, str | int]: ... - @overload - def window_configure( - self, - index: str | float | _tkinter.Tcl_Obj | Widget, - cnf: dict[str, Any] | None = None, - *, - align: Literal["baseline", "bottom", "center", "top"] = ..., - create: str = ..., - padx: float | str = ..., - pady: float | str = ..., - stretch: bool | Literal[0, 1] = ..., - window: Misc | str = ..., - ) -> dict[str, tuple[str, str, str, str, str | int]] | None: ... - - window_config = window_configure - def window_create( - self, - index: str | float | _tkinter.Tcl_Obj | Widget, - cnf: dict[str, Any] | None = {}, - *, - align: Literal["baseline", "bottom", "center", "top"] = ..., - create: str = ..., - padx: float | str = ..., - pady: float | str = ..., - stretch: bool | Literal[0, 1] = ..., - window: Misc | str = ..., - ) -> None: ... - def window_names(self) -> tuple[str, ...]: ... - def yview_pickplace(self, *what): ... # deprecated - -class _setit: - def __init__(self, var, value, callback=None) -> None: ... - def __call__(self, *args) -> None: ... - -# manual page: tk_optionMenu -class OptionMenu(Menubutton): - menuname: Incomplete - if sys.version_info >= (3, 14): - def __init__( - # differs from other widgets - self, - master: Misc | None, - variable: StringVar, - value: str, - *values: str, - command: Callable[[StringVar], object] | None = ..., - name: str | None = None, - ) -> None: ... - else: - def __init__( - # differs from other widgets - self, - master: Misc | None, - variable: StringVar, - value: str, - *values: str, - command: Callable[[StringVar], object] | None = ..., - ) -> None: ... - # configure, config, cget are inherited from Menubutton - # destroy and __getitem__ are overridden, signature does not change - -# This matches tkinter's image classes (PhotoImage and BitmapImage) -# and PIL's tkinter-compatible class (PIL.ImageTk.PhotoImage), -# but not a plain PIL image that isn't tkinter compatible. -# The reason is that PIL has width and height attributes, not methods. -@type_check_only -class _Image(Protocol): - def width(self) -> int: ... - def height(self) -> int: ... - -@type_check_only -class _BitmapImageLike(_Image): ... - -@type_check_only -class _PhotoImageLike(_Image): ... - -class Image(_Image): - name: Incomplete - tk: _tkinter.TkappType - def __init__(self, imgtype, name=None, cnf={}, master: Misc | _tkinter.TkappType | None = None, **kw) -> None: ... - def __del__(self) -> None: ... - def __setitem__(self, key, value) -> None: ... - def __getitem__(self, key): ... - configure: Incomplete - config: Incomplete - def type(self): ... - -class PhotoImage(Image, _PhotoImageLike): - # This should be kept in sync with PIL.ImageTK.PhotoImage.__init__() - def __init__( - self, - name: str | None = None, - cnf: dict[str, Any] = {}, - master: Misc | _tkinter.TkappType | None = None, - *, - data: str | bytes = ..., # not same as data argument of put() - format: str = ..., - file: StrOrBytesPath = ..., - gamma: float = ..., - height: int = ..., - palette: int | str = ..., - width: int = ..., - ) -> None: ... - def configure( - self, - *, - data: str | bytes = ..., - format: str = ..., - file: StrOrBytesPath = ..., - gamma: float = ..., - height: int = ..., - palette: int | str = ..., - width: int = ..., - ) -> None: ... - config = configure - def blank(self) -> None: ... - def cget(self, option: str) -> str: ... - def __getitem__(self, key: str) -> str: ... # always string: image['height'] can be '0' - if sys.version_info >= (3, 13): - def copy( - self, - *, - from_coords: Iterable[int] | None = None, - zoom: int | tuple[int, int] | list[int] | None = None, - subsample: int | tuple[int, int] | list[int] | None = None, - ) -> PhotoImage: ... - def subsample(self, x: int, y: int | Literal[""] = "", *, from_coords: Iterable[int] | None = None) -> PhotoImage: ... - def zoom(self, x: int, y: int | Literal[""] = "", *, from_coords: Iterable[int] | None = None) -> PhotoImage: ... - def copy_replace( - self, - sourceImage: PhotoImage | str, - *, - from_coords: Iterable[int] | None = None, - to: Iterable[int] | None = None, - shrink: bool = False, - zoom: int | tuple[int, int] | list[int] | None = None, - subsample: int | tuple[int, int] | list[int] | None = None, - # `None` defaults to overlay. - compositingrule: Literal["overlay", "set"] | None = None, - ) -> None: ... - else: - def copy(self) -> PhotoImage: ... - def zoom(self, x: int, y: int | Literal[""] = "") -> PhotoImage: ... - def subsample(self, x: int, y: int | Literal[""] = "") -> PhotoImage: ... - - def get(self, x: int, y: int) -> tuple[int, int, int]: ... - def put( - self, - data: ( - str - | bytes - | list[str] - | list[list[str]] - | list[tuple[str, ...]] - | tuple[str, ...] - | tuple[list[str], ...] - | tuple[tuple[str, ...], ...] - ), - to: tuple[int, int] | tuple[int, int, int, int] | None = None, - ) -> None: ... - if sys.version_info >= (3, 13): - def read( - self, - filename: StrOrBytesPath, - format: str | None = None, - *, - from_coords: Iterable[int] | None = None, - to: Iterable[int] | None = None, - shrink: bool = False, - ) -> None: ... - def write( - self, - filename: StrOrBytesPath, - format: str | None = None, - from_coords: Iterable[int] | None = None, - *, - background: str | None = None, - grayscale: bool = False, - ) -> None: ... - - @overload - def data( - self, format: str, *, from_coords: Iterable[int] | None = None, background: str | None = None, grayscale: bool = False - ) -> bytes: ... - @overload - def data( - self, - format: None = None, - *, - from_coords: Iterable[int] | None = None, - background: str | None = None, - grayscale: bool = False, - ) -> tuple[str, ...]: ... - - else: - def write( - self, filename: StrOrBytesPath, format: str | None = None, from_coords: tuple[int, int] | None = None - ) -> None: ... - - def transparency_get(self, x: int, y: int) -> bool: ... - def transparency_set(self, x: int, y: int, boolean: bool) -> None: ... - -class BitmapImage(Image, _BitmapImageLike): - # This should be kept in sync with PIL.ImageTK.BitmapImage.__init__() - def __init__( - self, - name=None, - cnf: dict[str, Any] = {}, - master: Misc | _tkinter.TkappType | None = None, - *, - background: str = ..., - data: str | bytes = ..., - file: StrOrBytesPath = ..., - foreground: str = ..., - maskdata: str = ..., - maskfile: StrOrBytesPath = ..., - ) -> None: ... - -def image_names() -> tuple[str, ...]: ... -def image_types() -> tuple[str, ...]: ... - -class Spinbox(Widget, XView): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - activebackground: str = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - buttonbackground: str = ..., - buttoncursor: _Cursor = "", - buttondownrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - buttonuprelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - # percent substitutions don't seem to be supported, it's similar to Entry's validation stuff - command: Callable[[], object] | str | list[str] | tuple[str, ...] = "", - cursor: _Cursor = "xterm", - disabledbackground: str = ..., - disabledforeground: str = ..., - exportselection: bool = True, - fg: str = ..., - font: _FontDescription = "TkTextFont", - foreground: str = ..., - format: str = "", - from_: float = 0.0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - increment: float = 1.0, - insertbackground: str = ..., - insertborderwidth: float | str = 0, - insertofftime: int = 300, - insertontime: int = 600, - insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - justify: Literal["left", "center", "right"] = "left", - name: str = ..., - readonlybackground: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "sunken", - repeatdelay: int = 400, - repeatinterval: int = 100, - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - state: Literal["normal", "disabled", "readonly"] = "normal", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - textvariable: Variable = ..., - to: float = 0.0, - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = "none", - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - vcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - values: list[str] | tuple[str, ...] = ..., - width: int = 20, - wrap: bool = False, - xscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - activebackground: str = ..., - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - buttonbackground: str = ..., - buttoncursor: _Cursor = ..., - buttondownrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - buttonuprelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - command: Callable[[], object] | str | list[str] | tuple[str, ...] = ..., - cursor: _Cursor = ..., - disabledbackground: str = ..., - disabledforeground: str = ..., - exportselection: bool = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - format: str = ..., - from_: float = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - increment: float = ..., - insertbackground: str = ..., - insertborderwidth: float | str = ..., - insertofftime: int = ..., - insertontime: int = ..., - insertwidth: float | str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - invcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - readonlybackground: str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - repeatdelay: int = ..., - repeatinterval: int = ..., - selectbackground: str = ..., - selectborderwidth: float | str = ..., - selectforeground: str = ..., - state: Literal["normal", "disabled", "readonly"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: Variable = ..., - to: float = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - vcmd: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - values: list[str] | tuple[str, ...] = ..., - width: int = ..., - wrap: bool = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def bbox(self, index) -> tuple[int, int, int, int] | None: ... # type: ignore[override] - def delete(self, first, last=None) -> Literal[""]: ... - def get(self) -> str: ... - def icursor(self, index): ... - def identify(self, x: int, y: int) -> Literal["", "buttondown", "buttonup", "entry"]: ... - def index(self, index: str | int) -> int: ... - def insert(self, index: str | int, s: str) -> Literal[""]: ... - # spinbox.invoke("asdf") gives error mentioning .invoke("none"), but it's not documented - def invoke(self, element: Literal["none", "buttonup", "buttondown"]) -> Literal[""]: ... - def scan(self, *args): ... - def scan_mark(self, x): ... - def scan_dragto(self, x): ... - def selection(self, *args) -> tuple[int, ...]: ... - def selection_adjust(self, index): ... - def selection_clear(self): ... # type: ignore[override] - def selection_element(self, element=None): ... - def selection_from(self, index: int) -> None: ... - def selection_present(self) -> None: ... - def selection_range(self, start: int, end: int) -> None: ... - def selection_to(self, index: int) -> None: ... - -class LabelFrame(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = 2, - bg: str = ..., - border: float | str = 2, - borderwidth: float | str = 2, - class_: str = "Labelframe", # can't be changed with configure() - colormap: Literal["new", ""] | Misc = "", # can't be changed with configure() - container: bool = False, # undocumented, can't be changed with configure() - cursor: _Cursor = "", - fg: str = ..., - font: _FontDescription = "TkDefaultFont", - foreground: str = ..., - height: float | str = 0, - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = 0, - # 'ne' and 'en' are valid labelanchors, but only 'ne' is a valid _Anchor. - labelanchor: Literal["nw", "n", "ne", "en", "e", "es", "se", "s", "sw", "ws", "w", "wn"] = "nw", - labelwidget: Misc = ..., - name: str = ..., - padx: float | str = 0, - pady: float | str = 0, - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "groove", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = 0, - text: float | str = "", - visual: str | tuple[str, int] = "", # can't be changed with configure() - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - fg: str = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: float | str = ..., - highlightbackground: str = ..., - highlightcolor: str = ..., - highlightthickness: float | str = ..., - labelanchor: Literal["nw", "n", "ne", "en", "e", "es", "se", "s", "sw", "ws", "w", "wn"] = ..., - labelwidget: Misc = ..., - padx: float | str = ..., - pady: float | str = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class PanedWindow(Widget): - def __init__( - self, - master: Misc | None = None, - cnf: dict[str, Any] | None = {}, - *, - background: str = ..., - bd: float | str = 1, - bg: str = ..., - border: float | str = 1, - borderwidth: float | str = 1, - cursor: _Cursor = "", - handlepad: float | str = 8, - handlesize: float | str = 8, - height: float | str = "", - name: str = ..., - opaqueresize: bool = True, - orient: Literal["horizontal", "vertical"] = "horizontal", - proxybackground: str = "", - proxyborderwidth: float | str = 2, - proxyrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - sashcursor: _Cursor = "", - sashpad: float | str = 0, - sashrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = "flat", - sashwidth: float | str = 3, - showhandle: bool = False, - width: float | str = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - bd: float | str = ..., - bg: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - cursor: _Cursor = ..., - handlepad: float | str = ..., - handlesize: float | str = ..., - height: float | str = ..., - opaqueresize: bool = ..., - orient: Literal["horizontal", "vertical"] = ..., - proxybackground: str = ..., - proxyborderwidth: float | str = ..., - proxyrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - sashcursor: _Cursor = ..., - sashpad: float | str = ..., - sashrelief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - sashwidth: float | str = ..., - showhandle: bool = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def add(self, child: Widget, **kw) -> None: ... - def remove(self, child) -> None: ... - forget = remove # type: ignore[assignment] - def identify(self, x: int, y: int): ... - def proxy(self, *args) -> tuple[Incomplete, ...]: ... - def proxy_coord(self) -> tuple[Incomplete, ...]: ... - def proxy_forget(self) -> tuple[Incomplete, ...]: ... - def proxy_place(self, x, y) -> tuple[Incomplete, ...]: ... - def sash(self, *args) -> tuple[Incomplete, ...]: ... - def sash_coord(self, index) -> tuple[Incomplete, ...]: ... - def sash_mark(self, index) -> tuple[Incomplete, ...]: ... - def sash_place(self, index, x, y) -> tuple[Incomplete, ...]: ... - def panecget(self, child, option): ... - def paneconfigure(self, tagOrId, cnf=None, **kw): ... - paneconfig = paneconfigure - def panes(self): ... - -def _test() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/colorchooser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/colorchooser.vpi deleted file mode 100644 index d0d6de84..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/colorchooser.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from tkinter import Misc -from tkinter.commondialog import Dialog -from typing import ClassVar - -__all__ = ["Chooser", "askcolor"] - -class Chooser(Dialog): - command: ClassVar[str] - -def askcolor( - color: str | bytes | None = None, *, initialcolor: str = ..., parent: Misc = ..., title: str = ... -) -> tuple[None, None] | tuple[tuple[int, int, int], str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/commondialog.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/commondialog.vpi deleted file mode 100644 index 6dba6bd6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/commondialog.vpi +++ /dev/null @@ -1,14 +0,0 @@ -from collections.abc import Mapping -from tkinter import Misc -from typing import Any, ClassVar - -__all__ = ["Dialog"] - -class Dialog: - command: ClassVar[str | None] - master: Misc | None - # Types of options are very dynamic. They depend on the command and are - # sometimes changed to a different type. - options: Mapping[str, Any] - def __init__(self, master: Misc | None = None, **options: Any) -> None: ... - def show(self, **options: Any) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/constants.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/constants.vpi deleted file mode 100644 index eb1ef446..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/constants.vpi +++ /dev/null @@ -1,80 +0,0 @@ -from typing import Final - -# These are not actually bools. See #4669 -YES: Final = True -NO: Final = False -TRUE: Final = True -FALSE: Final = False -ON: Final = True -OFF: Final = False -N: Final = "n" -S: Final = "s" -W: Final = "w" -E: Final = "e" -NW: Final = "nw" -SW: Final = "sw" -NE: Final = "ne" -SE: Final = "se" -NS: Final = "ns" -EW: Final = "ew" -NSEW: Final = "nsew" -CENTER: Final = "center" -NONE: Final = "none" -X: Final = "x" -Y: Final = "y" -BOTH: Final = "both" -LEFT: Final = "left" -TOP: Final = "top" -RIGHT: Final = "right" -BOTTOM: Final = "bottom" -RAISED: Final = "raised" -SUNKEN: Final = "sunken" -FLAT: Final = "flat" -RIDGE: Final = "ridge" -GROOVE: Final = "groove" -SOLID: Final = "solid" -HORIZONTAL: Final = "horizontal" -VERTICAL: Final = "vertical" -NUMERIC: Final = "numeric" -CHAR: Final = "char" -WORD: Final = "word" -BASELINE: Final = "baseline" -INSIDE: Final = "inside" -OUTSIDE: Final = "outside" -SEL: Final = "sel" -SEL_FIRST: Final = "sel.first" -SEL_LAST: Final = "sel.last" -END: Final = "end" -INSERT: Final = "insert" -CURRENT: Final = "current" -ANCHOR: Final = "anchor" -ALL: Final = "all" -NORMAL: Final = "normal" -DISABLED: Final = "disabled" -ACTIVE: Final = "active" -HIDDEN: Final = "hidden" -CASCADE: Final = "cascade" -CHECKBUTTON: Final = "checkbutton" -COMMAND: Final = "command" -RADIOBUTTON: Final = "radiobutton" -SEPARATOR: Final = "separator" -SINGLE: Final = "single" -BROWSE: Final = "browse" -MULTIPLE: Final = "multiple" -EXTENDED: Final = "extended" -DOTBOX: Final = "dotbox" -UNDERLINE: Final = "underline" -PIESLICE: Final = "pieslice" -CHORD: Final = "chord" -ARC: Final = "arc" -FIRST: Final = "first" -LAST: Final = "last" -BUTT: Final = "butt" -PROJECTING: Final = "projecting" -ROUND: Final = "round" -BEVEL: Final = "bevel" -MITER: Final = "miter" -MOVETO: Final = "moveto" -SCROLL: Final = "scroll" -UNITS: Final = "units" -PAGES: Final = "pages" diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dialog.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dialog.vpi deleted file mode 100644 index 971b64f0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dialog.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from collections.abc import Mapping -from tkinter import Widget -from typing import Any, Final - -__all__ = ["Dialog"] - -DIALOG_ICON: Final = "questhead" - -class Dialog(Widget): - widgetName: str - num: int - def __init__(self, master=None, cnf: Mapping[str, Any] = {}, **kw) -> None: ... - def destroy(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dnd.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dnd.vpi deleted file mode 100644 index 521f451a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/dnd.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from tkinter import Event, Misc, Tk, Widget -from typing import ClassVar, Protocol, type_check_only - -__all__ = ["dnd_start", "DndHandler"] - -@type_check_only -class _DndSource(Protocol): - def dnd_end(self, target: Widget | None, event: Event[Misc] | None, /) -> None: ... - -class DndHandler: - root: ClassVar[Tk | None] - def __init__(self, source: _DndSource, event: Event[Misc]) -> None: ... - def cancel(self, event: Event[Misc] | None = None) -> None: ... - def finish(self, event: Event[Misc] | None, commit: int = 0) -> None: ... - def on_motion(self, event: Event[Misc]) -> None: ... - def on_release(self, event: Event[Misc]) -> None: ... - def __del__(self) -> None: ... - -def dnd_start(source: _DndSource, event: Event[Misc]) -> DndHandler | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/filedialog.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/filedialog.vpi deleted file mode 100644 index b6ef8f45..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/filedialog.vpi +++ /dev/null @@ -1,149 +0,0 @@ -from _typeshed import Incomplete, StrOrBytesPath, StrPath -from collections.abc import Hashable, Iterable -from tkinter import Button, Entry, Event, Frame, Listbox, Misc, Scrollbar, StringVar, Toplevel, commondialog -from typing import IO, ClassVar, Literal - -__all__ = [ - "FileDialog", - "LoadFileDialog", - "SaveFileDialog", - "Open", - "SaveAs", - "Directory", - "askopenfilename", - "asksaveasfilename", - "askopenfilenames", - "askopenfile", - "askopenfiles", - "asksaveasfile", - "askdirectory", -] - -dialogstates: dict[Hashable, tuple[str, str]] - -class FileDialog: - title: str - master: Misc - directory: str | None - top: Toplevel - botframe: Frame - selection: Entry - filter: Entry - midframe: Entry - filesbar: Scrollbar - files: Listbox - dirsbar: Scrollbar - dirs: Listbox - ok_button: Button - filter_button: Button - cancel_button: Button - def __init__( - self, master: Misc, title: str | None = None - ) -> None: ... # title is usually a str or None, but e.g. int doesn't raise en exception either - how: str | None - def go(self, dir_or_file: StrPath = ".", pattern: StrPath = "*", default: StrPath = "", key: Hashable | None = None): ... - def quit(self, how: str | None = None) -> None: ... - def dirs_double_event(self, event: Event) -> None: ... - def dirs_select_event(self, event: Event) -> None: ... - def files_double_event(self, event: Event) -> None: ... - def files_select_event(self, event: Event) -> None: ... - def ok_event(self, event: Event) -> None: ... - def ok_command(self) -> None: ... - def filter_command(self, event: Event | None = None) -> None: ... - def get_filter(self) -> tuple[str, str]: ... - def get_selection(self) -> str: ... - def cancel_command(self, event: Event | None = None) -> None: ... - def set_filter(self, dir: StrPath, pat: StrPath) -> None: ... - def set_selection(self, file: StrPath) -> None: ... - -class LoadFileDialog(FileDialog): - title: str - def ok_command(self) -> None: ... - -class SaveFileDialog(FileDialog): - title: str - def ok_command(self) -> None: ... - -class _Dialog(commondialog.Dialog): ... - -class Open(_Dialog): - command: ClassVar[str] - -class SaveAs(_Dialog): - command: ClassVar[str] - -class Directory(commondialog.Dialog): - command: ClassVar[str] - -# TODO: command kwarg available on macos -def asksaveasfilename( - *, - confirmoverwrite: bool | None = True, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> str: ... # can be empty string -def askopenfilename( - *, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> str: ... # can be empty string -def askopenfilenames( - *, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> Literal[""] | tuple[str, ...]: ... -def askdirectory( - *, initialdir: StrOrBytesPath | None = ..., mustexist: bool | None = False, parent: Misc | None = ..., title: str | None = ... -) -> str: ... # can be empty string - -# TODO: If someone actually uses these, overload to have the actual return type of open(..., mode) -def asksaveasfile( - mode: str = "w", - *, - confirmoverwrite: bool | None = True, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> IO[Incomplete] | None: ... -def askopenfile( - mode: str = "r", - *, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> IO[Incomplete] | None: ... -def askopenfiles( - mode: str = "r", - *, - defaultextension: str | None = "", - filetypes: Iterable[tuple[str, str | list[str] | tuple[str, ...]]] | None = ..., - initialdir: StrOrBytesPath | None = ..., - initialfile: StrOrBytesPath | None = ..., - parent: Misc | None = ..., - title: str | None = ..., - typevariable: StringVar | str | None = ..., -) -> tuple[IO[Incomplete], ...]: ... # can be empty tuple -def test() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/font.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/font.vpi deleted file mode 100644 index d9e0b131..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/font.vpi +++ /dev/null @@ -1,120 +0,0 @@ -import _tkinter -import itertools -import tkinter -from typing import Any, ClassVar, Final, Literal, TypeAlias, TypedDict, overload, type_check_only -from typing_extensions import Unpack - -__all__ = ["NORMAL", "ROMAN", "BOLD", "ITALIC", "nametofont", "Font", "families", "names"] - -NORMAL: Final = "normal" -ROMAN: Final = "roman" -BOLD: Final = "bold" -ITALIC: Final = "italic" - -_FontDescription: TypeAlias = ( - str # "Helvetica 12" - | Font # A font object constructed in Python - | list[Any] # ["Helvetica", 12, BOLD] - | tuple[str] # ("Liberation Sans",) needs wrapping in tuple/list to handle spaces - # ("Liberation Sans", 12) or ("Liberation Sans", 12, "bold", "italic", "underline") - | tuple[str, int, Unpack[tuple[str, ...]]] # Any number of trailing options is permitted - | tuple[str, int, list[str] | tuple[str, ...]] # Options can also be passed as list/tuple - | _tkinter.Tcl_Obj # A font object constructed in Tcl -) - -@type_check_only -class _FontDict(TypedDict): - family: str - size: int - weight: Literal["normal", "bold"] - slant: Literal["roman", "italic"] - underline: bool - overstrike: bool - -@type_check_only -class _MetricsDict(TypedDict): - ascent: int - descent: int - linespace: int - fixed: bool - -class Font: - name: str - delete_font: bool - counter: ClassVar[itertools.count[int]] # undocumented - def __init__( - self, - # In tkinter, 'root' refers to tkinter.Tk by convention, but the code - # actually works with any tkinter widget so we use tkinter.Misc. - root: tkinter.Misc | None = None, - font: _FontDescription | None = None, - name: str | None = None, - exists: bool = False, - *, - family: str = ..., - size: int = ..., - weight: Literal["normal", "bold"] = ..., - slant: Literal["roman", "italic"] = ..., - underline: bool = ..., - overstrike: bool = ..., - ) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __setitem__(self, key: str, value: Any) -> None: ... - - @overload - def cget(self, option: Literal["family"]) -> str: ... - @overload - def cget(self, option: Literal["size"]) -> int: ... - @overload - def cget(self, option: Literal["weight"]) -> Literal["normal", "bold"]: ... - @overload - def cget(self, option: Literal["slant"]) -> Literal["roman", "italic"]: ... - @overload - def cget(self, option: Literal["underline", "overstrike"]) -> bool: ... - @overload - def cget(self, option: str) -> Any: ... - - __getitem__ = cget - - @overload - def actual(self, option: Literal["family"], displayof: tkinter.Misc | None = None) -> str: ... - @overload - def actual(self, option: Literal["size"], displayof: tkinter.Misc | None = None) -> int: ... - @overload - def actual(self, option: Literal["weight"], displayof: tkinter.Misc | None = None) -> Literal["normal", "bold"]: ... - @overload - def actual(self, option: Literal["slant"], displayof: tkinter.Misc | None = None) -> Literal["roman", "italic"]: ... - @overload - def actual(self, option: Literal["underline", "overstrike"], displayof: tkinter.Misc | None = None) -> bool: ... - @overload - def actual(self, option: None, displayof: tkinter.Misc | None = None) -> _FontDict: ... - @overload - def actual(self, *, displayof: tkinter.Misc | None = None) -> _FontDict: ... - - def config( - self, - *, - family: str = ..., - size: int = ..., - weight: Literal["normal", "bold"] = ..., - slant: Literal["roman", "italic"] = ..., - underline: bool = ..., - overstrike: bool = ..., - ) -> _FontDict | None: ... - configure = config - def copy(self) -> Font: ... - - @overload - def metrics(self, option: Literal["ascent", "descent", "linespace"], /, *, displayof: tkinter.Misc | None = ...) -> int: ... - @overload - def metrics(self, option: Literal["fixed"], /, *, displayof: tkinter.Misc | None = ...) -> bool: ... - @overload - def metrics(self, *, displayof: tkinter.Misc | None = ...) -> _MetricsDict: ... - - def measure(self, text: str, displayof: tkinter.Misc | None = None) -> int: ... - def __eq__(self, other: object) -> bool: ... - def __del__(self) -> None: ... - -def families(root: tkinter.Misc | None = None, displayof: tkinter.Misc | None = None) -> tuple[str, ...]: ... -def names(root: tkinter.Misc | None = None) -> tuple[str, ...]: ... -def nametofont(name: str, root: tkinter.Misc | None = None) -> Font: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/messagebox.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/messagebox.vpi deleted file mode 100644 index cd95f0de..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/messagebox.vpi +++ /dev/null @@ -1,98 +0,0 @@ -from tkinter import Misc -from tkinter.commondialog import Dialog -from typing import ClassVar, Final, Literal - -__all__ = ["showinfo", "showwarning", "showerror", "askquestion", "askokcancel", "askyesno", "askyesnocancel", "askretrycancel"] - -ERROR: Final = "error" -INFO: Final = "info" -QUESTION: Final = "question" -WARNING: Final = "warning" -ABORTRETRYIGNORE: Final = "abortretryignore" -OK: Final = "ok" -OKCANCEL: Final = "okcancel" -RETRYCANCEL: Final = "retrycancel" -YESNO: Final = "yesno" -YESNOCANCEL: Final = "yesnocancel" -ABORT: Final = "abort" -RETRY: Final = "retry" -IGNORE: Final = "ignore" -CANCEL: Final = "cancel" -YES: Final = "yes" -NO: Final = "no" - -class Message(Dialog): - command: ClassVar[str] - -def showinfo( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["ok"] = "ok", - parent: Misc = ..., -) -> str: ... -def showwarning( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["ok"] = "ok", - parent: Misc = ..., -) -> str: ... -def showerror( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["ok"] = "ok", - parent: Misc = ..., -) -> str: ... -def askquestion( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["yes", "no"] = ..., - parent: Misc = ..., -) -> str: ... -def askokcancel( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["ok", "cancel"] = ..., - parent: Misc = ..., -) -> bool: ... -def askyesno( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["yes", "no"] = ..., - parent: Misc = ..., -) -> bool: ... -def askyesnocancel( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["cancel", "yes", "no"] = ..., - parent: Misc = ..., -) -> bool | None: ... -def askretrycancel( - title: str | None = None, - message: str | None = None, - *, - detail: str = ..., - icon: Literal["error", "info", "question", "warning"] = ..., - default: Literal["retry", "cancel"] = ..., - parent: Misc = ..., -) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/scrolledtext.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/scrolledtext.vpi deleted file mode 100644 index 6f1abc71..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/scrolledtext.vpi +++ /dev/null @@ -1,9 +0,0 @@ -from tkinter import Frame, Misc, Scrollbar, Text - -__all__ = ["ScrolledText"] - -# The methods from Pack, Place, and Grid are dynamically added over the parent's impls -class ScrolledText(Text): - frame: Frame - vbar: Scrollbar - def __init__(self, master: Misc | None = None, **kwargs) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/simpledialog.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/simpledialog.vpi deleted file mode 100644 index 6f66f023..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/simpledialog.vpi +++ /dev/null @@ -1,58 +0,0 @@ -import sys -from tkinter import Event, Frame, Misc, Toplevel - -if sys.version_info >= (3, 15): - __all__ = ["SimpleDialog", "Dialog", "askinteger", "askfloat", "askstring"] - -class Dialog(Toplevel): - def __init__(self, parent: Misc | None, title: str | None = None) -> None: ... - def body(self, master: Frame) -> Misc | None: ... - def buttonbox(self) -> None: ... - def ok(self, event: Event[Misc] | None = None) -> None: ... - def cancel(self, event: Event[Misc] | None = None) -> None: ... - def validate(self) -> bool: ... - def apply(self) -> None: ... - -class SimpleDialog: - def __init__( - self, - master: Misc | None, - text: str = "", - buttons: list[str] = [], - default: int | None = None, - cancel: int | None = None, - title: str | None = None, - class_: str | None = None, - ) -> None: ... - def go(self) -> int | None: ... - def return_event(self, event: Event[Misc]) -> None: ... - def wm_delete_window(self) -> None: ... - def done(self, num: int) -> None: ... - -def askfloat( - title: str | None, - prompt: str, - *, - initialvalue: float | None = ..., - minvalue: float | None = ..., - maxvalue: float | None = ..., - parent: Misc | None = ..., -) -> float | None: ... -def askinteger( - title: str | None, - prompt: str, - *, - initialvalue: int | None = ..., - minvalue: int | None = ..., - maxvalue: int | None = ..., - parent: Misc | None = ..., -) -> int | None: ... -def askstring( - title: str | None, - prompt: str, - *, - initialvalue: str | None = ..., - show: str | None = ..., - # minvalue/maxvalue is accepted but not useful. - parent: Misc | None = ..., -) -> str | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/tix.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/tix.vpi deleted file mode 100644 index 7891364f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/tix.vpi +++ /dev/null @@ -1,299 +0,0 @@ -import tkinter -from _typeshed import Incomplete -from typing import Any, Final - -WINDOW: Final = "window" -TEXT: Final = "text" -STATUS: Final = "status" -IMMEDIATE: Final = "immediate" -IMAGE: Final = "image" -IMAGETEXT: Final = "imagetext" -BALLOON: Final = "balloon" -AUTO: Final = "auto" -ACROSSTOP: Final = "acrosstop" - -ASCII: Final = "ascii" -CELL: Final = "cell" -COLUMN: Final = "column" -DECREASING: Final = "decreasing" -INCREASING: Final = "increasing" -INTEGER: Final = "integer" -MAIN: Final = "main" -MAX: Final = "max" -REAL: Final = "real" -ROW: Final = "row" -S_REGION: Final = "s-region" -X_REGION: Final = "x-region" -Y_REGION: Final = "y-region" - -# These should be kept in sync with _tkinter constants, except TCL_ALL_EVENTS which doesn't match ALL_EVENTS -TCL_DONT_WAIT: Final = 2 -TCL_WINDOW_EVENTS: Final = 4 -TCL_FILE_EVENTS: Final = 8 -TCL_TIMER_EVENTS: Final = 16 -TCL_IDLE_EVENTS: Final = 32 -TCL_ALL_EVENTS: Final = 0 - -class tixCommand: - def tix_addbitmapdir(self, directory: str) -> None: ... - def tix_cget(self, option: str) -> Any: ... - def tix_configure(self, cnf: dict[str, Any] | None = None, **kw: Any) -> Any: ... - def tix_filedialog(self, dlgclass: str | None = None) -> str: ... - def tix_getbitmap(self, name: str) -> str: ... - def tix_getimage(self, name: str) -> str: ... - def tix_option_get(self, name: str) -> Any: ... - def tix_resetoptions(self, newScheme: str, newFontSet: str, newScmPrio: str | None = None) -> None: ... - -class Tk(tkinter.Tk, tixCommand): - def __init__(self, screenName: str | None = None, baseName: str | None = None, className: str = "Tix") -> None: ... - -class TixWidget(tkinter.Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - widgetName: str | None = None, - static_options: list[str] | None = None, - cnf: dict[str, Any] = {}, - kw: dict[str, Any] = {}, - ) -> None: ... - def __getattr__(self, name: str): ... - def set_silent(self, value: str) -> None: ... - def subwidget(self, name: str) -> tkinter.Widget: ... - def subwidgets_all(self) -> list[tkinter.Widget]: ... - def config_all(self, option: Any, value: Any) -> None: ... - def image_create(self, imgtype: str, cnf: dict[str, Any] = {}, master: tkinter.Widget | None = None, **kw) -> None: ... - def image_delete(self, imgname: str) -> None: ... - -class TixSubWidget(TixWidget): - def __init__(self, master: tkinter.Widget, name: str, destroy_physically: int = 1, check_intermediate: int = 1) -> None: ... - -class DisplayStyle: - def __init__(self, itemtype: str, cnf: dict[str, Any] = {}, *, master: tkinter.Widget | None = None, **kw) -> None: ... - def __getitem__(self, key: str): ... - def __setitem__(self, key: str, value: Any) -> None: ... - def delete(self) -> None: ... - def config(self, cnf: dict[str, Any] = {}, **kw): ... - -class Balloon(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def bind_widget(self, widget: tkinter.Widget, cnf: dict[str, Any] = {}, **kw) -> None: ... - def unbind_widget(self, widget: tkinter.Widget) -> None: ... - -class ButtonBox(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ... - def invoke(self, name: str) -> None: ... - -class ComboBox(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add_history(self, str: str) -> None: ... - def append_history(self, str: str) -> None: ... - def insert(self, index: int, str: str) -> None: ... - def pick(self, index: int) -> None: ... - -class Control(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def decrement(self) -> None: ... - def increment(self) -> None: ... - def invoke(self) -> None: ... - -class LabelEntry(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - -class LabelFrame(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - -class Meter(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - -class OptionMenu(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add_command(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add_separator(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def delete(self, name: str) -> None: ... - def disable(self, name: str) -> None: ... - def enable(self, name: str) -> None: ... - -class PopupMenu(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def bind_widget(self, widget: tkinter.Widget) -> None: ... - def unbind_widget(self, widget: tkinter.Widget) -> None: ... - def post_widget(self, widget: tkinter.Widget, x: int, y: int) -> None: ... - -class Select(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ... - def invoke(self, name: str) -> None: ... - -class StdButtonBox(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def invoke(self, name: str) -> None: ... - -class DirList(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def chdir(self, dir: str) -> None: ... - -class DirTree(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def chdir(self, dir: str) -> None: ... - -class DirSelectDialog(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def popup(self) -> None: ... - def popdown(self) -> None: ... - -class DirSelectBox(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - -class ExFileSelectBox(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def filter(self) -> None: ... - def invoke(self) -> None: ... - -class FileSelectBox(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def apply_filter(self) -> None: ... - def invoke(self) -> None: ... - -class FileEntry(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def invoke(self) -> None: ... - def file_dialog(self) -> None: ... - -class HList(TixWidget, tkinter.XView, tkinter.YView): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ... - def add_child(self, parent: str | None = None, cnf: dict[str, Any] = {}, **kw) -> tkinter.Widget: ... - def anchor_set(self, entry: str) -> None: ... - def anchor_clear(self) -> None: ... - # FIXME: Overload, certain combos return, others don't - def column_width(self, col: int = 0, width: int | None = None, chars: int | None = None) -> int | None: ... - def delete_all(self) -> None: ... - def delete_entry(self, entry: str) -> None: ... - def delete_offsprings(self, entry: str) -> None: ... - def delete_siblings(self, entry: str) -> None: ... - def dragsite_set(self, index: int) -> None: ... - def dragsite_clear(self) -> None: ... - def dropsite_set(self, index: int) -> None: ... - def dropsite_clear(self) -> None: ... - def header_create(self, col: int, cnf: dict[str, Any] = {}, **kw) -> None: ... - def header_configure(self, col: int, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ... - def header_cget(self, col: int, opt): ... - def header_exists(self, col: int) -> bool: ... - def header_exist(self, col: int) -> bool: ... - def header_delete(self, col: int) -> None: ... - def header_size(self, col: int) -> int: ... - def hide_entry(self, entry: str) -> None: ... - def indicator_create(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def indicator_configure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ... - def indicator_cget(self, entry: str, opt): ... - def indicator_exists(self, entry: str) -> bool: ... - def indicator_delete(self, entry: str) -> None: ... - def indicator_size(self, entry: str) -> int: ... - def info_anchor(self) -> str: ... - def info_bbox(self, entry: str) -> tuple[int, int, int, int]: ... - def info_children(self, entry: str | None = None) -> tuple[str, ...]: ... - def info_data(self, entry: str) -> Any: ... - def info_dragsite(self) -> str: ... - def info_dropsite(self) -> str: ... - def info_exists(self, entry: str) -> bool: ... - def info_hidden(self, entry: str) -> bool: ... - def info_next(self, entry: str) -> str: ... - def info_parent(self, entry: str) -> str: ... - def info_prev(self, entry: str) -> str: ... - def info_selection(self) -> tuple[str, ...]: ... - def item_cget(self, entry: str, col: int, opt): ... - def item_configure(self, entry: str, col: int, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ... - def item_create(self, entry: str, col: int, cnf: dict[str, Any] = {}, **kw) -> None: ... - def item_exists(self, entry: str, col: int) -> bool: ... - def item_delete(self, entry: str, col: int) -> None: ... - def entrycget(self, entry: str, opt): ... - def entryconfigure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ... - def nearest(self, y: int) -> str: ... - def see(self, entry: str) -> None: ... - def selection_clear(self, cnf: dict[str, Any] = {}, **kw) -> None: ... - def selection_includes(self, entry: str) -> bool: ... - def selection_set(self, first: str, last: str | None = None) -> None: ... - def show_entry(self, entry: str) -> None: ... - -class CheckList(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def autosetmode(self) -> None: ... - def close(self, entrypath: str) -> None: ... - def getmode(self, entrypath: str) -> str: ... - def open(self, entrypath: str) -> None: ... - def getselection(self, mode: str = "on") -> tuple[str, ...]: ... - def getstatus(self, entrypath: str) -> str: ... - def setstatus(self, entrypath: str, mode: str = "on") -> None: ... - -class Tree(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def autosetmode(self) -> None: ... - def close(self, entrypath: str) -> None: ... - def getmode(self, entrypath: str) -> str: ... - def open(self, entrypath: str) -> None: ... - def setmode(self, entrypath: str, mode: str = "none") -> None: ... - -class TList(TixWidget, tkinter.XView, tkinter.YView): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def active_set(self, index: int) -> None: ... - def active_clear(self) -> None: ... - def anchor_set(self, index: int) -> None: ... - def anchor_clear(self) -> None: ... - def delete(self, from_: int, to: int | None = None) -> None: ... - def dragsite_set(self, index: int) -> None: ... - def dragsite_clear(self) -> None: ... - def dropsite_set(self, index: int) -> None: ... - def dropsite_clear(self) -> None: ... - def insert(self, index: int, cnf: dict[str, Any] = {}, **kw) -> None: ... - def info_active(self) -> int: ... - def info_anchor(self) -> int: ... - def info_down(self, index: int) -> int: ... - def info_left(self, index: int) -> int: ... - def info_right(self, index: int) -> int: ... - def info_selection(self) -> tuple[int, ...]: ... - def info_size(self) -> int: ... - def info_up(self, index: int) -> int: ... - def nearest(self, x: int, y: int) -> int: ... - def see(self, index: int) -> None: ... - def selection_clear(self, cnf: dict[str, Any] = {}, **kw) -> None: ... - def selection_includes(self, index: int) -> bool: ... - def selection_set(self, first: int, last: int | None = None) -> None: ... - -class PanedWindow(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def delete(self, name: str) -> None: ... - def forget(self, name: str) -> None: ... # type: ignore[override] - def panecget(self, entry: str, opt): ... - def paneconfigure(self, entry: str, cnf: dict[str, Any] = {}, **kw) -> Incomplete | None: ... - def panes(self) -> list[tkinter.Widget]: ... - -class ListNoteBook(TixWidget): - def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def page(self, name: str) -> tkinter.Widget: ... - def pages(self) -> list[tkinter.Widget]: ... - def raise_page(self, name: str) -> None: ... - -class NoteBook(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - def add(self, name: str, cnf: dict[str, Any] = {}, **kw) -> None: ... - def delete(self, name: str) -> None: ... - def page(self, name: str) -> tkinter.Widget: ... - def pages(self) -> list[tkinter.Widget]: ... - def raise_page(self, name: str) -> None: ... - def raised(self) -> bool: ... - -class InputOnly(TixWidget): - def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = {}, **kw) -> None: ... - -class Form: - def __setitem__(self, key: str, value: Any) -> None: ... - def config(self, cnf: dict[str, Any] = {}, **kw) -> None: ... - def form(self, cnf: dict[str, Any] = {}, **kw) -> None: ... - def check(self) -> bool: ... - def forget(self) -> None: ... - def grid(self, xsize: int = 0, ysize: int = 0) -> tuple[int, int] | None: ... - def info(self, option: str | None = None): ... - def slaves(self) -> list[tkinter.Widget]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/ttk.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/ttk.vpi deleted file mode 100644 index 06d2be13..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tkinter/ttk.vpi +++ /dev/null @@ -1,1434 +0,0 @@ -import _tkinter -import sys -import tkinter -from _typeshed import MaybeNone -from collections.abc import Callable, Iterable, Sequence -from tkinter.font import _FontDescription -from typing import Any, Literal, ParamSpec, TypeAlias, TypedDict, TypeVar, overload, type_check_only -from typing_extensions import Never, Unpack - -__all__ = [ - "Button", - "Checkbutton", - "Combobox", - "Entry", - "Frame", - "Label", - "Labelframe", - "LabelFrame", - "Menubutton", - "Notebook", - "Panedwindow", - "PanedWindow", - "Progressbar", - "Radiobutton", - "Scale", - "Scrollbar", - "Separator", - "Sizegrip", - "Style", - "Treeview", - "LabeledScale", - "OptionMenu", - "tclobjs_to_py", - "setup_master", - "Spinbox", -] - -def tclobjs_to_py(adict: dict[Any, Any]) -> dict[Any, Any]: ... -def setup_master(master: tkinter.Misc | None = None): ... - -_Padding: TypeAlias = ( - float - | str - | tuple[float | str] - | tuple[float | str, float | str] - | tuple[float | str, float | str, float | str] - | tuple[float | str, float | str, float | str, float | str] -) - -# Last item (option value to apply) varies between different options so use Any. -# It could also be any iterable with items matching the tuple, but that case -# hasn't been added here for consistency with _Padding above. -_Statespec: TypeAlias = tuple[Unpack[tuple[str, ...]], Any] -_ImageStatespec: TypeAlias = tuple[Unpack[tuple[str, ...]], tkinter._Image | str] -_VsapiStatespec: TypeAlias = tuple[Unpack[tuple[str, ...]], int] - -_P = ParamSpec("_P") -_T = TypeVar("_T") - -@type_check_only -class _Layout(TypedDict, total=False): - side: Literal["left", "right", "top", "bottom"] - sticky: str # consists of letters 'n', 's', 'w', 'e', may contain repeats, may be empty - unit: Literal[0, 1] | bool - children: _LayoutSpec - # Note: there seem to be some other undocumented keys sometimes - -# This could be any sequence when passed as a parameter but will always be a list when returned. -_LayoutSpec: TypeAlias = list[tuple[str, _Layout | None]] - -# Keep these in sync with the appropriate methods in Style -@type_check_only -class _ElementCreateImageKwargs(TypedDict, total=False): - border: _Padding - height: float | str - padding: _Padding - sticky: str - width: float | str - -_ElementCreateArgsCrossPlatform: TypeAlias = ( - # Could be any sequence here but types are not homogenous so just type it as tuple - tuple[Literal["image"], tkinter._Image | str, Unpack[tuple[_ImageStatespec, ...]], _ElementCreateImageKwargs] - | tuple[Literal["from"], str, str] - | tuple[Literal["from"], str] # (fromelement is optional) -) -if sys.platform == "win32" and sys.version_info >= (3, 13): - @type_check_only - class _ElementCreateVsapiKwargsPadding(TypedDict, total=False): - padding: _Padding - - @type_check_only - class _ElementCreateVsapiKwargsMargin(TypedDict, total=False): - padding: _Padding - - @type_check_only - class _ElementCreateVsapiKwargsSize(TypedDict): - width: float | str - height: float | str - - _ElementCreateVsapiKwargsDict: TypeAlias = ( - _ElementCreateVsapiKwargsPadding | _ElementCreateVsapiKwargsMargin | _ElementCreateVsapiKwargsSize - ) - _ElementCreateArgs: TypeAlias = ( # noqa: Y047 # It doesn't recognise the usage below for whatever reason - _ElementCreateArgsCrossPlatform - | tuple[Literal["vsapi"], str, int, _ElementCreateVsapiKwargsDict] - | tuple[Literal["vsapi"], str, int, _VsapiStatespec, _ElementCreateVsapiKwargsDict] - ) -else: - _ElementCreateArgs: TypeAlias = _ElementCreateArgsCrossPlatform -_ThemeSettingsValue = TypedDict( - "_ThemeSettingsValue", - { - "configure": dict[str, Any], - "map": dict[str, Iterable[_Statespec]], - "layout": _LayoutSpec, - "element create": _ElementCreateArgs, - }, - total=False, -) -_ThemeSettings: TypeAlias = dict[str, _ThemeSettingsValue] - -class Style: - master: tkinter.Misc - tk: _tkinter.TkappType - def __init__(self, master: tkinter.Misc | None = None) -> None: ... - - # For these methods, values given vary between options. Returned values - # seem to be str, but this might not always be the case. - @overload - def configure(self, style: str) -> dict[str, Any] | None: ... # Returns None if no configuration. - @overload - def configure(self, style: str, query_opt: str, **kw: Any) -> Any: ... - @overload - def configure(self, style: str, query_opt: None = None, **kw: Any) -> None: ... - - @overload - def map(self, style: str, query_opt: str) -> _Statespec: ... - @overload - def map(self, style: str, query_opt: None = None, **kw: Iterable[_Statespec]) -> dict[str, _Statespec]: ... - - def lookup(self, style: str, option: str, state: Iterable[str] | None = None, default: Any | None = None) -> Any: ... - - @overload - def layout(self, style: str, layoutspec: _LayoutSpec) -> list[Never]: ... # Always seems to return an empty list - @overload - def layout(self, style: str, layoutspec: None = None) -> _LayoutSpec: ... - - @overload - def element_create( - self, - elementname: str, - etype: Literal["image"], - default_image: tkinter._Image | str, - /, - *imagespec: _ImageStatespec, - border: _Padding = ..., - height: float | str = ..., - padding: _Padding = ..., - sticky: str = ..., - width: float | str = ..., - ) -> None: ... - @overload - def element_create(self, elementname: str, etype: Literal["from"], themename: str, fromelement: str = ..., /) -> None: ... - if sys.platform == "win32" and sys.version_info >= (3, 13): # and tk version >= 8.6 - # margin, padding, and (width + height) are mutually exclusive. width - # and height must either both be present or not present at all. Note: - # There are other undocumented options if you look at ttk's source code. - @overload - def element_create( - self, - elementname: str, - etype: Literal["vsapi"], - class_: str, - part: int, - vs_statespec: _VsapiStatespec = ..., - /, - *, - padding: _Padding = ..., - ) -> None: ... - @overload - def element_create( - self, - elementname: str, - etype: Literal["vsapi"], - class_: str, - part: int, - vs_statespec: _VsapiStatespec = ..., - /, - *, - margin: _Padding = ..., - ) -> None: ... - @overload - def element_create( - self, - elementname: str, - etype: Literal["vsapi"], - class_: str, - part: int, - vs_statespec: _VsapiStatespec = ..., - /, - *, - width: float | str, - height: float | str, - ) -> None: ... - - def element_names(self) -> tuple[str, ...]: ... - def element_options(self, elementname: str) -> tuple[str, ...]: ... - def theme_create(self, themename: str, parent: str | None = None, settings: _ThemeSettings | None = None) -> None: ... - def theme_settings(self, themename: str, settings: _ThemeSettings) -> None: ... - def theme_names(self) -> tuple[str, ...]: ... - - @overload - def theme_use(self, themename: str) -> None: ... - @overload - def theme_use(self, themename: None = None) -> str: ... - -class Widget(tkinter.Widget): - def __init__(self, master: tkinter.Misc | None, widgetname: str | None, kw: dict[str, Any] | None = None) -> None: ... - def identify(self, x: int, y: int) -> str: ... - - @overload - def instate(self, statespec: Sequence[str], callback: None = None) -> bool: ... - @overload - def instate( - self, statespec: Sequence[str], callback: Callable[_P, _T], *args: _P.args, **kw: _P.kwargs - ) -> Literal[False] | _T: ... - - def state(self, statespec: Sequence[str] | None = None) -> tuple[str, ...]: ... - -class Button(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - command: str | Callable[[], Any] = "", - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = "", - cursor: tkinter._Cursor = "", - default: Literal["normal", "active", "disabled"] = "normal", - image: tkinter._Image | str = "", - name: str = ..., - padding=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = "", - textvariable: tkinter.Variable = ..., - underline: int = -1, - width: int | Literal[""] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - command: str | Callable[[], Any] = ..., - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = ..., - cursor: tkinter._Cursor = ..., - default: Literal["normal", "active", "disabled"] = ..., - image: tkinter._Image | str = ..., - padding=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: tkinter.Variable = ..., - underline: int = ..., - width: int | Literal[""] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def invoke(self) -> Any: ... - -class Checkbutton(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - command: str | Callable[[], Any] = "", - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = "", - cursor: tkinter._Cursor = "", - image: tkinter._Image | str = "", - name: str = ..., - offvalue: Any = 0, - onvalue: Any = 1, - padding=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = "", - textvariable: tkinter.Variable = ..., - underline: int = -1, - # Seems like variable can be empty string, but actually setting it to - # empty string segfaults before Tcl 8.6.9. Search for ttk::checkbutton - # here: https://sourceforge.net/projects/tcl/files/Tcl/8.6.9/tcltk-release-notes-8.6.9.txt/view - variable: tkinter.Variable = ..., - width: int | Literal[""] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - command: str | Callable[[], Any] = ..., - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = ..., - cursor: tkinter._Cursor = ..., - image: tkinter._Image | str = ..., - offvalue: Any = ..., - onvalue: Any = ..., - padding=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: tkinter.Variable = ..., - underline: int = ..., - variable: tkinter.Variable = ..., - width: int | Literal[""] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def invoke(self) -> Any: ... - -class Entry(Widget, tkinter.Entry): - def __init__( - self, - master: tkinter.Misc | None = None, - widget: str | None = None, - *, - background: str = ..., # undocumented - class_: str = "", - cursor: tkinter._Cursor = ..., - exportselection: bool = True, - font: _FontDescription = "TkTextFont", - foreground: str = "", - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - justify: Literal["left", "center", "right"] = "left", - name: str = ..., - show: str = "", - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = "none", - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - width: int = 20, - xscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - cursor: tkinter._Cursor = ..., - exportselection: bool = ..., - font: _FontDescription = ..., - foreground: str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - show: str = ..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - # config must be copy/pasted, otherwise ttk.Entry().config is mypy error (don't know why) - @overload # type: ignore[override] - def config( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - cursor: tkinter._Cursor = ..., - exportselection: bool = ..., - font: _FontDescription = ..., - foreground: str = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - show: str = ..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - def bbox(self, index) -> tuple[int, int, int, int]: ... # type: ignore[override] - def identify(self, x: int, y: int) -> str: ... - def validate(self): ... - -class Combobox(Entry): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - background: str = ..., # undocumented - class_: str = "", - cursor: tkinter._Cursor = "", - exportselection: bool = True, - font: _FontDescription = ..., # undocumented - foreground: str = ..., # undocumented - height: int = 10, - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., # undocumented - justify: Literal["left", "center", "right"] = "left", - name: str = ..., - postcommand: Callable[[], object] | str = "", - show=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., # undocumented - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., # undocumented - values: list[str] | tuple[str, ...] = ..., - width: int = 20, - xscrollcommand: str | Callable[[float, float], object] = ..., # undocumented - ) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - cursor: tkinter._Cursor = ..., - exportselection: bool = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: int = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - postcommand: Callable[[], object] | str = ..., - show=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - values: list[str] | tuple[str, ...] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - # config must be copy/pasted, otherwise ttk.Combobox().config is mypy error (don't know why) - @overload # type: ignore[override] - def config( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - cursor: tkinter._Cursor = ..., - exportselection: bool = ..., - font: _FontDescription = ..., - foreground: str = ..., - height: int = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - postcommand: Callable[[], object] | str = ..., - show=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - values: list[str] | tuple[str, ...] = ..., - width: int = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - def current(self, newindex: int | None = None) -> int: ... - def set(self, value: Any) -> None: ... - -class Frame(Widget): - # This should be kept in sync with tkinter.ttk.LabeledScale.__init__() - # (all of these keyword-only arguments are also present there) - def __init__( - self, - master: tkinter.Misc | None = None, - *, - border: float | str = ..., - borderwidth: float | str = ..., - class_: str = "", - cursor: tkinter._Cursor = "", - height: float | str = 0, - name: str = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - border: float | str = ..., - borderwidth: float | str = ..., - cursor: tkinter._Cursor = ..., - height: float | str = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Label(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = "", - border: float | str = ..., # alias for borderwidth - borderwidth: float | str = ..., # undocumented - class_: str = "", - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = "", - cursor: tkinter._Cursor = "", - font: _FontDescription = ..., - foreground: str = "", - image: tkinter._Image | str = "", - justify: Literal["left", "center", "right"] = ..., - name: str = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - text: float | str = "", - textvariable: tkinter.Variable = ..., - underline: int = -1, - width: int | Literal[""] = "", - wraplength: float | str = ..., - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - background: str = ..., - border: float | str = ..., - borderwidth: float | str = ..., - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = ..., - cursor: tkinter._Cursor = ..., - font: _FontDescription = ..., - foreground: str = ..., - image: tkinter._Image | str = ..., - justify: Literal["left", "center", "right"] = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: tkinter.Variable = ..., - underline: int = ..., - width: int | Literal[""] = ..., - wraplength: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Labelframe(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - border: float | str = ..., - borderwidth: float | str = ..., # undocumented - class_: str = "", - cursor: tkinter._Cursor = "", - height: float | str = 0, - labelanchor: Literal["nw", "n", "ne", "en", "e", "es", "se", "s", "sw", "ws", "w", "wn"] = ..., - labelwidget: tkinter.Misc = ..., - name: str = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., # undocumented - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - text: float | str = "", - underline: int = -1, - width: float | str = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - border: float | str = ..., - borderwidth: float | str = ..., - cursor: tkinter._Cursor = ..., - height: float | str = ..., - labelanchor: Literal["nw", "n", "ne", "en", "e", "es", "se", "s", "sw", "ws", "w", "wn"] = ..., - labelwidget: tkinter.Misc = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - underline: int = ..., - width: float | str = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -LabelFrame = Labelframe - -class Menubutton(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = "", - cursor: tkinter._Cursor = "", - direction: Literal["above", "below", "left", "right", "flush"] = "below", - image: tkinter._Image | str = "", - menu: tkinter.Menu = ..., - name: str = ..., - padding=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = "", - textvariable: tkinter.Variable = ..., - underline: int = -1, - width: int | Literal[""] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = ..., - cursor: tkinter._Cursor = ..., - direction: Literal["above", "below", "left", "right", "flush"] = ..., - image: tkinter._Image | str = ..., - menu: tkinter.Menu = ..., - padding=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: tkinter.Variable = ..., - underline: int = ..., - width: int | Literal[""] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Notebook(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - cursor: tkinter._Cursor = "", - height: int = 0, - name: str = ..., - padding: _Padding = ..., - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: int = 0, - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - height: int = ..., - padding: _Padding = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: int = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def add( - self, - child: tkinter.Widget, - *, - state: Literal["normal", "disabled", "hidden"] = ..., - sticky: str = ..., # consists of letters 'n', 's', 'w', 'e', no repeats, may be empty - padding: _Padding = ..., - text: str = ..., - # `image` is a sequence of an image name, followed by zero or more - # (sequences of one or more state names followed by an image name) - image=..., - compound: Literal["top", "left", "center", "right", "bottom", "none"] = ..., - underline: int = ..., - ) -> None: ... - def forget(self, tab_id) -> None: ... # type: ignore[override] - def hide(self, tab_id) -> None: ... - def identify(self, x: int, y: int) -> str: ... - def index(self, tab_id): ... - def insert(self, pos, child, **kw) -> None: ... - def select(self, tab_id=None): ... - def tab(self, tab_id, option=None, **kw): ... - def tabs(self): ... - def enable_traversal(self) -> None: ... - -class Panedwindow(Widget, tkinter.PanedWindow): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - cursor: tkinter._Cursor = "", - # width and height for tkinter.ttk.Panedwindow are int but for tkinter.PanedWindow they are screen units - height: int = 0, - name: str = ..., - orient: Literal["vertical", "horizontal"] = "vertical", # can't be changed with configure() - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - width: int = 0, - ) -> None: ... - def add(self, child: tkinter.Widget, *, weight: int = ..., **kw) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - height: int = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: int = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - # config must be copy/pasted, otherwise ttk.Panedwindow().config is mypy error (don't know why) - @overload # type: ignore[override] - def config( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - height: int = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - width: int = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - forget = tkinter.PanedWindow.forget - def insert(self, pos, child, **kw) -> None: ... - def pane(self, pane, option=None, **kw): ... - def sashpos(self, index, newpos=None): ... - -PanedWindow = Panedwindow - -class Progressbar(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - cursor: tkinter._Cursor = "", - length: float | str = 100, - maximum: float = 100, - mode: Literal["determinate", "indeterminate"] = "determinate", - name: str = ..., - orient: Literal["horizontal", "vertical"] = "horizontal", - phase: int = 0, # docs say read-only but assigning int to this works - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - value: float = 0.0, - variable: tkinter.IntVar | tkinter.DoubleVar = ..., - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - length: float | str = ..., - maximum: float = ..., - mode: Literal["determinate", "indeterminate"] = ..., - orient: Literal["horizontal", "vertical"] = ..., - phase: int = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - value: float = ..., - variable: tkinter.IntVar | tkinter.DoubleVar = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def start(self, interval: Literal["idle"] | int | None = None) -> None: ... - def step(self, amount: float | None = None) -> None: ... - def stop(self) -> None: ... - -class Radiobutton(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - command: str | Callable[[], Any] = "", - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = "", - cursor: tkinter._Cursor = "", - image: tkinter._Image | str = "", - name: str = ..., - padding=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = "", - textvariable: tkinter.Variable = ..., - underline: int = -1, - value: Any = "1", - variable: tkinter.Variable | Literal[""] = ..., - width: int | Literal[""] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - command: str | Callable[[], Any] = ..., - compound: Literal["", "text", "image", "top", "left", "center", "right", "bottom", "none"] = ..., - cursor: tkinter._Cursor = ..., - image: tkinter._Image | str = ..., - padding=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - text: float | str = ..., - textvariable: tkinter.Variable = ..., - underline: int = ..., - value: Any = ..., - variable: tkinter.Variable | Literal[""] = ..., - width: int | Literal[""] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def invoke(self) -> Any: ... - -# type ignore, because identify() methods of Widget and tkinter.Scale are incompatible -class Scale(Widget, tkinter.Scale): # type: ignore[misc] - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - command: str | Callable[[str], object] = "", - cursor: tkinter._Cursor = "", - from_: float = 0, - length: float | str = 100, - name: str = ..., - orient: Literal["horizontal", "vertical"] = "horizontal", - state: str = ..., # undocumented - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - to: float = 1.0, - value: float = 0, - variable: tkinter.IntVar | tkinter.DoubleVar = ..., - ) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - command: str | Callable[[str], object] = ..., - cursor: tkinter._Cursor = ..., - from_: float = ..., - length: float | str = ..., - orient: Literal["horizontal", "vertical"] = ..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - to: float = ..., - value: float = ..., - variable: tkinter.IntVar | tkinter.DoubleVar = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - # config must be copy/pasted, otherwise ttk.Scale().config is mypy error (don't know why) - @overload # type: ignore[override] - def config( - self, - cnf: dict[str, Any] | None = None, - *, - command: str | Callable[[str], object] = ..., - cursor: tkinter._Cursor = ..., - from_: float = ..., - length: float | str = ..., - orient: Literal["horizontal", "vertical"] = ..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - to: float = ..., - value: float = ..., - variable: tkinter.IntVar | tkinter.DoubleVar = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - def get(self, x: int | None = None, y: int | None = None) -> float: ... - -# type ignore, because identify() methods of Widget and tkinter.Scale are incompatible -class Scrollbar(Widget, tkinter.Scrollbar): # type: ignore[misc] - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - command: Callable[..., tuple[float, float] | None] | str = "", - cursor: tkinter._Cursor = "", - name: str = ..., - orient: Literal["horizontal", "vertical"] = "vertical", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - ) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - command: Callable[..., tuple[float, float] | None] | str = ..., - cursor: tkinter._Cursor = ..., - orient: Literal["horizontal", "vertical"] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - # config must be copy/pasted, otherwise ttk.Scrollbar().config is mypy error (don't know why) - @overload # type: ignore[override] - def config( - self, - cnf: dict[str, Any] | None = None, - *, - command: Callable[..., tuple[float, float] | None] | str = ..., - cursor: tkinter._Cursor = ..., - orient: Literal["horizontal", "vertical"] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def config(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - -class Separator(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - cursor: tkinter._Cursor = "", - name: str = ..., - orient: Literal["horizontal", "vertical"] = "horizontal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - orient: Literal["horizontal", "vertical"] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Sizegrip(Widget): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - cursor: tkinter._Cursor = ..., - name: str = ..., - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - cursor: tkinter._Cursor = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - -class Spinbox(Entry): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - background: str = ..., # undocumented - class_: str = "", - command: Callable[[], object] | str | list[str] | tuple[str, ...] = "", - cursor: tkinter._Cursor = "", - exportselection: bool = ..., # undocumented - font: _FontDescription = ..., # undocumented - foreground: str = ..., # undocumented - format: str = "", - from_: float = 0, - increment: float = 1, - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., # undocumented - justify: Literal["left", "center", "right"] = ..., # undocumented - name: str = ..., - show=..., # undocumented - state: str = "normal", - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., # undocumented - to: float = 0, - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = "none", - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = "", - values: list[str] | tuple[str, ...] = ..., - width: int = ..., # undocumented - wrap: bool = False, - xscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload # type: ignore[override] - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - background: str = ..., - command: Callable[[], object] | str | list[str] | tuple[str, ...] = ..., - cursor: tkinter._Cursor = ..., - exportselection: bool = ..., - font: _FontDescription = ..., - foreground: str = ..., - format: str = ..., - from_: float = ..., - increment: float = ..., - invalidcommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - justify: Literal["left", "center", "right"] = ..., - show=..., - state: str = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - textvariable: tkinter.Variable = ..., - to: float = ..., - validate: Literal["none", "focus", "focusin", "focusout", "key", "all"] = ..., - validatecommand: str | list[str] | tuple[str, ...] | Callable[[], bool] = ..., - values: list[str] | tuple[str, ...] = ..., - width: int = ..., - wrap: bool = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure # type: ignore[assignment] - def set(self, value: Any) -> None: ... - -@type_check_only -class _TreeviewItemDict(TypedDict): - text: str - image: list[str] | Literal[""] # no idea why it's wrapped in list - values: list[Any] | Literal[""] - open: bool # actually 0 or 1 - tags: list[str] | Literal[""] - -@type_check_only -class _TreeviewTagDict(TypedDict): - # There is also 'text' and 'anchor', but they don't seem to do anything, using them is likely a bug - foreground: str - background: str - font: _FontDescription - image: str # not wrapped in list :D - -@type_check_only -class _TreeviewHeaderDict(TypedDict): - text: str - image: list[str] | Literal[""] - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] - command: str - state: str # Doesn't seem to appear anywhere else than in these dicts - -@type_check_only -class _TreeviewColumnDict(TypedDict): - width: int - minwidth: int - stretch: bool # actually 0 or 1 - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] - id: str - -class Treeview(Widget, tkinter.XView, tkinter.YView): - def __init__( - self, - master: tkinter.Misc | None = None, - *, - class_: str = "", - columns: str | list[str] | list[int] | list[str | int] | tuple[str | int, ...] = "", - cursor: tkinter._Cursor = "", - displaycolumns: str | int | list[str] | tuple[str, ...] | list[int] | tuple[int, ...] = ("#all",), - height: int = 10, - name: str = ..., - padding: _Padding = ..., - selectmode: Literal["extended", "browse", "none"] = "extended", - # list/tuple of Literal don't actually work in mypy - # - # 'tree headings' is same as ['tree', 'headings'], and I wouldn't be - # surprised if someone is using it. - show: Literal["tree", "headings", "tree headings", ""] | list[str] | tuple[str, ...] = ("tree", "headings"), - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - xscrollcommand: str | Callable[[float, float], object] = "", - yscrollcommand: str | Callable[[float, float], object] = "", - ) -> None: ... - - @overload - def configure( - self, - cnf: dict[str, Any] | None = None, - *, - columns: str | list[str] | list[int] | list[str | int] | tuple[str | int, ...] = ..., - cursor: tkinter._Cursor = ..., - displaycolumns: str | int | list[str] | tuple[str, ...] | list[int] | tuple[int, ...] = ..., - height: int = ..., - padding: _Padding = ..., - selectmode: Literal["extended", "browse", "none"] = ..., - show: Literal["tree", "headings", "tree headings", ""] | list[str] | tuple[str, ...] = ..., - style: str = ..., - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = ..., - xscrollcommand: str | Callable[[float, float], object] = ..., - yscrollcommand: str | Callable[[float, float], object] = ..., - ) -> dict[str, tuple[str, str, str, Any, Any]] | None: ... - @overload - def configure(self, cnf: str) -> tuple[str, str, str, Any, Any]: ... - - config = configure - def bbox(self, item: str | int, column: str | int | None = None) -> tuple[int, int, int, int] | Literal[""]: ... # type: ignore[override] - def get_children(self, item: str | int | None = None) -> tuple[str, ...]: ... - def set_children(self, item: str | int, *newchildren: str | int) -> None: ... - - @overload - def column(self, column: str | int, option: Literal["width", "minwidth"]) -> int: ... - @overload - def column(self, column: str | int, option: Literal["stretch"]) -> bool: ... # actually 0 or 1 - @overload - def column(self, column: str | int, option: Literal["anchor"]) -> _tkinter.Tcl_Obj: ... - @overload - def column(self, column: str | int, option: Literal["id"]) -> str: ... - @overload - def column(self, column: str | int, option: str) -> Any: ... - @overload - def column( - self, - column: str | int, - option: None = None, - *, - width: int = ..., - minwidth: int = ..., - stretch: bool = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - # id is read-only - ) -> _TreeviewColumnDict | None: ... - - def delete(self, *items: str | int) -> None: ... - def detach(self, *items: str | int) -> None: ... - def exists(self, item: str | int) -> bool: ... - - @overload # type: ignore[override] - def focus(self, item: None = None) -> str: ... # can return empty string - @overload - def focus(self, item: str | int) -> Literal[""]: ... - - @overload - def heading(self, column: str | int, option: Literal["text"]) -> str: ... - @overload - def heading(self, column: str | int, option: Literal["image"]) -> tuple[str] | str: ... - @overload - def heading(self, column: str | int, option: Literal["anchor"]) -> _tkinter.Tcl_Obj: ... - @overload - def heading(self, column: str | int, option: Literal["command"]) -> str: ... - @overload - def heading(self, column: str | int, option: str) -> Any: ... - @overload - def heading(self, column: str | int, option: None = None) -> _TreeviewHeaderDict: ... - @overload - def heading( - self, - column: str | int, - option: None = None, - *, - text: str = ..., - image: tkinter._Image | str = ..., - anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = ..., - command: str | Callable[[], object] = ..., - ) -> None: ... - - # Internal Method. Leave untyped: - def identify(self, component, x, y): ... # type: ignore[override] - def identify_row(self, y: int) -> str: ... - def identify_column(self, x: int) -> str: ... - def identify_region(self, x: int, y: int) -> Literal["heading", "separator", "tree", "cell", "nothing"]: ... - def identify_element(self, x: int, y: int) -> str: ... # don't know what possible return values are - def index(self, item: str | int) -> int: ... - def insert( - self, - parent: str, - index: int | Literal["end"], - iid: str | int | None = None, - *, - id: str | int = ..., # same as iid - text: str = ..., - image: tkinter._Image | str = ..., - values: list[Any] | tuple[Any, ...] = ..., - open: bool = ..., - tags: str | list[str] | tuple[str, ...] = ..., - ) -> str: ... - - @overload - def item(self, item: str | int, option: Literal["text"]) -> str: ... - @overload - def item(self, item: str | int, option: Literal["image"]) -> tuple[str] | Literal[""]: ... - @overload - def item(self, item: str | int, option: Literal["values"]) -> tuple[Any, ...] | Literal[""]: ... - @overload - def item(self, item: str | int, option: Literal["open"]) -> bool: ... # actually 0 or 1 - @overload - def item(self, item: str | int, option: Literal["tags"]) -> tuple[str, ...] | Literal[""]: ... - @overload - def item(self, item: str | int, option: str) -> Any: ... - @overload - def item(self, item: str | int, option: None = None) -> _TreeviewItemDict: ... - @overload - def item( - self, - item: str | int, - option: None = None, - *, - text: str = ..., - image: tkinter._Image | str = ..., - values: list[Any] | tuple[Any, ...] | Literal[""] = ..., - open: bool = ..., - tags: str | list[str] | tuple[str, ...] = ..., - ) -> None: ... - - def move(self, item: str | int, parent: str, index: int | Literal["end"]) -> None: ... - reattach = move - def next(self, item: str | int) -> str: ... # returning empty string means last item - def parent(self, item: str | int) -> str: ... - def prev(self, item: str | int) -> str: ... # returning empty string means first item - def see(self, item: str | int) -> None: ... - def selection(self) -> tuple[str, ...]: ... - - @overload - def selection_set(self, items: list[str] | tuple[str, ...] | list[int] | tuple[int, ...], /) -> None: ... - @overload - def selection_set(self, *items: str | int) -> None: ... - - @overload - def selection_add(self, items: list[str] | tuple[str, ...] | list[int] | tuple[int, ...], /) -> None: ... - @overload - def selection_add(self, *items: str | int) -> None: ... - - @overload - def selection_remove(self, items: list[str] | tuple[str, ...] | list[int] | tuple[int, ...], /) -> None: ... - @overload - def selection_remove(self, *items: str | int) -> None: ... - - @overload - def selection_toggle(self, items: list[str] | tuple[str, ...] | list[int] | tuple[int, ...], /) -> None: ... - @overload - def selection_toggle(self, *items: str | int) -> None: ... - - @overload - def set(self, item: str | int, column: None = None, value: None = None) -> dict[str, Any]: ... - @overload - def set(self, item: str | int, column: str | int, value: None = None) -> Any: ... - @overload - def set(self, item: str | int, column: str | int, value: Any) -> Literal[""]: ... - - # There's no tag_unbind() or 'add' argument for whatever reason. - # Also, it's 'callback' instead of 'func' here. - @overload - def tag_bind( - self, tagname: str, sequence: str | None = None, callback: Callable[[tkinter.Event[Treeview]], object] | None = None - ) -> str: ... - @overload - def tag_bind(self, tagname: str, sequence: str | None, callback: str) -> None: ... - @overload - def tag_bind(self, tagname: str, *, callback: str) -> None: ... - - @overload - def tag_configure(self, tagname: str, option: Literal["foreground", "background"]) -> str: ... - @overload - def tag_configure(self, tagname: str, option: Literal["font"]) -> _FontDescription: ... - @overload - def tag_configure(self, tagname: str, option: Literal["image"]) -> str: ... - @overload - def tag_configure( - self, - tagname: str, - option: None = None, - *, - # There is also 'text' and 'anchor', but they don't seem to do anything, using them is likely a bug - foreground: str = ..., - background: str = ..., - font: _FontDescription = ..., - image: tkinter._Image | str = ..., - ) -> _TreeviewTagDict | MaybeNone: ... # can be None but annoying to check - - @overload - def tag_has(self, tagname: str, item: None = None) -> tuple[str, ...]: ... - @overload - def tag_has(self, tagname: str, item: str | int) -> bool: ... - -class LabeledScale(Frame): - label: Label - scale: Scale - # This should be kept in sync with tkinter.ttk.Frame.__init__() - # (all the keyword-only args except compound are from there) - def __init__( - self, - master: tkinter.Misc | None = None, - variable: tkinter.IntVar | tkinter.DoubleVar | None = None, - from_: float = 0, - to: float = 10, - *, - border: float | str = ..., - borderwidth: float | str = ..., - class_: str = "", - compound: Literal["top", "bottom"] = "top", - cursor: tkinter._Cursor = "", - height: float | str = 0, - name: str = ..., - padding: _Padding = ..., - relief: Literal["raised", "sunken", "flat", "ridge", "solid", "groove"] = ..., - style: str = "", - takefocus: bool | Literal[0, 1, ""] | Callable[[str], bool | None] = "", - width: float | str = 0, - ) -> None: ... - # destroy is overridden, signature does not change - value: Any - -class OptionMenu(Menubutton): - if sys.version_info >= (3, 14): - def __init__( - self, - master: tkinter.Misc | None, - variable: tkinter.StringVar, - default: str | None = None, - *values: str, - # rest of these are keyword-only because *args syntax used above - style: str = "", - direction: Literal["above", "below", "left", "right", "flush"] = "below", - command: Callable[[tkinter.StringVar], object] | None = None, - name: str | None = None, - ) -> None: ... - else: - def __init__( - self, - master: tkinter.Misc | None, - variable: tkinter.StringVar, - default: str | None = None, - *values: str, - # rest of these are keyword-only because *args syntax used above - style: str = "", - direction: Literal["above", "below", "left", "right", "flush"] = "below", - command: Callable[[tkinter.StringVar], object] | None = None, - ) -> None: ... - # configure, config, cget, destroy are inherited from Menubutton - # destroy and __setitem__ are overridden, signature does not change - def set_menu(self, default: str | None = None, *values: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/token.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/token.vpi deleted file mode 100644 index 23b43250..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/token.vpi +++ /dev/null @@ -1,166 +0,0 @@ -import sys -from typing import Final - -__all__ = [ - "AMPER", - "AMPEREQUAL", - "AT", - "ATEQUAL", - "CIRCUMFLEX", - "CIRCUMFLEXEQUAL", - "COLON", - "COLONEQUAL", - "COMMA", - "DEDENT", - "DOT", - "DOUBLESLASH", - "DOUBLESLASHEQUAL", - "DOUBLESTAR", - "DOUBLESTAREQUAL", - "ELLIPSIS", - "ENDMARKER", - "EQEQUAL", - "EQUAL", - "ERRORTOKEN", - "GREATER", - "GREATEREQUAL", - "INDENT", - "ISEOF", - "ISNONTERMINAL", - "ISTERMINAL", - "LBRACE", - "LEFTSHIFT", - "LEFTSHIFTEQUAL", - "LESS", - "LESSEQUAL", - "LPAR", - "LSQB", - "MINEQUAL", - "MINUS", - "NAME", - "NEWLINE", - "NOTEQUAL", - "NT_OFFSET", - "NUMBER", - "N_TOKENS", - "OP", - "PERCENT", - "PERCENTEQUAL", - "PLUS", - "PLUSEQUAL", - "RARROW", - "RBRACE", - "RIGHTSHIFT", - "RIGHTSHIFTEQUAL", - "RPAR", - "RSQB", - "SEMI", - "SLASH", - "SLASHEQUAL", - "SOFT_KEYWORD", - "STAR", - "STAREQUAL", - "STRING", - "TILDE", - "TYPE_COMMENT", - "TYPE_IGNORE", - "VBAR", - "VBAREQUAL", - "tok_name", - "ENCODING", - "NL", - "COMMENT", -] -if sys.version_info < (3, 13): - __all__ += ["ASYNC", "AWAIT"] - -if sys.version_info >= (3, 12): - __all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START", "EXACT_TOKEN_TYPES"] - -if sys.version_info >= (3, 14): - __all__ += ["TSTRING_START", "TSTRING_MIDDLE", "TSTRING_END"] - -ENDMARKER: Final[int] -NAME: Final[int] -NUMBER: Final[int] -STRING: Final[int] -NEWLINE: Final[int] -INDENT: Final[int] -DEDENT: Final[int] -LPAR: Final[int] -RPAR: Final[int] -LSQB: Final[int] -RSQB: Final[int] -COLON: Final[int] -COMMA: Final[int] -SEMI: Final[int] -PLUS: Final[int] -MINUS: Final[int] -STAR: Final[int] -SLASH: Final[int] -VBAR: Final[int] -AMPER: Final[int] -LESS: Final[int] -GREATER: Final[int] -EQUAL: Final[int] -DOT: Final[int] -PERCENT: Final[int] -LBRACE: Final[int] -RBRACE: Final[int] -EQEQUAL: Final[int] -NOTEQUAL: Final[int] -LESSEQUAL: Final[int] -GREATEREQUAL: Final[int] -TILDE: Final[int] -CIRCUMFLEX: Final[int] -LEFTSHIFT: Final[int] -RIGHTSHIFT: Final[int] -DOUBLESTAR: Final[int] -PLUSEQUAL: Final[int] -MINEQUAL: Final[int] -STAREQUAL: Final[int] -SLASHEQUAL: Final[int] -PERCENTEQUAL: Final[int] -AMPEREQUAL: Final[int] -VBAREQUAL: Final[int] -CIRCUMFLEXEQUAL: Final[int] -LEFTSHIFTEQUAL: Final[int] -RIGHTSHIFTEQUAL: Final[int] -DOUBLESTAREQUAL: Final[int] -DOUBLESLASH: Final[int] -DOUBLESLASHEQUAL: Final[int] -AT: Final[int] -RARROW: Final[int] -ELLIPSIS: Final[int] -ATEQUAL: Final[int] -if sys.version_info < (3, 13): - AWAIT: Final[int] - ASYNC: Final[int] -OP: Final[int] -ERRORTOKEN: Final[int] -N_TOKENS: Final[int] -NT_OFFSET: Final[int] -tok_name: Final[dict[int, str]] -COMMENT: Final[int] -NL: Final[int] -ENCODING: Final[int] -TYPE_COMMENT: Final[int] -TYPE_IGNORE: Final[int] -COLONEQUAL: Final[int] -EXACT_TOKEN_TYPES: Final[dict[str, int]] -SOFT_KEYWORD: Final[int] - -if sys.version_info >= (3, 12): - EXCLAMATION: Final[int] - FSTRING_END: Final[int] - FSTRING_MIDDLE: Final[int] - FSTRING_START: Final[int] - -if sys.version_info >= (3, 14): - TSTRING_START: Final[int] - TSTRING_MIDDLE: Final[int] - TSTRING_END: Final[int] - -def ISTERMINAL(x: int) -> bool: ... -def ISNONTERMINAL(x: int) -> bool: ... -def ISEOF(x: int) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tokenize.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tokenize.vpi deleted file mode 100644 index 0aa3947a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tokenize.vpi +++ /dev/null @@ -1,201 +0,0 @@ -import sys -from _typeshed import FileDescriptorOrPath -from collections.abc import Callable, Generator, Iterable, Sequence -from re import Pattern -from token import * -from typing import Any, Final, NamedTuple, TextIO, TypeAlias, type_check_only -from typing_extensions import disjoint_base - -if sys.version_info < (3, 12): - # Avoid double assignment to Final name by imports, which pyright objects to. - # EXACT_TOKEN_TYPES is already defined by 'from token import *' above - # in Python 3.12+. - from token import EXACT_TOKEN_TYPES as EXACT_TOKEN_TYPES - -__all__ = [ - "AMPER", - "AMPEREQUAL", - "AT", - "ATEQUAL", - "CIRCUMFLEX", - "CIRCUMFLEXEQUAL", - "COLON", - "COLONEQUAL", - "COMMA", - "COMMENT", - "DEDENT", - "DOT", - "DOUBLESLASH", - "DOUBLESLASHEQUAL", - "DOUBLESTAR", - "DOUBLESTAREQUAL", - "ELLIPSIS", - "ENCODING", - "ENDMARKER", - "EQEQUAL", - "EQUAL", - "ERRORTOKEN", - "GREATER", - "GREATEREQUAL", - "INDENT", - "ISEOF", - "ISNONTERMINAL", - "ISTERMINAL", - "LBRACE", - "LEFTSHIFT", - "LEFTSHIFTEQUAL", - "LESS", - "LESSEQUAL", - "LPAR", - "LSQB", - "MINEQUAL", - "MINUS", - "NAME", - "NEWLINE", - "NL", - "NOTEQUAL", - "NT_OFFSET", - "NUMBER", - "N_TOKENS", - "OP", - "PERCENT", - "PERCENTEQUAL", - "PLUS", - "PLUSEQUAL", - "RARROW", - "RBRACE", - "RIGHTSHIFT", - "RIGHTSHIFTEQUAL", - "RPAR", - "RSQB", - "SEMI", - "SLASH", - "SLASHEQUAL", - "SOFT_KEYWORD", - "STAR", - "STAREQUAL", - "STRING", - "TILDE", - "TYPE_COMMENT", - "TYPE_IGNORE", - "TokenInfo", - "VBAR", - "VBAREQUAL", - "detect_encoding", - "generate_tokens", - "tok_name", - "tokenize", - "untokenize", -] -if sys.version_info < (3, 13): - __all__ += ["ASYNC", "AWAIT"] - -if sys.version_info >= (3, 12): - __all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START", "EXACT_TOKEN_TYPES"] - -if sys.version_info >= (3, 13): - __all__ += ["TokenError", "open"] - -if sys.version_info >= (3, 14): - __all__ += ["TSTRING_START", "TSTRING_MIDDLE", "TSTRING_END"] - -cookie_re: Final[Pattern[str]] -blank_re: Final[Pattern[bytes]] - -_Position: TypeAlias = tuple[int, int] - -# This class is not exposed. It calls itself tokenize.TokenInfo. -@type_check_only -class _TokenInfo(NamedTuple): - type: int - string: str - start: _Position - end: _Position - line: str - -if sys.version_info >= (3, 12): - class TokenInfo(_TokenInfo): - @property - def exact_type(self) -> int: ... - -else: - @disjoint_base - class TokenInfo(_TokenInfo): - @property - def exact_type(self) -> int: ... - -# Backwards compatible tokens can be sequences of a shorter length too -_Token: TypeAlias = TokenInfo | Sequence[int | str | _Position] - -class TokenError(Exception): ... - -if sys.version_info < (3, 13): - class StopTokenizing(Exception): ... # undocumented - -class Untokenizer: - tokens: list[str] - prev_row: int - prev_col: int - encoding: str | None - def add_whitespace(self, start: _Position) -> None: ... - if sys.version_info >= (3, 12): - def add_backslash_continuation(self, start: _Position) -> None: ... - - def untokenize(self, iterable: Iterable[_Token]) -> str: ... - def compat(self, token: Sequence[int | str], iterable: Iterable[_Token]) -> None: ... - if sys.version_info >= (3, 12): - def escape_brackets(self, token: str) -> str: ... - -# Returns str, unless the ENCODING token is present, in which case it returns bytes. -def untokenize(iterable: Iterable[_Token]) -> str | Any: ... -def detect_encoding(readline: Callable[[], bytes | bytearray]) -> tuple[str, Sequence[bytes]]: ... -def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo]: ... -def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo]: ... -def open(filename: FileDescriptorOrPath) -> TextIO: ... -def group(*choices: str) -> str: ... # undocumented -def any(*choices: str) -> str: ... # undocumented -def maybe(*choices: str) -> str: ... # undocumented - -Whitespace: Final[str] # undocumented -Comment: Final[str] # undocumented -Ignore: Final[str] # undocumented -Name: Final[str] # undocumented - -Hexnumber: Final[str] # undocumented -Binnumber: Final[str] # undocumented -Octnumber: Final[str] # undocumented -Decnumber: Final[str] # undocumented -Intnumber: Final[str] # undocumented -Exponent: Final[str] # undocumented -Pointfloat: Final[str] # undocumented -Expfloat: Final[str] # undocumented -Floatnumber: Final[str] # undocumented -Imagnumber: Final[str] # undocumented -Number: Final[str] # undocumented - -def _all_string_prefixes() -> set[str]: ... # undocumented - -StringPrefix: Final[str] # undocumented - -Single: Final[str] # undocumented -Double: Final[str] # undocumented -Single3: Final[str] # undocumented -Double3: Final[str] # undocumented -Triple: Final[str] # undocumented -String: Final[str] # undocumented - -Special: Final[str] # undocumented -Funny: Final[str] # undocumented - -PlainToken: Final[str] # undocumented -Token: Final[str] # undocumented - -ContStr: Final[str] # undocumented -PseudoExtras: Final[str] # undocumented -PseudoToken: Final[str] # undocumented - -endpats: Final[dict[str, str]] # undocumented -single_quoted: Final[set[str]] # undocumented -triple_quoted: Final[set[str]] # undocumented - -tabsize: Final = 8 # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tomllib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tomllib.vpi deleted file mode 100644 index 7f6df1d9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tomllib.vpi +++ /dev/null @@ -1,27 +0,0 @@ -import sys -from _typeshed import SupportsRead -from collections.abc import Callable -from typing import Any, overload -from typing_extensions import deprecated - -__all__ = ("loads", "load", "TOMLDecodeError") - -if sys.version_info >= (3, 14): - class TOMLDecodeError(ValueError): - msg: str - doc: str - pos: int - lineno: int - colno: int - - @overload - def __init__(self, msg: str, doc: str, pos: int) -> None: ... - @overload - @deprecated("Deprecated since Python 3.14. Set the 'msg', 'doc' and 'pos' arguments only.") - def __init__(self, msg: str | type = ..., doc: str | type = ..., pos: int | type = ..., *args: Any) -> None: ... - -else: - class TOMLDecodeError(ValueError): ... - -def load(fp: SupportsRead[bytes], /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ... -def loads(s: str, /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/trace.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/trace.vpi deleted file mode 100644 index 708233ef..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/trace.vpi +++ /dev/null @@ -1,85 +0,0 @@ -import sys -import types -from _typeshed import Incomplete, StrPath, TraceFunction -from collections.abc import Callable, Iterable, Mapping, Sequence -from typing import Any, ParamSpec, TypeAlias, TypeVar - -__all__ = ["Trace", "CoverageResults"] - -_T = TypeVar("_T") -_P = ParamSpec("_P") -_FileModuleFunction: TypeAlias = tuple[str, str | None, str] - -class CoverageResults: - counts: dict[tuple[str, int], int] - counter: dict[tuple[str, int], int] - calledfuncs: dict[_FileModuleFunction, int] - callers: dict[tuple[_FileModuleFunction, _FileModuleFunction], int] - inifile: StrPath | None - outfile: StrPath | None - def __init__( - self, - counts: dict[tuple[str, int], int] | None = None, - calledfuncs: dict[_FileModuleFunction, int] | None = None, - infile: StrPath | None = None, - callers: dict[tuple[_FileModuleFunction, _FileModuleFunction], int] | None = None, - outfile: StrPath | None = None, - ) -> None: ... # undocumented - def update(self, other: CoverageResults) -> None: ... - if sys.version_info >= (3, 13): - def write_results( - self, - show_missing: bool = True, - summary: bool = False, - coverdir: StrPath | None = None, - *, - ignore_missing_files: bool = False, - ) -> None: ... - else: - def write_results(self, show_missing: bool = True, summary: bool = False, coverdir: StrPath | None = None) -> None: ... - - def write_results_file( - self, path: StrPath, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: str | None = None - ) -> tuple[int, int]: ... - def is_ignored_filename(self, filename: str) -> bool: ... # undocumented - -class _Ignore: - def __init__(self, modules: Iterable[str] | None = None, dirs: Iterable[StrPath] | None = None) -> None: ... - def names(self, filename: str, modulename: str) -> int: ... - -class Trace: - inifile: StrPath | None - outfile: StrPath | None - ignore: _Ignore - counts: dict[str, int] - pathtobasename: dict[Incomplete, Incomplete] - donothing: int - trace: int - start_time: int | None - globaltrace: TraceFunction - localtrace: TraceFunction - def __init__( - self, - count: int = 1, - trace: int = 1, - countfuncs: int = 0, - countcallers: int = 0, - ignoremods: Sequence[str] = (), - ignoredirs: Sequence[str] = (), - infile: StrPath | None = None, - outfile: StrPath | None = None, - timing: bool = False, - ) -> None: ... - def run(self, cmd: str | types.CodeType) -> None: ... - def runctx( - self, cmd: str | types.CodeType, globals: Mapping[str, Any] | None = None, locals: Mapping[str, Any] | None = None - ) -> None: ... - def runfunc(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ... - def file_module_function_of(self, frame: types.FrameType) -> _FileModuleFunction: ... - def globaltrace_trackcallers(self, frame: types.FrameType, why: str, arg: Any) -> None: ... - def globaltrace_countfuncs(self, frame: types.FrameType, why: str, arg: Any) -> None: ... - def globaltrace_lt(self, frame: types.FrameType, why: str, arg: Any) -> None: ... - def localtrace_trace_and_count(self, frame: types.FrameType, why: str, arg: Any) -> TraceFunction: ... - def localtrace_trace(self, frame: types.FrameType, why: str, arg: Any) -> TraceFunction: ... - def localtrace_count(self, frame: types.FrameType, why: str, arg: Any) -> TraceFunction: ... - def results(self) -> CoverageResults: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/traceback.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/traceback.vpi deleted file mode 100644 index e5b410af..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/traceback.vpi +++ /dev/null @@ -1,293 +0,0 @@ -import sys -from _typeshed import SupportsWrite, Unused -from collections.abc import Generator, Iterable, Iterator, Mapping -from types import FrameType, TracebackType -from typing import Any, ClassVar, Literal, SupportsIndex, TypeAlias, overload -from typing_extensions import Self, deprecated - -__all__ = [ - "extract_stack", - "extract_tb", - "format_exception", - "format_exception_only", - "format_list", - "format_stack", - "format_tb", - "print_exc", - "format_exc", - "print_exception", - "print_last", - "print_stack", - "print_tb", - "clear_frames", - "FrameSummary", - "StackSummary", - "TracebackException", - "walk_stack", - "walk_tb", -] - -if sys.version_info >= (3, 14): - __all__ += ["print_list"] - -_FrameSummaryTuple: TypeAlias = tuple[str, int, str, str | None] - -def print_tb(tb: TracebackType | None, limit: int | None = None, file: SupportsWrite[str] | None = None) -> None: ... - -@overload -def print_exception( - exc: type[BaseException] | None, - /, - value: BaseException | None = ..., - tb: TracebackType | None = ..., - limit: int | None = None, - file: SupportsWrite[str] | None = None, - chain: bool = True, -) -> None: ... -@overload -def print_exception( - exc: BaseException, /, *, limit: int | None = None, file: SupportsWrite[str] | None = None, chain: bool = True -) -> None: ... - -@overload -def format_exception( - exc: type[BaseException] | None, - /, - value: BaseException | None = ..., - tb: TracebackType | None = ..., - limit: int | None = None, - chain: bool = True, -) -> list[str]: ... -@overload -def format_exception(exc: BaseException, /, *, limit: int | None = None, chain: bool = True) -> list[str]: ... - -def print_exc(limit: int | None = None, file: SupportsWrite[str] | None = None, chain: bool = True) -> None: ... -def print_last(limit: int | None = None, file: SupportsWrite[str] | None = None, chain: bool = True) -> None: ... -def print_stack(f: FrameType | None = None, limit: int | None = None, file: SupportsWrite[str] | None = None) -> None: ... -def extract_tb(tb: TracebackType | None, limit: int | None = None) -> StackSummary: ... -def extract_stack(f: FrameType | None = None, limit: int | None = None) -> StackSummary: ... -def format_list(extracted_list: Iterable[FrameSummary | _FrameSummaryTuple]) -> list[str]: ... -def print_list(extracted_list: Iterable[FrameSummary | _FrameSummaryTuple], file: SupportsWrite[str] | None = None) -> None: ... - -if sys.version_info >= (3, 13): - @overload - def format_exception_only(exc: BaseException | None, /, *, show_group: bool = False) -> list[str]: ... - @overload - def format_exception_only(exc: Unused, /, value: BaseException | None, *, show_group: bool = False) -> list[str]: ... -else: - @overload - def format_exception_only(exc: BaseException | None, /) -> list[str]: ... - @overload - def format_exception_only(exc: Unused, /, value: BaseException | None) -> list[str]: ... - -def format_exc(limit: int | None = None, chain: bool = True) -> str: ... -def format_tb(tb: TracebackType | None, limit: int | None = None) -> list[str]: ... -def format_stack(f: FrameType | None = None, limit: int | None = None) -> list[str]: ... -def clear_frames(tb: TracebackType | None) -> None: ... -def walk_stack(f: FrameType | None) -> Iterator[tuple[FrameType, int]]: ... -def walk_tb(tb: TracebackType | None) -> Iterator[tuple[FrameType, int]]: ... - -if sys.version_info >= (3, 11): - class _ExceptionPrintContext: - def indent(self) -> str: ... - def emit(self, text_gen: str | Iterable[str], margin_char: str | None = None) -> Generator[str]: ... - -class TracebackException: - __cause__: TracebackException | None - __context__: TracebackException | None - if sys.version_info >= (3, 11): - exceptions: list[TracebackException] | None - __suppress_context__: bool - if sys.version_info >= (3, 11): - __notes__: list[str] | None - stack: StackSummary - - # These fields only exist for `SyntaxError`s, but there is no way to express that in the type system. - filename: str - lineno: str | None - end_lineno: str | None - text: str - offset: int - end_offset: int | None - msg: str - - if sys.version_info >= (3, 13): - @property - def exc_type_str(self) -> str: ... - @property - @deprecated("Deprecated since Python 3.13. Use `exc_type_str` instead.") - def exc_type(self) -> type[BaseException] | None: ... - else: - exc_type: type[BaseException] - if sys.version_info >= (3, 13): - def __init__( - self, - exc_type: type[BaseException], - exc_value: BaseException, - exc_traceback: TracebackType | None, - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - compact: bool = False, - max_group_width: int = 15, - max_group_depth: int = 10, - save_exc_type: bool = True, - _seen: set[int] | None = None, - ) -> None: ... - elif sys.version_info >= (3, 11): - def __init__( - self, - exc_type: type[BaseException], - exc_value: BaseException, - exc_traceback: TracebackType | None, - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - compact: bool = False, - max_group_width: int = 15, - max_group_depth: int = 10, - _seen: set[int] | None = None, - ) -> None: ... - else: - def __init__( - self, - exc_type: type[BaseException], - exc_value: BaseException, - exc_traceback: TracebackType | None, - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - compact: bool = False, - _seen: set[int] | None = None, - ) -> None: ... - - if sys.version_info >= (3, 11): - @classmethod - def from_exception( - cls, - exc: BaseException, - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - compact: bool = False, - max_group_width: int = 15, - max_group_depth: int = 10, - ) -> Self: ... - else: - @classmethod - def from_exception( - cls, - exc: BaseException, - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - compact: bool = False, - ) -> Self: ... - - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - if sys.version_info >= (3, 11): - def format(self, *, chain: bool = True, _ctx: _ExceptionPrintContext | None = None) -> Generator[str]: ... - else: - def format(self, *, chain: bool = True) -> Generator[str]: ... - - if sys.version_info >= (3, 13): - def format_exception_only(self, *, show_group: bool = False, _depth: int = 0) -> Generator[str]: ... - else: - def format_exception_only(self) -> Generator[str]: ... - - if sys.version_info >= (3, 11): - def print(self, *, file: SupportsWrite[str] | None = None, chain: bool = True) -> None: ... - -class FrameSummary: - if sys.version_info >= (3, 13): - __slots__ = ( - "filename", - "lineno", - "end_lineno", - "colno", - "end_colno", - "name", - "_lines", - "_lines_dedented", - "locals", - "_code", - ) - elif sys.version_info >= (3, 11): - __slots__ = ("filename", "lineno", "end_lineno", "colno", "end_colno", "name", "_line", "locals") - else: - __slots__ = ("filename", "lineno", "name", "_line", "locals") - if sys.version_info >= (3, 11): - def __init__( - self, - filename: str, - lineno: int | None, - name: str, - *, - lookup_line: bool = True, - locals: Mapping[str, str] | None = None, - line: str | None = None, - end_lineno: int | None = None, - colno: int | None = None, - end_colno: int | None = None, - ) -> None: ... - end_lineno: int | None - colno: int | None - end_colno: int | None - else: - def __init__( - self, - filename: str, - lineno: int | None, - name: str, - *, - lookup_line: bool = True, - locals: Mapping[str, str] | None = None, - line: str | None = None, - ) -> None: ... - filename: str - lineno: int | None - name: str - locals: dict[str, str] | None - @property - def line(self) -> str | None: ... - - @overload - def __getitem__(self, pos: Literal[0]) -> str: ... - @overload - def __getitem__(self, pos: Literal[1]) -> int: ... - @overload - def __getitem__(self, pos: Literal[2]) -> str: ... - @overload - def __getitem__(self, pos: Literal[3]) -> str | None: ... - @overload - def __getitem__(self, pos: SupportsIndex) -> Any: ... - @overload - def __getitem__(self, pos: slice[SupportsIndex | None]) -> tuple[Any, ...]: ... - - def __iter__(self) -> Iterator[Any]: ... - def __eq__(self, other: object) -> bool: ... - def __len__(self) -> Literal[4]: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -class StackSummary(list[FrameSummary]): - @classmethod - def extract( - cls, - frame_gen: Iterable[tuple[FrameType, int]], - *, - limit: int | None = None, - lookup_lines: bool = True, - capture_locals: bool = False, - ) -> StackSummary: ... - @classmethod - def from_list(cls, a_list: Iterable[FrameSummary | _FrameSummaryTuple]) -> StackSummary: ... - if sys.version_info >= (3, 11): - def format_frame_summary(self, frame_summary: FrameSummary) -> str: ... - - def format(self) -> list[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tracemalloc.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tracemalloc.vpi deleted file mode 100644 index e56aa192..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tracemalloc.vpi +++ /dev/null @@ -1,123 +0,0 @@ -import sys -from _tracemalloc import * -from collections.abc import Sequence -from typing import Any, SupportsIndex, TypeAlias, overload - -def get_object_traceback(obj: object) -> Traceback | None: ... -def take_snapshot() -> Snapshot: ... - -class BaseFilter: - inclusive: bool - def __init__(self, inclusive: bool) -> None: ... - -class DomainFilter(BaseFilter): - @property - def domain(self) -> int: ... - def __init__(self, inclusive: bool, domain: int) -> None: ... - -class Filter(BaseFilter): - domain: int | None - lineno: int | None - @property - def filename_pattern(self) -> str: ... - all_frames: bool - def __init__( - self, - inclusive: bool, - filename_pattern: str, - lineno: int | None = None, - all_frames: bool = False, - domain: int | None = None, - ) -> None: ... - -class Statistic: - __slots__ = ("traceback", "size", "count") - count: int - size: int - traceback: Traceback - def __init__(self, traceback: Traceback, size: int, count: int) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -class StatisticDiff: - __slots__ = ("traceback", "size", "size_diff", "count", "count_diff") - count: int - count_diff: int - size: int - size_diff: int - traceback: Traceback - def __init__(self, traceback: Traceback, size: int, size_diff: int, count: int, count_diff: int) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -_FrameTuple: TypeAlias = tuple[str, int] - -class Frame: - __slots__ = ("_frame",) - @property - def filename(self) -> str: ... - @property - def lineno(self) -> int: ... - def __init__(self, frame: _FrameTuple) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __lt__(self, other: Frame) -> bool: ... - if sys.version_info >= (3, 11): - def __gt__(self, other: Frame) -> bool: ... - def __ge__(self, other: Frame) -> bool: ... - def __le__(self, other: Frame) -> bool: ... - else: - def __gt__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... - def __ge__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... - def __le__(self, other: Frame, NotImplemented: Any = ...) -> bool: ... - -_TraceTuple: TypeAlias = tuple[int, int, Sequence[_FrameTuple], int | None] | tuple[int, int, Sequence[_FrameTuple]] - -class Trace: - __slots__ = ("_trace",) - @property - def domain(self) -> int: ... - @property - def size(self) -> int: ... - @property - def traceback(self) -> Traceback: ... - def __init__(self, trace: _TraceTuple) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -class Traceback(Sequence[Frame]): - __slots__ = ("_frames", "_total_nframe") - @property - def total_nframe(self) -> int | None: ... - def __init__(self, frames: Sequence[_FrameTuple], total_nframe: int | None = None) -> None: ... - def format(self, limit: int | None = None, most_recent_first: bool = False) -> list[str]: ... - - @overload - def __getitem__(self, index: SupportsIndex) -> Frame: ... - @overload - def __getitem__(self, index: slice[SupportsIndex | None]) -> Sequence[Frame]: ... - - def __contains__(self, frame: Frame) -> bool: ... # type: ignore[override] - def __len__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __lt__(self, other: Traceback) -> bool: ... - if sys.version_info >= (3, 11): - def __gt__(self, other: Traceback) -> bool: ... - def __ge__(self, other: Traceback) -> bool: ... - def __le__(self, other: Traceback) -> bool: ... - else: - def __gt__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... - def __ge__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... - def __le__(self, other: Traceback, NotImplemented: Any = ...) -> bool: ... - -class Snapshot: - def __init__(self, traces: Sequence[_TraceTuple], traceback_limit: int) -> None: ... - def compare_to(self, old_snapshot: Snapshot, key_type: str, cumulative: bool = False) -> list[StatisticDiff]: ... - def dump(self, filename: str) -> None: ... - def filter_traces(self, filters: Sequence[DomainFilter | Filter]) -> Snapshot: ... - @staticmethod - def load(filename: str) -> Snapshot: ... - def statistics(self, key_type: str, cumulative: bool = False) -> list[Statistic]: ... - traceback_limit: int - traces: Sequence[Trace] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/tty.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/tty.vpi deleted file mode 100644 index a0478335..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/tty.vpi +++ /dev/null @@ -1,29 +0,0 @@ -import sys -import termios -from typing import IO, Final, TypeAlias - -if sys.platform != "win32": - __all__ = ["setraw", "setcbreak"] - if sys.version_info >= (3, 12): - __all__ += ["cfmakeraw", "cfmakecbreak"] - - _ModeSetterReturn: TypeAlias = termios._AttrReturn - else: - _ModeSetterReturn: TypeAlias = None - - _FD: TypeAlias = int | IO[str] - - # XXX: Undocumented integer constants - IFLAG: Final = 0 - OFLAG: Final = 1 - CFLAG: Final = 2 - LFLAG: Final = 3 - ISPEED: Final = 4 - OSPEED: Final = 5 - CC: Final = 6 - def setraw(fd: _FD, when: int = 2) -> _ModeSetterReturn: ... - def setcbreak(fd: _FD, when: int = 2) -> _ModeSetterReturn: ... - - if sys.version_info >= (3, 12): - def cfmakeraw(mode: termios._Attr) -> None: ... - def cfmakecbreak(mode: termios._Attr) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/turtle.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/turtle.vpi deleted file mode 100644 index b1f5198a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/turtle.vpi +++ /dev/null @@ -1,856 +0,0 @@ -import sys -from _typeshed import StrPath -from collections.abc import Callable, Generator, Sequence -from contextlib import contextmanager -from tkinter import Canvas, Frame, Misc, PhotoImage, Scrollbar -from typing import Any, ClassVar, Literal, TypeAlias, TypedDict, overload, type_check_only -from typing_extensions import Self, deprecated, disjoint_base - -__all__ = [ - "ScrolledCanvas", - "TurtleScreen", - "Screen", - "RawTurtle", - "Turtle", - "RawPen", - "Pen", - "Shape", - "Vec2D", - "addshape", - "bgcolor", - "bgpic", - "bye", - "clearscreen", - "colormode", - "delay", - "exitonclick", - "getcanvas", - "getshapes", - "listen", - "mainloop", - "mode", - "numinput", - "onkey", - "onkeypress", - "onkeyrelease", - "onscreenclick", - "ontimer", - "register_shape", - "resetscreen", - "screensize", - "setup", - "setworldcoordinates", - "textinput", - "title", - "tracer", - "turtles", - "update", - "window_height", - "window_width", - "back", - "backward", - "begin_fill", - "begin_poly", - "bk", - "circle", - "clear", - "clearstamp", - "clearstamps", - "clone", - "color", - "degrees", - "distance", - "dot", - "down", - "end_fill", - "end_poly", - "fd", - "fillcolor", - "filling", - "forward", - "get_poly", - "getpen", - "getscreen", - "get_shapepoly", - "getturtle", - "goto", - "heading", - "hideturtle", - "home", - "ht", - "isdown", - "isvisible", - "left", - "lt", - "onclick", - "ondrag", - "onrelease", - "pd", - "pen", - "pencolor", - "pendown", - "pensize", - "penup", - "pos", - "position", - "pu", - "radians", - "right", - "reset", - "resizemode", - "rt", - "seth", - "setheading", - "setpos", - "setposition", - "setundobuffer", - "setx", - "sety", - "shape", - "shapesize", - "shapetransform", - "shearfactor", - "showturtle", - "speed", - "st", - "stamp", - "tilt", - "tiltangle", - "towards", - "turtlesize", - "undo", - "undobufferentries", - "up", - "width", - "write", - "xcor", - "ycor", - "write_docstringdict", - "done", - "Terminator", -] - -if sys.version_info >= (3, 14): - __all__ += ["fill", "no_animation", "poly", "save"] - -if sys.version_info >= (3, 12): - __all__ += ["teleport"] - -if sys.version_info < (3, 13): - __all__ += ["settiltangle"] - -# Note: '_Color' is the alias we use for arguments and _AnyColor is the -# alias we use for return types. Really, these two aliases should be the -# same, but as per the "no union returns" typeshed policy, we'll return -# Any instead. -_Color: TypeAlias = str | tuple[float, float, float] -_AnyColor: TypeAlias = Any - -@type_check_only -class _PenState(TypedDict): - shown: bool - pendown: bool - pencolor: _Color - fillcolor: _Color - pensize: int - speed: int - resizemode: Literal["auto", "user", "noresize"] - stretchfactor: tuple[float, float] - shearfactor: float - outline: int - tilt: float - -_Speed: TypeAlias = str | float -_PolygonCoords: TypeAlias = Sequence[tuple[float, float]] - -if sys.version_info >= (3, 12): - class Vec2D(tuple[float, float]): - def __new__(cls, x: float, y: float) -> Self: ... - def __add__(self, other: tuple[float, float]) -> Vec2D: ... # type: ignore[override] - - @overload # type: ignore[override] - def __mul__(self, other: Vec2D) -> float: ... - @overload - def __mul__(self, other: float) -> Vec2D: ... - - def __rmul__(self, other: float) -> Vec2D: ... # type: ignore[override] - def __sub__(self, other: tuple[float, float]) -> Vec2D: ... - def __neg__(self) -> Vec2D: ... - def __abs__(self) -> float: ... - def rotate(self, angle: float) -> Vec2D: ... - -else: - @disjoint_base - class Vec2D(tuple[float, float]): - def __new__(cls, x: float, y: float) -> Self: ... - def __add__(self, other: tuple[float, float]) -> Vec2D: ... # type: ignore[override] - - @overload # type: ignore[override] - def __mul__(self, other: Vec2D) -> float: ... - @overload - def __mul__(self, other: float) -> Vec2D: ... - - def __rmul__(self, other: float) -> Vec2D: ... # type: ignore[override] - def __sub__(self, other: tuple[float, float]) -> Vec2D: ... - def __neg__(self) -> Vec2D: ... - def __abs__(self) -> float: ... - def rotate(self, angle: float) -> Vec2D: ... - -# Does not actually inherit from Canvas, but dynamically gets all methods of Canvas -class ScrolledCanvas(Canvas, Frame): # type: ignore[misc] - bg: str - hscroll: Scrollbar - vscroll: Scrollbar - def __init__( - self, master: Misc | None, width: int = 500, height: int = 350, canvwidth: int = 600, canvheight: int = 500 - ) -> None: ... - canvwidth: int - canvheight: int - def reset(self, canvwidth: int | None = None, canvheight: int | None = None, bg: str | None = None) -> None: ... - -class TurtleScreenBase: - cv: Canvas - canvwidth: int - canvheight: int - xscale: float - yscale: float - def __init__(self, cv: Canvas) -> None: ... - def mainloop(self) -> None: ... - def textinput(self, title: str, prompt: str) -> str | None: ... - def numinput( - self, title: str, prompt: str, default: float | None = None, minval: float | None = None, maxval: float | None = None - ) -> float | None: ... - -class Terminator(Exception): ... -class TurtleGraphicsError(Exception): ... - -class Shape: - def __init__( - self, type_: Literal["polygon", "image", "compound"], data: _PolygonCoords | PhotoImage | None = None - ) -> None: ... - def addcomponent(self, poly: _PolygonCoords, fill: _Color, outline: _Color | None = None) -> None: ... - -class TurtleScreen(TurtleScreenBase): - def __init__( - self, cv: Canvas, mode: Literal["standard", "logo", "world"] = "standard", colormode: float = 1.0, delay: int = 10 - ) -> None: ... - def clear(self) -> None: ... - - @overload - def mode(self, mode: None = None) -> str: ... - @overload - def mode(self, mode: Literal["standard", "logo", "world"]) -> None: ... - - def setworldcoordinates(self, llx: float, lly: float, urx: float, ury: float) -> None: ... - def register_shape(self, name: str, shape: _PolygonCoords | Shape | None = None) -> None: ... - - @overload - def colormode(self, cmode: None = None) -> float: ... - @overload - def colormode(self, cmode: float) -> None: ... - - def reset(self) -> None: ... - def turtles(self) -> list[Turtle]: ... - - @overload - def bgcolor(self) -> _AnyColor: ... - @overload - def bgcolor(self, color: _Color) -> None: ... - @overload - def bgcolor(self, r: float, g: float, b: float) -> None: ... - - @overload - def tracer(self, n: None = None) -> int: ... - @overload - def tracer(self, n: int, delay: int | None = None) -> None: ... - - @overload - def delay(self, delay: None = None) -> int: ... - @overload - def delay(self, delay: int) -> None: ... - - if sys.version_info >= (3, 14): - @contextmanager - def no_animation(self) -> Generator[None]: ... - - def update(self) -> None: ... - def window_width(self) -> int: ... - def window_height(self) -> int: ... - def getcanvas(self) -> Canvas: ... - def getshapes(self) -> list[str]: ... - def onclick(self, fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... - def onkey(self, fun: Callable[[], object], key: str) -> None: ... - def listen(self, xdummy: float | None = None, ydummy: float | None = None) -> None: ... - def ontimer(self, fun: Callable[[], object], t: int = 0) -> None: ... - - @overload - def bgpic(self, picname: None = None) -> str: ... - @overload - def bgpic(self, picname: str) -> None: ... - - @overload - def screensize(self, canvwidth: None = None, canvheight: None = None, bg: None = None) -> tuple[int, int]: ... - # Looks like if self.cv is not a ScrolledCanvas, this could return a tuple as well - @overload - def screensize(self, canvwidth: int, canvheight: int, bg: _Color | None = None) -> None: ... - - if sys.version_info >= (3, 14): - def save(self, filename: StrPath, *, overwrite: bool = False) -> None: ... - onscreenclick = onclick - resetscreen = reset - clearscreen = clear - addshape = register_shape - def onkeypress(self, fun: Callable[[], object], key: str | None = None) -> None: ... - onkeyrelease = onkey - -class TNavigator: - START_ORIENTATION: dict[str, Vec2D] - DEFAULT_MODE: str - DEFAULT_ANGLEOFFSET: int - DEFAULT_ANGLEORIENT: int - def __init__(self, mode: Literal["standard", "logo", "world"] = "standard") -> None: ... - def reset(self) -> None: ... - def degrees(self, fullcircle: float = 360.0) -> None: ... - def radians(self) -> None: ... - if sys.version_info >= (3, 12): - def teleport(self, x: float | None = None, y: float | None = None, *, fill_gap: bool = False) -> None: ... - - def forward(self, distance: float) -> None: ... - def back(self, distance: float) -> None: ... - def right(self, angle: float) -> None: ... - def left(self, angle: float) -> None: ... - def pos(self) -> Vec2D: ... - def xcor(self) -> float: ... - def ycor(self) -> float: ... - - @overload - def goto(self, x: tuple[float, float], y: None = None) -> None: ... - @overload - def goto(self, x: float, y: float) -> None: ... - - def home(self) -> None: ... - def setx(self, x: float) -> None: ... - def sety(self, y: float) -> None: ... - - @overload - def distance(self, x: TNavigator | tuple[float, float], y: None = None) -> float: ... - @overload - def distance(self, x: float, y: float) -> float: ... - - @overload - def towards(self, x: TNavigator | tuple[float, float], y: None = None) -> float: ... - @overload - def towards(self, x: float, y: float) -> float: ... - - def heading(self) -> float: ... - def setheading(self, to_angle: float) -> None: ... - def circle(self, radius: float, extent: float | None = None, steps: int | None = None) -> None: ... - def speed(self, s: int | None = 0) -> int | None: ... - fd = forward - bk = back - backward = back - rt = right - lt = left - position = pos - setpos = goto - setposition = goto - seth = setheading - -class TPen: - def __init__(self, resizemode: Literal["auto", "user", "noresize"] = "noresize") -> None: ... - - @overload - def resizemode(self, rmode: None = None) -> str: ... - @overload - def resizemode(self, rmode: Literal["auto", "user", "noresize"]) -> None: ... - - @overload - def pensize(self, width: None = None) -> int: ... - @overload - def pensize(self, width: int) -> None: ... - - def penup(self) -> None: ... - def pendown(self) -> None: ... - def isdown(self) -> bool: ... - - @overload - def speed(self, speed: None = None) -> int: ... - @overload - def speed(self, speed: _Speed) -> None: ... - - @overload - def pencolor(self) -> _AnyColor: ... - @overload - def pencolor(self, color: _Color) -> None: ... - @overload - def pencolor(self, r: float, g: float, b: float) -> None: ... - - @overload - def fillcolor(self) -> _AnyColor: ... - @overload - def fillcolor(self, color: _Color) -> None: ... - @overload - def fillcolor(self, r: float, g: float, b: float) -> None: ... - - @overload - def color(self) -> tuple[_AnyColor, _AnyColor]: ... - @overload - def color(self, color: _Color) -> None: ... - @overload - def color(self, r: float, g: float, b: float) -> None: ... - @overload - def color(self, color1: _Color, color2: _Color) -> None: ... - - if sys.version_info >= (3, 12): - def teleport(self, x: float | None = None, y: float | None = None, *, fill_gap: bool = False) -> None: ... - - def showturtle(self) -> None: ... - def hideturtle(self) -> None: ... - def isvisible(self) -> bool: ... - - # Note: signatures 1 and 2 overlap unsafely when no arguments are provided - @overload - def pen(self) -> _PenState: ... - @overload - def pen( - self, - pen: _PenState | None = None, - *, - shown: bool = ..., - pendown: bool = ..., - pencolor: _Color = ..., - fillcolor: _Color = ..., - pensize: int = ..., - speed: int = ..., - resizemode: Literal["auto", "user", "noresize"] = ..., - stretchfactor: tuple[float, float] = ..., - outline: int = ..., - tilt: float = ..., - ) -> None: ... - - width = pensize - up = penup - pu = penup - pd = pendown - down = pendown - st = showturtle - ht = hideturtle - -class RawTurtle(TPen, TNavigator): # type: ignore[misc] # Conflicting methods in base classes - screen: TurtleScreen - screens: ClassVar[list[TurtleScreen]] - def __init__( - self, - canvas: Canvas | TurtleScreen | None = None, - shape: str = "classic", - undobuffersize: int = 1000, - visible: bool = True, - ) -> None: ... - def reset(self) -> None: ... - def setundobuffer(self, size: int | None) -> None: ... - def undobufferentries(self) -> int: ... - def clear(self) -> None: ... - def clone(self) -> Self: ... - - @overload - def shape(self, name: None = None) -> str: ... - @overload - def shape(self, name: str) -> None: ... - - # Unsafely overlaps when no arguments are provided - @overload - def shapesize(self) -> tuple[float, float, float]: ... - @overload - def shapesize( - self, stretch_wid: float | None = None, stretch_len: float | None = None, outline: float | None = None - ) -> None: ... - - @overload - def shearfactor(self, shear: None = None) -> float: ... - @overload - def shearfactor(self, shear: float) -> None: ... - - # Unsafely overlaps when no arguments are provided - @overload - def shapetransform(self) -> tuple[float, float, float, float]: ... - @overload - def shapetransform( - self, t11: float | None = None, t12: float | None = None, t21: float | None = None, t22: float | None = None - ) -> None: ... - - def get_shapepoly(self) -> _PolygonCoords | None: ... - - if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.1; removed in Python 3.13. Use `tiltangle()` instead.") - def settiltangle(self, angle: float) -> None: ... - - @overload - def tiltangle(self, angle: None = None) -> float: ... - @overload - def tiltangle(self, angle: float) -> None: ... - - def tilt(self, angle: float) -> None: ... - # Can return either 'int' or Tuple[int, ...] based on if the stamp is - # a compound stamp or not. So, as per the "no Union return" policy, - # we return Any. - def stamp(self) -> Any: ... - def clearstamp(self, stampid: int | tuple[int, ...]) -> None: ... - def clearstamps(self, n: int | None = None) -> None: ... - def filling(self) -> bool: ... - if sys.version_info >= (3, 14): - @contextmanager - def fill(self) -> Generator[None]: ... - - def begin_fill(self) -> None: ... - def end_fill(self) -> None: ... - - @overload - def dot(self, size: int | _Color | None = None) -> None: ... - @overload - def dot(self, size: int | None, color: _Color, /) -> None: ... - @overload - def dot(self, size: int | None, r: float, g: float, b: float, /) -> None: ... - - def write( - self, arg: object, move: bool = False, align: str = "left", font: tuple[str, int, str] = ("Arial", 8, "normal") - ) -> None: ... - if sys.version_info >= (3, 14): - @contextmanager - def poly(self) -> Generator[None]: ... - - def begin_poly(self) -> None: ... - def end_poly(self) -> None: ... - def get_poly(self) -> _PolygonCoords | None: ... - def getscreen(self) -> TurtleScreen: ... - def getturtle(self) -> Self: ... - getpen = getturtle - def onclick(self, fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... - def onrelease(self, fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... - def ondrag(self, fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... - def undo(self) -> None: ... - turtlesize = shapesize - -class _Screen(TurtleScreen): - def __init__(self) -> None: ... - # Note int and float are interpreted differently, hence the Union instead of just float - def setup( - self, - width: int | float = 0.5, # noqa: Y041 - height: int | float = 0.75, # noqa: Y041 - startx: int | None = None, - starty: int | None = None, - ) -> None: ... - def title(self, titlestring: str) -> None: ... - def bye(self) -> None: ... - def exitonclick(self) -> None: ... - -class Turtle(RawTurtle): - def __init__(self, shape: str = "classic", undobuffersize: int = 1000, visible: bool = True) -> None: ... - -RawPen = RawTurtle -Pen = Turtle - -def write_docstringdict(filename: str = "turtle_docstringdict") -> None: ... - -# Functions copied from TurtleScreenBase: - -def mainloop() -> None: ... -def textinput(title: str, prompt: str) -> str | None: ... -def numinput( - title: str, prompt: str, default: float | None = None, minval: float | None = None, maxval: float | None = None -) -> float | None: ... - -# Functions copied from TurtleScreen: - -def clear() -> None: ... - -@overload -def mode(mode: None = None) -> str: ... -@overload -def mode(mode: Literal["standard", "logo", "world"]) -> None: ... - -def setworldcoordinates(llx: float, lly: float, urx: float, ury: float) -> None: ... -def register_shape(name: str, shape: _PolygonCoords | Shape | None = None) -> None: ... - -@overload -def colormode(cmode: None = None) -> float: ... -@overload -def colormode(cmode: float) -> None: ... - -def reset() -> None: ... -def turtles() -> list[Turtle]: ... - -@overload -def bgcolor() -> _AnyColor: ... -@overload -def bgcolor(color: _Color) -> None: ... -@overload -def bgcolor(r: float, g: float, b: float) -> None: ... - -@overload -def tracer(n: None = None) -> int: ... -@overload -def tracer(n: int, delay: int | None = None) -> None: ... - -@overload -def delay(delay: None = None) -> int: ... -@overload -def delay(delay: int) -> None: ... - -if sys.version_info >= (3, 14): - @contextmanager - def no_animation() -> Generator[None]: ... - -def update() -> None: ... -def window_width() -> int: ... -def window_height() -> int: ... -def getcanvas() -> Canvas: ... -def getshapes() -> list[str]: ... -def onclick(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... -def onkey(fun: Callable[[], object], key: str) -> None: ... -def listen(xdummy: float | None = None, ydummy: float | None = None) -> None: ... -def ontimer(fun: Callable[[], object], t: int = 0) -> None: ... - -@overload -def bgpic(picname: None = None) -> str: ... -@overload -def bgpic(picname: str) -> None: ... - -@overload -def screensize(canvwidth: None = None, canvheight: None = None, bg: None = None) -> tuple[int, int]: ... -@overload -def screensize(canvwidth: int, canvheight: int, bg: _Color | None = None) -> None: ... - -if sys.version_info >= (3, 14): - def save(filename: StrPath, *, overwrite: bool = False) -> None: ... - -onscreenclick = onclick -resetscreen = reset -clearscreen = clear -addshape = register_shape - -def onkeypress(fun: Callable[[], object], key: str | None = None) -> None: ... - -onkeyrelease = onkey - -# Functions copied from _Screen: - -def setup(width: float = 0.5, height: float = 0.75, startx: int | None = None, starty: int | None = None) -> None: ... -def title(titlestring: str) -> None: ... -def bye() -> None: ... -def exitonclick() -> None: ... -def Screen() -> _Screen: ... - -# Functions copied from TNavigator: - -def degrees(fullcircle: float = 360.0) -> None: ... -def radians() -> None: ... -def forward(distance: float) -> None: ... -def back(distance: float) -> None: ... -def right(angle: float) -> None: ... -def left(angle: float) -> None: ... -def pos() -> Vec2D: ... -def xcor() -> float: ... -def ycor() -> float: ... - -@overload -def goto(x: tuple[float, float], y: None = None) -> None: ... -@overload -def goto(x: float, y: float) -> None: ... - -def home() -> None: ... -def setx(x: float) -> None: ... -def sety(y: float) -> None: ... - -@overload -def distance(x: TNavigator | tuple[float, float], y: None = None) -> float: ... -@overload -def distance(x: float, y: float) -> float: ... - -@overload -def towards(x: TNavigator | tuple[float, float], y: None = None) -> float: ... -@overload -def towards(x: float, y: float) -> float: ... - -def heading() -> float: ... -def setheading(to_angle: float) -> None: ... -def circle(radius: float, extent: float | None = None, steps: int | None = None) -> None: ... - -fd = forward -bk = back -backward = back -rt = right -lt = left -position = pos -setpos = goto -setposition = goto -seth = setheading - -# Functions copied from TPen: -@overload -def resizemode(rmode: None = None) -> str: ... -@overload -def resizemode(rmode: Literal["auto", "user", "noresize"]) -> None: ... - -@overload -def pensize(width: None = None) -> int: ... -@overload -def pensize(width: int) -> None: ... - -def penup() -> None: ... -def pendown() -> None: ... -def isdown() -> bool: ... - -@overload -def speed(speed: None = None) -> int: ... -@overload -def speed(speed: _Speed) -> None: ... - -@overload -def pencolor() -> _AnyColor: ... -@overload -def pencolor(color: _Color) -> None: ... -@overload -def pencolor(r: float, g: float, b: float) -> None: ... - -@overload -def fillcolor() -> _AnyColor: ... -@overload -def fillcolor(color: _Color) -> None: ... -@overload -def fillcolor(r: float, g: float, b: float) -> None: ... - -@overload -def color() -> tuple[_AnyColor, _AnyColor]: ... -@overload -def color(color: _Color) -> None: ... -@overload -def color(r: float, g: float, b: float) -> None: ... -@overload -def color(color1: _Color, color2: _Color) -> None: ... - -def showturtle() -> None: ... -def hideturtle() -> None: ... -def isvisible() -> bool: ... - -# Note: signatures 1 and 2 overlap unsafely when no arguments are provided -@overload -def pen() -> _PenState: ... -@overload -def pen( - pen: _PenState | None = None, - *, - shown: bool = ..., - pendown: bool = ..., - pencolor: _Color = ..., - fillcolor: _Color = ..., - pensize: int = ..., - speed: int = ..., - resizemode: Literal["auto", "user", "noresize"] = ..., - stretchfactor: tuple[float, float] = ..., - outline: int = ..., - tilt: float = ..., -) -> None: ... - -width = pensize -up = penup -pu = penup -pd = pendown -down = pendown -st = showturtle -ht = hideturtle - -# Functions copied from RawTurtle: - -def setundobuffer(size: int | None) -> None: ... -def undobufferentries() -> int: ... - -@overload -def shape(name: None = None) -> str: ... -@overload -def shape(name: str) -> None: ... - -if sys.version_info >= (3, 12): - def teleport(x: float | None = None, y: float | None = None, *, fill_gap: bool = False) -> None: ... - -# Unsafely overlaps when no arguments are provided -@overload -def shapesize() -> tuple[float, float, float]: ... -@overload -def shapesize(stretch_wid: float | None = None, stretch_len: float | None = None, outline: float | None = None) -> None: ... - -@overload -def shearfactor(shear: None = None) -> float: ... -@overload -def shearfactor(shear: float) -> None: ... - -# Unsafely overlaps when no arguments are provided -@overload -def shapetransform() -> tuple[float, float, float, float]: ... -@overload -def shapetransform( - t11: float | None = None, t12: float | None = None, t21: float | None = None, t22: float | None = None -) -> None: ... - -def get_shapepoly() -> _PolygonCoords | None: ... - -if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.1; removed in Python 3.13. Use `tiltangle()` instead.") - def settiltangle(angle: float) -> None: ... - -@overload -def tiltangle(angle: None = None) -> float: ... -@overload -def tiltangle(angle: float) -> None: ... - -def tilt(angle: float) -> None: ... - -# Can return either 'int' or Tuple[int, ...] based on if the stamp is -# a compound stamp or not. So, as per the "no Union return" policy, -# we return Any. -def stamp() -> Any: ... -def clearstamp(stampid: int | tuple[int, ...]) -> None: ... -def clearstamps(n: int | None = None) -> None: ... -def filling() -> bool: ... - -if sys.version_info >= (3, 14): - @contextmanager - def fill() -> Generator[None]: ... - -def begin_fill() -> None: ... -def end_fill() -> None: ... - -@overload -def dot(size: int | _Color | None = None) -> None: ... -@overload -def dot(size: int | None, color: _Color, /) -> None: ... -@overload -def dot(size: int | None, r: float, g: float, b: float, /) -> None: ... - -def write(arg: object, move: bool = False, align: str = "left", font: tuple[str, int, str] = ("Arial", 8, "normal")) -> None: ... - -if sys.version_info >= (3, 14): - @contextmanager - def poly() -> Generator[None]: ... - -def begin_poly() -> None: ... -def end_poly() -> None: ... -def get_poly() -> _PolygonCoords | None: ... -def getscreen() -> TurtleScreen: ... -def getturtle() -> Turtle: ... - -getpen = getturtle - -def onrelease(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... -def ondrag(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ... -def undo() -> None: ... - -turtlesize = shapesize - -# Functions copied from RawTurtle with a few tweaks: - -def clone() -> Turtle: ... - -# Extra functions present only in the global scope: - -done = mainloop diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unicodedata.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unicodedata.vpi deleted file mode 100644 index 82a73181..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unicodedata.vpi +++ /dev/null @@ -1,94 +0,0 @@ -import sys -from _typeshed import ReadOnlyBuffer -from collections.abc import Iterator -from typing import Final, Literal, TypeAlias, TypeVar, final, overload - -ucd_3_2_0: UCD -unidata_version: Final[str] - -_T = TypeVar("_T") - -_NormalizationForm: TypeAlias = Literal["NFC", "NFD", "NFKC", "NFKD"] - -def bidirectional(chr: str, /) -> str: ... -def category(chr: str, /) -> str: ... -def combining(chr: str, /) -> int: ... - -@overload -def decimal(chr: str, /) -> int: ... -@overload -def decimal(chr: str, default: _T, /) -> int | _T: ... - -def decomposition(chr: str, /) -> str: ... - -@overload -def digit(chr: str, /) -> int: ... -@overload -def digit(chr: str, default: _T, /) -> int | _T: ... - -_EastAsianWidth: TypeAlias = Literal["F", "H", "W", "Na", "A", "N"] - -def east_asian_width(chr: str, /) -> _EastAsianWidth: ... -def is_normalized(form: _NormalizationForm, unistr: str, /) -> bool: ... - -if sys.version_info >= (3, 15): - def block(chr: str, /) -> str: ... - def extended_pictographic(chr: str, /) -> bool: ... - def grapheme_cluster_break(chr: str, /) -> str: ... - def indic_conjunct_break(chr: str, /) -> str: ... - def isxidstart(chr: str, /) -> bool: ... - def isxidcontinue(chr: str, /) -> bool: ... - def iter_graphemes(unistr: str, start: int = 0, end: int = sys.maxsize, /) -> Iterator[str]: ... - -def lookup(name: str | ReadOnlyBuffer, /) -> str: ... -def mirrored(chr: str, /) -> int: ... - -@overload -def name(chr: str, /) -> str: ... -@overload -def name(chr: str, default: _T, /) -> str | _T: ... - -def normalize(form: _NormalizationForm, unistr: str, /) -> str: ... - -@overload -def numeric(chr: str, /) -> float: ... -@overload -def numeric(chr: str, default: _T, /) -> float | _T: ... - -@final -class UCD: - # The methods below are constructed from the same array in C - # (unicodedata_functions) and hence identical to the functions above. - unidata_version: str - def bidirectional(self, chr: str, /) -> str: ... - def category(self, chr: str, /) -> str: ... - def combining(self, chr: str, /) -> int: ... - - @overload - def decimal(self, chr: str, /) -> int: ... - @overload - def decimal(self, chr: str, default: _T, /) -> int | _T: ... - - def decomposition(self, chr: str, /) -> str: ... - - @overload - def digit(self, chr: str, /) -> int: ... - @overload - def digit(self, chr: str, default: _T, /) -> int | _T: ... - - def east_asian_width(self, chr: str, /) -> _EastAsianWidth: ... - def is_normalized(self, form: _NormalizationForm, unistr: str, /) -> bool: ... - def lookup(self, name: str | ReadOnlyBuffer, /) -> str: ... - def mirrored(self, chr: str, /) -> int: ... - - @overload - def name(self, chr: str, /) -> str: ... - @overload - def name(self, chr: str, default: _T, /) -> str | _T: ... - - def normalize(self, form: _NormalizationForm, unistr: str, /) -> str: ... - - @overload - def numeric(self, chr: str, /) -> float: ... - @overload - def numeric(self, chr: str, default: _T, /) -> float | _T: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/__init__.vpi deleted file mode 100644 index 546ea77b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/__init__.vpi +++ /dev/null @@ -1,63 +0,0 @@ -import sys -from unittest.async_case import * - -from .case import ( - FunctionTestCase as FunctionTestCase, - SkipTest as SkipTest, - TestCase as TestCase, - addModuleCleanup as addModuleCleanup, - expectedFailure as expectedFailure, - skip as skip, - skipIf as skipIf, - skipUnless as skipUnless, -) -from .loader import TestLoader as TestLoader, defaultTestLoader as defaultTestLoader -from .main import TestProgram as TestProgram, main as main -from .result import TestResult as TestResult -from .runner import TextTestResult as TextTestResult, TextTestRunner as TextTestRunner -from .signals import ( - installHandler as installHandler, - registerResult as registerResult, - removeHandler as removeHandler, - removeResult as removeResult, -) -from .suite import BaseTestSuite as BaseTestSuite, TestSuite as TestSuite - -if sys.version_info >= (3, 11): - from .case import doModuleCleanups as doModuleCleanups, enterModuleContext as enterModuleContext - -__all__ = [ - "IsolatedAsyncioTestCase", - "TestResult", - "TestCase", - "TestSuite", - "TextTestRunner", - "TestLoader", - "FunctionTestCase", - "main", - "defaultTestLoader", - "SkipTest", - "skip", - "skipIf", - "skipUnless", - "expectedFailure", - "TextTestResult", - "installHandler", - "registerResult", - "removeResult", - "removeHandler", - "addModuleCleanup", -] - -if sys.version_info < (3, 13): - from .loader import findTestCases as findTestCases, getTestCaseNames as getTestCaseNames, makeSuite as makeSuite - - __all__ += ["getTestCaseNames", "makeSuite", "findTestCases"] - -if sys.version_info >= (3, 11): - __all__ += ["enterModuleContext", "doModuleCleanups"] - -if sys.version_info < (3, 12): - def load_tests(loader: TestLoader, tests: TestSuite, pattern: str | None) -> TestSuite: ... - -def __dir__() -> set[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/_log.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/_log.vpi deleted file mode 100644 index da6ce5a5..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/_log.vpi +++ /dev/null @@ -1,29 +0,0 @@ -import logging -import sys -from types import TracebackType -from typing import ClassVar, Generic, NamedTuple, TypeVar -from unittest.case import TestCase, _BaseTestCaseContext - -_L = TypeVar("_L", None, _LoggingWatcher) - -class _LoggingWatcher(NamedTuple): - records: list[logging.LogRecord] - output: list[str] - -class _AssertLogsContext(_BaseTestCaseContext, Generic[_L]): - LOGGING_FORMAT: ClassVar[str] - logger_name: str - level: int - msg: None - no_logs: bool - if sys.version_info >= (3, 15): - def __init__( - self, test_case: TestCase, logger_name: str, level: int, no_logs: bool, formatter: logging.Formatter | None = None - ) -> None: ... - else: - def __init__(self, test_case: TestCase, logger_name: str, level: int, no_logs: bool) -> None: ... - - def __enter__(self) -> _L: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None - ) -> bool | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/async_case.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/async_case.vpi deleted file mode 100644 index 77627a85..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/async_case.vpi +++ /dev/null @@ -1,24 +0,0 @@ -import sys -from asyncio.events import AbstractEventLoop -from collections.abc import Awaitable, Callable -from typing import ParamSpec, TypeVar - -from .case import TestCase - -if sys.version_info >= (3, 11): - from contextlib import AbstractAsyncContextManager - -_T = TypeVar("_T") -_P = ParamSpec("_P") - -class IsolatedAsyncioTestCase(TestCase): - if sys.version_info >= (3, 13): - loop_factory: Callable[[], AbstractEventLoop] | None = None - - async def asyncSetUp(self) -> None: ... - async def asyncTearDown(self) -> None: ... - def addAsyncCleanup(self, func: Callable[_P, Awaitable[object]], /, *args: _P.args, **kwargs: _P.kwargs) -> None: ... - if sys.version_info >= (3, 11): - async def enterAsyncContext(self, cm: AbstractAsyncContextManager[_T]) -> _T: ... - - def __del__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/case.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/case.vpi deleted file mode 100644 index 942154ea..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/case.vpi +++ /dev/null @@ -1,353 +0,0 @@ -import logging -import sys -import unittest.result -from _typeshed import SupportsDunderGE, SupportsDunderGT, SupportsDunderLE, SupportsDunderLT, SupportsRSub, SupportsSub -from builtins import _ClassInfo -from collections.abc import Callable, Container, Iterable, Mapping, Sequence, Set as AbstractSet -from contextlib import AbstractContextManager -from re import Pattern -from types import GenericAlias, TracebackType -from typing import ( - Any, - AnyStr, - Final, - Generic, - NoReturn, - ParamSpec, - Protocol, - SupportsAbs, - SupportsRound, - TypeVar, - overload, - type_check_only, -) -from typing_extensions import Never, Self -from unittest._log import _AssertLogsContext, _LoggingWatcher -from warnings import WarningMessage - -_T = TypeVar("_T") -_S = TypeVar("_S", bound=SupportsSub[Any, Any]) -_E = TypeVar("_E", bound=BaseException) -_FT = TypeVar("_FT", bound=Callable[..., Any]) -_SB = TypeVar("_SB", str, bytes, bytearray) -_P = ParamSpec("_P") - -DIFF_OMITTED: Final[str] - -class _BaseTestCaseContext: - test_case: TestCase - def __init__(self, test_case: TestCase) -> None: ... - -class _AssertRaisesBaseContext(_BaseTestCaseContext): - expected: type[BaseException] | tuple[type[BaseException], ...] - expected_regex: Pattern[str] | None - obj_name: str | None - msg: str | None - - def __init__( - self, - expected: type[BaseException] | tuple[type[BaseException], ...], - test_case: TestCase, - expected_regex: str | Pattern[str] | None = None, - ) -> None: ... - - # This returns Self if args is the empty list, and None otherwise. - # but it's not possible to construct an overload which expresses that - def handle(self, name: str, args: list[Any], kwargs: dict[str, Any]) -> Any: ... - -def addModuleCleanup(function: Callable[_P, object], /, *args: _P.args, **kwargs: _P.kwargs) -> None: ... -def doModuleCleanups() -> None: ... - -if sys.version_info >= (3, 11): - def enterModuleContext(cm: AbstractContextManager[_T]) -> _T: ... - -def expectedFailure(test_item: _FT) -> _FT: ... -def skip(reason: str) -> Callable[[_FT], _FT]: ... -def skipIf(condition: object, reason: str) -> Callable[[_FT], _FT]: ... -def skipUnless(condition: object, reason: str) -> Callable[[_FT], _FT]: ... - -class SkipTest(Exception): - def __init__(self, reason: str, /) -> None: ... - -@type_check_only -class _SupportsAbsAndDunderGE(SupportsDunderGE[Any], SupportsAbs[Any], Protocol): ... - -class TestCase: - failureException: type[BaseException] - longMessage: bool - maxDiff: int | None - # undocumented - _testMethodName: str - # undocumented - _testMethodDoc: str - def __init__(self, methodName: str = "runTest") -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def setUp(self) -> None: ... - def tearDown(self) -> None: ... - @classmethod - def setUpClass(cls) -> None: ... - @classmethod - def tearDownClass(cls) -> None: ... - def run(self, result: unittest.result.TestResult | None = None) -> unittest.result.TestResult | None: ... - def __call__(self, result: unittest.result.TestResult | None = ...) -> unittest.result.TestResult | None: ... - def skipTest(self, reason: Any) -> NoReturn: ... - def subTest(self, msg: Any = ..., **params: Any) -> AbstractContextManager[None]: ... - def debug(self) -> None: ... - if sys.version_info < (3, 11): - def _addSkip(self, result: unittest.result.TestResult, test_case: TestCase, reason: str) -> None: ... - - def assertEqual(self, first: Any, second: Any, msg: Any = None) -> None: ... - def assertNotEqual(self, first: Any, second: Any, msg: Any = None) -> None: ... - def assertTrue(self, expr: Any, msg: Any = None) -> None: ... - def assertFalse(self, expr: Any, msg: Any = None) -> None: ... - def assertIs(self, expr1: object, expr2: object, msg: Any = None) -> None: ... - def assertIsNot(self, expr1: object, expr2: object, msg: Any = None) -> None: ... - def assertIsNone(self, obj: object, msg: Any = None) -> None: ... - def assertIsNotNone(self, obj: object, msg: Any = None) -> None: ... - def assertIn(self, member: Any, container: Iterable[Any] | Container[Any], msg: Any = None) -> None: ... - def assertNotIn(self, member: Any, container: Iterable[Any] | Container[Any], msg: Any = None) -> None: ... - def assertIsInstance(self, obj: object, cls: _ClassInfo, msg: Any = None) -> None: ... - def assertNotIsInstance(self, obj: object, cls: _ClassInfo, msg: Any = None) -> None: ... - - @overload - def assertGreater(self, a: SupportsDunderGT[_T], b: _T, msg: Any = None) -> None: ... - @overload - def assertGreater(self, a: _T, b: SupportsDunderLT[_T], msg: Any = None) -> None: ... - - @overload - def assertGreaterEqual(self, a: SupportsDunderGE[_T], b: _T, msg: Any = None) -> None: ... - @overload - def assertGreaterEqual(self, a: _T, b: SupportsDunderLE[_T], msg: Any = None) -> None: ... - - @overload - def assertLess(self, a: SupportsDunderLT[_T], b: _T, msg: Any = None) -> None: ... - @overload - def assertLess(self, a: _T, b: SupportsDunderGT[_T], msg: Any = None) -> None: ... - - @overload - def assertLessEqual(self, a: SupportsDunderLE[_T], b: _T, msg: Any = None) -> None: ... - @overload - def assertLessEqual(self, a: _T, b: SupportsDunderGE[_T], msg: Any = None) -> None: ... - - # `assertRaises`, `assertRaisesRegex`, and `assertRaisesRegexp` - # are not using `ParamSpec` intentionally, - # because they might be used with explicitly wrong arg types to raise some error in tests. - @overload - def assertRaises( - self, - expected_exception: type[BaseException] | tuple[type[BaseException], ...], - callable: Callable[..., object], - *args: Any, - **kwargs: Any, - ) -> None: ... - @overload - def assertRaises( - self, expected_exception: type[_E] | tuple[type[_E], ...], *, msg: Any = ... - ) -> _AssertRaisesContext[_E]: ... - - @overload - def assertRaisesRegex( - self, - expected_exception: type[BaseException] | tuple[type[BaseException], ...], - expected_regex: str | Pattern[str], - callable: Callable[..., object], - *args: Any, - **kwargs: Any, - ) -> None: ... - @overload - def assertRaisesRegex( - self, expected_exception: type[_E] | tuple[type[_E], ...], expected_regex: str | Pattern[str], *, msg: Any = ... - ) -> _AssertRaisesContext[_E]: ... - - @overload - def assertWarns( - self, - expected_warning: type[Warning] | tuple[type[Warning], ...], - callable: Callable[_P, object], - *args: _P.args, - **kwargs: _P.kwargs, - ) -> None: ... - @overload - def assertWarns( - self, expected_warning: type[Warning] | tuple[type[Warning], ...], *, msg: Any = ... - ) -> _AssertWarnsContext: ... - - @overload - def assertWarnsRegex( - self, - expected_warning: type[Warning] | tuple[type[Warning], ...], - expected_regex: str | Pattern[str], - callable: Callable[_P, object], - *args: _P.args, - **kwargs: _P.kwargs, - ) -> None: ... - @overload - def assertWarnsRegex( - self, expected_warning: type[Warning] | tuple[type[Warning], ...], expected_regex: str | Pattern[str], *, msg: Any = ... - ) -> _AssertWarnsContext: ... - - if sys.version_info >= (3, 15): - def assertLogs( - self, - logger: str | logging.Logger | None = None, - level: int | str | None = None, - formatter: logging.Formatter | None = None, - ) -> _AssertLogsContext[_LoggingWatcher]: ... - else: - def assertLogs( - self, logger: str | logging.Logger | None = None, level: int | str | None = None - ) -> _AssertLogsContext[_LoggingWatcher]: ... - - def assertNoLogs( - self, logger: str | logging.Logger | None = None, level: int | str | None = None - ) -> _AssertLogsContext[None]: ... - - @overload - def assertAlmostEqual(self, first: _S, second: _S, places: None, msg: Any, delta: _SupportsAbsAndDunderGE) -> None: ... - @overload - def assertAlmostEqual( - self, first: _S, second: _S, places: None = None, msg: Any = None, *, delta: _SupportsAbsAndDunderGE - ) -> None: ... - @overload - def assertAlmostEqual( - self, - first: SupportsSub[_T, SupportsAbs[SupportsRound[object]]], - second: _T, - places: int | None = None, - msg: Any = None, - delta: None = None, - ) -> None: ... - @overload - def assertAlmostEqual( - self, - first: _T, - second: SupportsRSub[_T, SupportsAbs[SupportsRound[object]]], - places: int | None = None, - msg: Any = None, - delta: None = None, - ) -> None: ... - - @overload - def assertNotAlmostEqual(self, first: _S, second: _S, places: None, msg: Any, delta: _SupportsAbsAndDunderGE) -> None: ... - @overload - def assertNotAlmostEqual( - self, first: _S, second: _S, places: None = None, msg: Any = None, *, delta: _SupportsAbsAndDunderGE - ) -> None: ... - @overload - def assertNotAlmostEqual( - self, - first: SupportsSub[_T, SupportsAbs[SupportsRound[object]]], - second: _T, - places: int | None = None, - msg: Any = None, - delta: None = None, - ) -> None: ... - @overload - def assertNotAlmostEqual( - self, - first: _T, - second: SupportsRSub[_T, SupportsAbs[SupportsRound[object]]], - places: int | None = None, - msg: Any = None, - delta: None = None, - ) -> None: ... - - def assertRegex(self, text: AnyStr, expected_regex: AnyStr | Pattern[AnyStr], msg: Any = None) -> None: ... - def assertNotRegex(self, text: AnyStr, unexpected_regex: AnyStr | Pattern[AnyStr], msg: Any = None) -> None: ... - def assertCountEqual(self, first: Iterable[Any], second: Iterable[Any], msg: Any = None) -> None: ... - def addTypeEqualityFunc(self, typeobj: type[Any], function: Callable[..., None]) -> None: ... - def assertMultiLineEqual(self, first: str, second: str, msg: Any = None) -> None: ... - def assertSequenceEqual( - self, seq1: Sequence[Any], seq2: Sequence[Any], msg: Any = None, seq_type: type[Sequence[Any]] | None = None - ) -> None: ... - def assertListEqual(self, list1: list[Any], list2: list[Any], msg: Any = None) -> None: ... - def assertTupleEqual(self, tuple1: tuple[Any, ...], tuple2: tuple[Any, ...], msg: Any = None) -> None: ... - def assertSetEqual(self, set1: AbstractSet[object], set2: AbstractSet[object], msg: Any = None) -> None: ... - # assertDictEqual accepts only true dict instances. We can't use that here, since that would make - # assertDictEqual incompatible with TypedDict. - def assertDictEqual(self, d1: Mapping[Any, object], d2: Mapping[Any, object], msg: Any = None) -> None: ... - def fail(self, msg: Any = None) -> NoReturn: ... - def countTestCases(self) -> int: ... - def defaultTestResult(self) -> unittest.result.TestResult: ... - def id(self) -> str: ... - def shortDescription(self) -> str | None: ... - def addCleanup(self, function: Callable[_P, object], /, *args: _P.args, **kwargs: _P.kwargs) -> None: ... - - if sys.version_info >= (3, 11): - def enterContext(self, cm: AbstractContextManager[_T]) -> _T: ... - - def doCleanups(self) -> None: ... - @classmethod - def addClassCleanup(cls, function: Callable[_P, object], /, *args: _P.args, **kwargs: _P.kwargs) -> None: ... - @classmethod - def doClassCleanups(cls) -> None: ... - - if sys.version_info >= (3, 11): - @classmethod - def enterClassContext(cls, cm: AbstractContextManager[_T]) -> _T: ... - - def _formatMessage(self, msg: str | None, standardMsg: str) -> str: ... # undocumented - def _getAssertEqualityFunc(self, first: Any, second: Any) -> Callable[..., None]: ... # undocumented - if sys.version_info < (3, 12): - failUnlessEqual = assertEqual - assertEquals = assertEqual - failIfEqual = assertNotEqual - assertNotEquals = assertNotEqual - failUnless = assertTrue - assert_ = assertTrue - failIf = assertFalse - failUnlessRaises = assertRaises - failUnlessAlmostEqual = assertAlmostEqual - assertAlmostEquals = assertAlmostEqual - failIfAlmostEqual = assertNotAlmostEqual - assertNotAlmostEquals = assertNotAlmostEqual - assertRegexpMatches = assertRegex - assertNotRegexpMatches = assertNotRegex - assertRaisesRegexp = assertRaisesRegex - def assertDictContainsSubset( - self, subset: Mapping[Any, Any], dictionary: Mapping[Any, Any], msg: object = None - ) -> None: ... - - # Runtime has *args, **kwargs, but will error if any are supplied - def __init_subclass__(cls, *args: Never, **kwargs: Never) -> None: ... - - if sys.version_info >= (3, 14): - def assertIsSubclass(self, cls: type, superclass: type | tuple[type, ...], msg: Any = None) -> None: ... - def assertNotIsSubclass(self, cls: type, superclass: type | tuple[type, ...], msg: Any = None) -> None: ... - def assertHasAttr(self, obj: object, name: str, msg: Any = None) -> None: ... - def assertNotHasAttr(self, obj: object, name: str, msg: Any = None) -> None: ... - def assertStartsWith(self, s: _SB, prefix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ... - def assertNotStartsWith(self, s: _SB, prefix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ... - def assertEndsWith(self, s: _SB, suffix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ... - def assertNotEndsWith(self, s: _SB, suffix: _SB | tuple[_SB, ...], msg: Any = None) -> None: ... - -class FunctionTestCase(TestCase): - def __init__( - self, - testFunc: Callable[[], object], - setUp: Callable[[], object] | None = None, - tearDown: Callable[[], object] | None = None, - description: str | None = None, - ) -> None: ... - def runTest(self) -> None: ... - def __hash__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - -class _AssertRaisesContext(_AssertRaisesBaseContext, Generic[_E]): - exception: _E - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None - ) -> bool: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class _AssertWarnsContext(_AssertRaisesBaseContext): - warning: WarningMessage - filename: str - lineno: int - warnings: list[WarningMessage] - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None - ) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/loader.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/loader.vpi deleted file mode 100644 index 0d92b78f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/loader.vpi +++ /dev/null @@ -1,55 +0,0 @@ -import sys -import unittest.case -import unittest.suite -from collections.abc import Callable, Sequence -from re import Pattern -from types import ModuleType -from typing import Any, Final, TypeAlias -from typing_extensions import deprecated - -_SortComparisonMethod: TypeAlias = Callable[[str, str], int] -_SuiteClass: TypeAlias = Callable[[list[unittest.case.TestCase]], unittest.suite.TestSuite] - -VALID_MODULE_NAME: Final[Pattern[str]] - -class TestLoader: - errors: list[type[BaseException]] - testMethodPrefix: str - sortTestMethodsUsing: _SortComparisonMethod - testNamePatterns: list[str] | None - suiteClass: _SuiteClass - def loadTestsFromTestCase(self, testCaseClass: type[unittest.case.TestCase]) -> unittest.suite.TestSuite: ... - if sys.version_info >= (3, 12): - def loadTestsFromModule(self, module: ModuleType, *, pattern: str | None = None) -> unittest.suite.TestSuite: ... - else: - def loadTestsFromModule(self, module: ModuleType, *args: Any, pattern: str | None = None) -> unittest.suite.TestSuite: ... - - def loadTestsFromName(self, name: str, module: ModuleType | None = None) -> unittest.suite.TestSuite: ... - def loadTestsFromNames(self, names: Sequence[str], module: ModuleType | None = None) -> unittest.suite.TestSuite: ... - def getTestCaseNames(self, testCaseClass: type[unittest.case.TestCase]) -> Sequence[str]: ... - def discover( - self, start_dir: str, pattern: str = "test*.py", top_level_dir: str | None = None - ) -> unittest.suite.TestSuite: ... - def _match_path(self, path: str, full_path: str, pattern: str) -> bool: ... - -defaultTestLoader: TestLoader - -if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.11; removed in Python 3.13.") - def getTestCaseNames( - testCaseClass: type[unittest.case.TestCase], - prefix: str, - sortUsing: _SortComparisonMethod = ..., - testNamePatterns: list[str] | None = None, - ) -> Sequence[str]: ... - @deprecated("Deprecated since Python 3.11; removed in Python 3.13.") - def makeSuite( - testCaseClass: type[unittest.case.TestCase], - prefix: str = "test", - sortUsing: _SortComparisonMethod = ..., - suiteClass: _SuiteClass = ..., - ) -> unittest.suite.TestSuite: ... - @deprecated("Deprecated since Python 3.11; removed in Python 3.13.") - def findTestCases( - module: ModuleType, prefix: str = "test", sortUsing: _SortComparisonMethod = ..., suiteClass: _SuiteClass = ... - ) -> unittest.suite.TestSuite: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/main.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/main.vpi deleted file mode 100644 index f48347c1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/main.vpi +++ /dev/null @@ -1,74 +0,0 @@ -import sys -import unittest.case -import unittest.loader -import unittest.result -import unittest.suite -from collections.abc import Iterable -from types import ModuleType -from typing import Any, Final, Protocol, type_check_only -from typing_extensions import deprecated - -MAIN_EXAMPLES: Final[str] -MODULE_EXAMPLES: Final[str] - -@type_check_only -class _TestRunner(Protocol): - def run(self, test: unittest.suite.TestSuite | unittest.case.TestCase, /) -> unittest.result.TestResult: ... - -# not really documented -class TestProgram: - result: unittest.result.TestResult - module: ModuleType | None - verbosity: int - failfast: bool | None - catchbreak: bool | None - buffer: bool | None - progName: str | None - warnings: str | None - testNamePatterns: list[str] | None - if sys.version_info >= (3, 12): - durations: unittest.result._DurationsType | None - def __init__( - self, - module: ModuleType | str | None = "__main__", - defaultTest: str | Iterable[str] | None = None, - argv: list[str] | None = None, - testRunner: type[_TestRunner] | _TestRunner | None = None, - testLoader: unittest.loader.TestLoader = ..., - exit: bool = True, - verbosity: int = 1, - failfast: bool | None = None, - catchbreak: bool | None = None, - buffer: bool | None = None, - warnings: str | None = None, - *, - tb_locals: bool = False, - durations: unittest.result._DurationsType | None = None, - ) -> None: ... - else: - def __init__( - self, - module: None | str | ModuleType = "__main__", - defaultTest: str | Iterable[str] | None = None, - argv: list[str] | None = None, - testRunner: type[_TestRunner] | _TestRunner | None = None, - testLoader: unittest.loader.TestLoader = ..., - exit: bool = True, - verbosity: int = 1, - failfast: bool | None = None, - catchbreak: bool | None = None, - buffer: bool | None = None, - warnings: str | None = None, - *, - tb_locals: bool = False, - ) -> None: ... - - if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.11; removed in Python 3.13.") - def usageExit(self, msg: Any = None) -> None: ... - - def parseArgs(self, argv: list[str]) -> None: ... - def createTests(self, from_discovery: bool = False, Loader: unittest.loader.TestLoader | None = None) -> None: ... - def runTests(self) -> None: ... # undocumented - -main = TestProgram diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/mock.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/mock.vpi deleted file mode 100644 index e477f0a8..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/mock.vpi +++ /dev/null @@ -1,555 +0,0 @@ -import sys -from _typeshed import MaybeNone -from collections.abc import Awaitable, Callable, Coroutine, Iterable, Mapping, Sequence -from contextlib import _GeneratorContextManager -from types import TracebackType -from typing import Any, ClassVar, Final, Generic, Literal, ParamSpec, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self, disjoint_base - -_T = TypeVar("_T") -_TT = TypeVar("_TT", bound=type[Any]) -_R = TypeVar("_R") -_F = TypeVar("_F", bound=Callable[..., Any]) -_AF = TypeVar("_AF", bound=Callable[..., Coroutine[Any, Any, Any]]) -_P = ParamSpec("_P") - -if sys.version_info >= (3, 13): - # ThreadingMock added in 3.13 - __all__ = ( - "Mock", - "MagicMock", - "patch", - "sentinel", - "DEFAULT", - "ANY", - "call", - "create_autospec", - "ThreadingMock", - "AsyncMock", - "FILTER_DIR", - "NonCallableMock", - "NonCallableMagicMock", - "mock_open", - "PropertyMock", - "seal", - ) -else: - __all__ = ( - "Mock", - "MagicMock", - "patch", - "sentinel", - "DEFAULT", - "ANY", - "call", - "create_autospec", - "AsyncMock", - "FILTER_DIR", - "NonCallableMock", - "NonCallableMagicMock", - "mock_open", - "PropertyMock", - "seal", - ) - -FILTER_DIR: bool # controls the way mock objects respond to `dir` function - -class _SentinelObject: - name: Any - def __init__(self, name: Any) -> None: ... - -class _Sentinel: - def __getattr__(self, name: str) -> Any: ... - -sentinel: _Sentinel -DEFAULT: Any - -_ArgsKwargs: TypeAlias = tuple[tuple[Any, ...], Mapping[str, Any]] -_NameArgsKwargs: TypeAlias = tuple[str, tuple[Any, ...], Mapping[str, Any]] -_CallValue: TypeAlias = str | tuple[Any, ...] | Mapping[str, Any] | _ArgsKwargs | _NameArgsKwargs - -if sys.version_info >= (3, 12): - class _Call(tuple[Any, ...]): - def __new__( - cls, - value: _CallValue = (), - name: str | None = "", - parent: _Call | None = None, - two: bool = False, - from_kall: bool = True, - ) -> Self: ... - def __init__( - self, - value: _CallValue = (), - name: str | None = None, - parent: _Call | None = None, - two: bool = False, - from_kall: bool = True, - ) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... - def __ne__(self, value: object, /) -> bool: ... - def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... - def __getattr__(self, attr: str) -> Any: ... - def __getattribute__(self, attr: str) -> Any: ... - @property - def args(self) -> tuple[Any, ...]: ... - @property - def kwargs(self) -> Mapping[str, Any]: ... - def call_list(self) -> Any: ... - -else: - @disjoint_base - class _Call(tuple[Any, ...]): - def __new__( - cls, - value: _CallValue = (), - name: str | None = "", - parent: _Call | None = None, - two: bool = False, - from_kall: bool = True, - ) -> Self: ... - def __init__( - self, - value: _CallValue = (), - name: str | None = None, - parent: _Call | None = None, - two: bool = False, - from_kall: bool = True, - ) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __eq__(self, other: object) -> bool: ... - def __ne__(self, value: object, /) -> bool: ... - def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... - def __getattr__(self, attr: str) -> Any: ... - def __getattribute__(self, attr: str) -> Any: ... - @property - def args(self) -> tuple[Any, ...]: ... - @property - def kwargs(self) -> Mapping[str, Any]: ... - def call_list(self) -> Any: ... - -call: _Call - -class _CallList(list[_Call]): - def __contains__(self, value: Any) -> bool: ... - -class Base: - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - -# We subclass with "Any" because mocks are explicitly designed to stand in for other types, -# something that can't be expressed with our static type system. -class NonCallableMock(Base, Any): - if sys.version_info >= (3, 12): - def __new__( - cls, - spec: list[str] | object | type[object] | None = None, - wraps: Any | None = None, - name: str | None = None, - spec_set: list[str] | object | type[object] | None = None, - parent: NonCallableMock | None = None, - _spec_state: Any | None = None, - _new_name: str = "", - _new_parent: NonCallableMock | None = None, - _spec_as_instance: bool = False, - _eat_self: bool | None = None, - unsafe: bool = False, - **kwargs: Any, - ) -> Self: ... - else: - def __new__(cls, /, *args: Any, **kw: Any) -> Self: ... - - def __init__( - self, - spec: list[str] | object | type[object] | None = None, - wraps: Any | None = None, - name: str | None = None, - spec_set: list[str] | object | type[object] | None = None, - parent: NonCallableMock | None = None, - _spec_state: Any | None = None, - _new_name: str = "", - _new_parent: NonCallableMock | None = None, - _spec_as_instance: bool = False, - _eat_self: bool | None = None, - unsafe: bool = False, - **kwargs: Any, - ) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def __delattr__(self, name: str) -> None: ... - def __setattr__(self, name: str, value: Any) -> None: ... - def __dir__(self) -> list[str]: ... - def assert_called_with(self, *args: Any, **kwargs: Any) -> None: ... - def assert_not_called(self) -> None: ... - def assert_called_once_with(self, *args: Any, **kwargs: Any) -> None: ... - def _format_mock_failure_message(self, args: Any, kwargs: Any, action: str = "call") -> str: ... - def assert_called(self) -> None: ... - def assert_called_once(self) -> None: ... - def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ... - def _extract_mock_name(self) -> str: ... - def _get_call_signature_from_name(self, name: str) -> Any: ... - def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ... - def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = False) -> None: ... - def mock_add_spec(self, spec: Any, spec_set: bool = False) -> None: ... - def _mock_add_spec(self, spec: Any, spec_set: bool, _spec_as_instance: bool = False, _eat_self: bool = False) -> None: ... - def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ... - def configure_mock(self, **kwargs: Any) -> None: ... - return_value: Any - side_effect: Any - called: bool - call_count: int - call_args: _Call | MaybeNone - call_args_list: _CallList - method_calls: _CallList - mock_calls: _CallList - def _format_mock_call_signature(self, args: Any, kwargs: Any) -> str: ... - def _call_matcher(self, _call: tuple[_Call, ...]) -> _Call: ... - def _get_child_mock(self, **kw: Any) -> NonCallableMock: ... - if sys.version_info >= (3, 13): - def _calls_repr(self) -> str: ... - else: - def _calls_repr(self, prefix: str = "Calls") -> str: ... - -class CallableMixin(Base): - side_effect: Any - def __init__( - self, - spec: Any | None = None, - side_effect: Any | None = None, - return_value: Any = ..., - wraps: Any | None = None, - name: Any | None = None, - spec_set: Any | None = None, - parent: Any | None = None, - _spec_state: Any | None = None, - _new_name: Any = "", - _new_parent: Any | None = None, - **kwargs: Any, - ) -> None: ... - def __call__(self, *args: Any, **kwargs: Any) -> Any: ... - -class Mock(CallableMixin, NonCallableMock): ... - -class _patch(Generic[_T]): - attribute_name: Any - getter: Callable[[], Any] - attribute: str - new: _T - new_callable: Any - spec: Any - create: bool - has_local: Any - spec_set: Any - autospec: Any - kwargs: Mapping[str, Any] - additional_patchers: Any - # If new==DEFAULT, self is _patch[Any]. Ideally we'd be able to add an overload for it so that self is _patch[MagicMock], - # but that's impossible with the current type system. - def __init__( - self: _patch[_T], # viper: ignore[reportInvalidTypeVarUse] #11780 - getter: Callable[[], Any], - attribute: str, - new: _T, - spec: Any | None, - create: bool, - spec_set: Any | None, - autospec: Any | None, - new_callable: Any | None, - kwargs: Mapping[str, Any], - *, - unsafe: bool = False, - ) -> None: ... - def copy(self) -> _patch[_T]: ... - - @overload - def __call__(self, func: _TT) -> _TT: ... - # If new==DEFAULT, this should add a MagicMock parameter to the function - # arguments. See the _patch_default_new class below for this functionality. - @overload - def __call__(self, func: Callable[_P, _R]) -> Callable[_P, _R]: ... - - def decoration_helper( - self, patched: _patch[Any], args: Sequence[Any], keywargs: Any - ) -> _GeneratorContextManager[tuple[Sequence[Any], Any]]: ... - def decorate_class(self, klass: _TT) -> _TT: ... - def decorate_callable(self, func: Callable[..., _R]) -> Callable[..., _R]: ... - def decorate_async_callable(self, func: Callable[..., Awaitable[_R]]) -> Callable[..., Awaitable[_R]]: ... - def get_original(self) -> tuple[Any, bool]: ... - target: Any - temp_original: Any - is_local: bool - def __enter__(self) -> _T: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None, / - ) -> None: ... - def start(self) -> _T: ... - def stop(self) -> None: ... - -# This class does not exist at runtime, it's a hack to make this work: -# @patch("foo") -# def bar(..., mock: MagicMock) -> None: ... -@type_check_only -class _patch_pass_arg(_patch[_T]): - @overload - def __call__(self, func: _TT) -> _TT: ... - # Can't use the following as ParamSpec is only allowed as last parameter: - # def __call__(self, func: Callable[_P, _R]) -> Callable[Concatenate[_P, MagicMock], _R]: ... - @overload - def __call__(self, func: Callable[..., _R]) -> Callable[..., _R]: ... - -class _patch_dict: - in_dict: Any - values: Any - clear: Any - def __init__(self, in_dict: Any, values: Any = (), clear: Any = False, **kwargs: Any) -> None: ... - def __call__(self, f: Any) -> Any: ... - def __enter__(self) -> Any: ... - def __exit__(self, *args: object) -> Any: ... - def decorate_callable(self, f: _F) -> _F: ... - def decorate_async_callable(self, f: _AF) -> _AF: ... - def decorate_class(self, klass: Any) -> Any: ... - start: Any - stop: Any - -# This class does not exist at runtime, it's a hack to add methods to the -# patch() function. -@type_check_only -class _patcher: - TEST_PREFIX: str - dict: type[_patch_dict] - - # This overload also covers the case, where new==DEFAULT. In this case, the return type is _patch[Any]. - # Ideally we'd be able to add an overload for it so that the return type is _patch[MagicMock], - # but that's impossible with the current type system. - @overload - def __call__( # type: ignore[overload-overlap] - self, - target: str, - new: _T, - spec: Literal[False] | None = None, - create: bool = False, - spec_set: Literal[False] | None = None, - autospec: Literal[False] | None = None, - new_callable: None = None, - *, - unsafe: bool = False, - ) -> _patch[_T]: ... - @overload - def __call__( - self, - target: str, - *, - # If not False or None, this is passed to new_callable - spec: Any | Literal[False] | None = None, - create: bool = False, - # If not False or None, this is passed to new_callable - spec_set: Any | Literal[False] | None = None, - autospec: Literal[False] | None = None, - new_callable: Callable[..., _T], - unsafe: bool = False, - # kwargs are passed to new_callable - **kwargs: Any, - ) -> _patch_pass_arg[_T]: ... - @overload - def __call__( - self, - target: str, - *, - spec: Any | bool | None = None, - create: bool = False, - spec_set: Any | bool | None = None, - autospec: Any | bool | None = None, - new_callable: None = None, - unsafe: bool = False, - # kwargs are passed to the MagicMock/AsyncMock constructor - **kwargs: Any, - ) -> _patch_pass_arg[MagicMock | AsyncMock]: ... - - # This overload also covers the case, where new==DEFAULT. In this case, the return type is _patch[Any]. - # Ideally we'd be able to add an overload for it so that the return type is _patch[MagicMock], - # but that's impossible with the current type system. - @overload - @staticmethod - def object( - target: Any, - attribute: str, - new: _T, - spec: Literal[False] | None = None, - create: bool = False, - spec_set: Literal[False] | None = None, - autospec: Literal[False] | None = None, - new_callable: None = None, - *, - unsafe: bool = False, - ) -> _patch[_T]: ... - @overload - @staticmethod - def object( - target: Any, - attribute: str, - *, - # If not False or None, this is passed to new_callable - spec: Any | Literal[False] | None = None, - create: bool = False, - # If not False or None, this is passed to new_callable - spec_set: Any | Literal[False] | None = None, - autospec: Literal[False] | None = None, - new_callable: Callable[..., _T], - unsafe: bool = False, - # kwargs are passed to new_callable - **kwargs: Any, - ) -> _patch_pass_arg[_T]: ... - @overload - @staticmethod - def object( - target: Any, - attribute: str, - *, - spec: Any | bool | None = None, - create: bool = False, - spec_set: Any | bool | None = None, - autospec: Any | bool | None = None, - new_callable: None = None, - unsafe: bool = False, - # kwargs are passed to the MagicMock/AsyncMock constructor - **kwargs: Any, - ) -> _patch_pass_arg[MagicMock | AsyncMock]: ... - - @overload - @staticmethod - def multiple( - target: Any | str, - # If not False or None, this is passed to new_callable - spec: Any | Literal[False] | None = None, - create: bool = False, - # If not False or None, this is passed to new_callable - spec_set: Any | Literal[False] | None = None, - autospec: Literal[False] | None = None, - *, - new_callable: Callable[..., _T], - # The kwargs must be DEFAULT - **kwargs: Any, - ) -> _patch_pass_arg[_T]: ... - @overload - @staticmethod - def multiple( - target: Any | str, - # If not False or None, this is passed to new_callable - spec: Any | Literal[False] | None, - create: bool, - # If not False or None, this is passed to new_callable - spec_set: Any | Literal[False] | None, - autospec: Literal[False] | None, - new_callable: Callable[..., _T], - # The kwargs must be DEFAULT - **kwargs: Any, - ) -> _patch_pass_arg[_T]: ... - @overload - @staticmethod - def multiple( - target: Any | str, - spec: Any | bool | None = None, - create: bool = False, - spec_set: Any | bool | None = None, - autospec: Any | bool | None = None, - new_callable: None = None, - # The kwargs are the mock objects or DEFAULT - **kwargs: Any, - ) -> _patch[Any]: ... - - @staticmethod - def stopall() -> None: ... - -patch: _patcher - -class MagicMixin(Base): - def __init__(self, *args: Any, **kw: Any) -> None: ... - -class NonCallableMagicMock(MagicMixin, NonCallableMock): ... -class MagicMock(MagicMixin, Mock): ... - -class AsyncMockMixin(Base): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - async def _execute_mock_call(self, *args: Any, **kwargs: Any) -> Any: ... - def assert_awaited(self) -> None: ... - def assert_awaited_once(self) -> None: ... - def assert_awaited_with(self, *args: Any, **kwargs: Any) -> None: ... - def assert_awaited_once_with(self, *args: Any, **kwargs: Any) -> None: ... - def assert_any_await(self, *args: Any, **kwargs: Any) -> None: ... - def assert_has_awaits(self, calls: Iterable[_Call], any_order: bool = False) -> None: ... - def assert_not_awaited(self) -> None: ... - def reset_mock(self, *args: Any, **kwargs: Any) -> None: ... - await_count: int - await_args: _Call | None - await_args_list: _CallList - -class AsyncMagicMixin(MagicMixin): - def __init__(self, *args: Any, **kw: Any) -> None: ... - -class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock): - # Improving the `reset_mock` signature. - # It is defined on `AsyncMockMixin` with `*args, **kwargs`, which is not ideal. - # But, `NonCallableMock` super-class has the better version. - def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ... - -class MagicProxy(Base): - name: str - parent: Any - def __init__(self, name: str, parent: Any) -> None: ... - def create_mock(self) -> Any: ... - def __get__(self, obj: Any, _type: Any | None = None) -> Any: ... - -# See https://github.com/python/typeshed/issues/14701 -class _ANY(Any): - def __eq__(self, other: object) -> Literal[True]: ... - def __ne__(self, other: object) -> Literal[False]: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -ANY: _ANY - -def create_autospec( - spec: Any, - spec_set: Any = False, - instance: Any = False, - _parent: Any | None = None, - _name: Any | None = None, - *, - unsafe: bool = False, - **kwargs: Any, -) -> Any: ... - -class _SpecState: - spec: Any - ids: Any - spec_set: Any - parent: Any - instance: Any - name: Any - def __init__( - self, - spec: Any, - spec_set: Any = False, - parent: Any | None = None, - name: Any | None = None, - ids: Any | None = None, - instance: Any = False, - ) -> None: ... - -def mock_open(mock: Any | None = None, read_data: Any = "") -> Any: ... - -class PropertyMock(Mock): - def __get__(self, obj: _T, obj_type: type[_T] | None = None) -> Self: ... - def __set__(self, obj: Any, val: Any) -> None: ... - -if sys.version_info >= (3, 13): - class ThreadingMixin(Base): - DEFAULT_TIMEOUT: Final[float | None] = None - - def __init__(self, /, *args: Any, timeout: float | None | _SentinelObject = ..., **kwargs: Any) -> None: ... - # Same as `NonCallableMock.reset_mock.` - def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ... - def wait_until_called(self, *, timeout: float | None | _SentinelObject = ...) -> None: ... - def wait_until_any_call_with(self, *args: Any, **kwargs: Any) -> None: ... - - class ThreadingMock(ThreadingMixin, MagicMixin, Mock): ... - -def seal(mock: Any) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/result.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/result.vpi deleted file mode 100644 index 081f6e13..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/result.vpi +++ /dev/null @@ -1,46 +0,0 @@ -import sys -import unittest.case -from _typeshed import OptExcInfo -from collections.abc import Callable -from typing import Any, Final, TextIO, TypeAlias, TypeVar - -_F = TypeVar("_F", bound=Callable[..., Any]) -_DurationsType: TypeAlias = list[tuple[str, float]] - -STDOUT_LINE: Final[str] -STDERR_LINE: Final[str] - -# undocumented -def failfast(method: _F) -> _F: ... - -class TestResult: - errors: list[tuple[unittest.case.TestCase, str]] - failures: list[tuple[unittest.case.TestCase, str]] - skipped: list[tuple[unittest.case.TestCase, str]] - expectedFailures: list[tuple[unittest.case.TestCase, str]] - unexpectedSuccesses: list[unittest.case.TestCase] - shouldStop: bool - testsRun: int - buffer: bool - failfast: bool - tb_locals: bool - if sys.version_info >= (3, 12): - collectedDurations: _DurationsType - - def __init__(self, stream: TextIO | None = None, descriptions: bool | None = None, verbosity: int | None = None) -> None: ... - def printErrors(self) -> None: ... - def wasSuccessful(self) -> bool: ... - def stop(self) -> None: ... - def startTest(self, test: unittest.case.TestCase) -> None: ... - def stopTest(self, test: unittest.case.TestCase) -> None: ... - def startTestRun(self) -> None: ... - def stopTestRun(self) -> None: ... - def addError(self, test: unittest.case.TestCase, err: OptExcInfo) -> None: ... - def addFailure(self, test: unittest.case.TestCase, err: OptExcInfo) -> None: ... - def addSuccess(self, test: unittest.case.TestCase) -> None: ... - def addSkip(self, test: unittest.case.TestCase, reason: str) -> None: ... - def addExpectedFailure(self, test: unittest.case.TestCase, err: OptExcInfo) -> None: ... - def addUnexpectedSuccess(self, test: unittest.case.TestCase) -> None: ... - def addSubTest(self, test: unittest.case.TestCase, subtest: unittest.case.TestCase, err: OptExcInfo | None) -> None: ... - if sys.version_info >= (3, 12): - def addDuration(self, test: unittest.case.TestCase, elapsed: float) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/runner.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/runner.vpi deleted file mode 100644 index 3a2e0874..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/runner.vpi +++ /dev/null @@ -1,93 +0,0 @@ -import sys -import unittest.case -import unittest.result -import unittest.suite -from _typeshed import SupportsFlush, SupportsWrite -from collections.abc import Callable, Iterable -from typing import Any, Generic, Protocol, TypeAlias, TypeVar, type_check_only -from typing_extensions import Never -from warnings import _ActionKind - -_ResultClassType: TypeAlias = Callable[[_TextTestStream, bool, int], TextTestResult[Any]] - -@type_check_only -class _SupportsWriteAndFlush(SupportsWrite[str], SupportsFlush, Protocol): ... - -# All methods used by unittest.runner.TextTestResult's stream -@type_check_only -class _TextTestStream(_SupportsWriteAndFlush, Protocol): - def writeln(self, arg: str | None = None, /) -> None: ... - -# _WritelnDecorator should have all the same attrs as its stream param. -# But that's not feasible to do Generically -# We can expand the attributes if requested -class _WritelnDecorator: - def __init__(self, stream: _SupportsWriteAndFlush) -> None: ... - def writeln(self, arg: str | None = None) -> None: ... - def __getattr__(self, attr: str) -> Any: ... # Any attribute from the stream type passed to __init__ - # These attributes are prevented by __getattr__ - stream: Never - __getstate__: Never - # Methods proxied from the wrapped stream object via __getattr__ - def flush(self) -> object: ... - def write(self, s: str, /) -> object: ... - -_StreamT = TypeVar("_StreamT", bound=_TextTestStream, default=_WritelnDecorator) - -class TextTestResult(unittest.result.TestResult, Generic[_StreamT]): - descriptions: bool # undocumented - dots: bool # undocumented - separator1: str - separator2: str - showAll: bool # undocumented - stream: _StreamT # undocumented - if sys.version_info >= (3, 12): - durations: int | None - def __init__(self, stream: _StreamT, descriptions: bool, verbosity: int, *, durations: int | None = None) -> None: ... - else: - def __init__(self, stream: _StreamT, descriptions: bool, verbosity: int) -> None: ... - - def getDescription(self, test: unittest.case.TestCase) -> str: ... - def printErrorList(self, flavour: str, errors: Iterable[tuple[unittest.case.TestCase, str]]) -> None: ... - -class TextTestRunner: - resultclass: _ResultClassType - stream: _WritelnDecorator - descriptions: bool - verbosity: int - failfast: bool - buffer: bool - warnings: _ActionKind | None - tb_locals: bool - - if sys.version_info >= (3, 12): - durations: int | None - def __init__( - self, - stream: _SupportsWriteAndFlush | None = None, - descriptions: bool = True, - verbosity: int = 1, - failfast: bool = False, - buffer: bool = False, - resultclass: _ResultClassType | None = None, - warnings: _ActionKind | None = None, - *, - tb_locals: bool = False, - durations: int | None = None, - ) -> None: ... - else: - def __init__( - self, - stream: _SupportsWriteAndFlush | None = None, - descriptions: bool = True, - verbosity: int = 1, - failfast: bool = False, - buffer: bool = False, - resultclass: _ResultClassType | None = None, - warnings: str | None = None, - *, - tb_locals: bool = False, - ) -> None: ... - - def _makeResult(self) -> TextTestResult: ... - def run(self, test: unittest.suite.TestSuite | unittest.case.TestCase) -> TextTestResult: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/signals.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/signals.vpi deleted file mode 100644 index 928ab68a..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/signals.vpi +++ /dev/null @@ -1,15 +0,0 @@ -import unittest.result -from collections.abc import Callable -from typing import ParamSpec, TypeVar, overload - -_P = ParamSpec("_P") -_T = TypeVar("_T") - -def installHandler() -> None: ... -def registerResult(result: unittest.result.TestResult) -> None: ... -def removeResult(result: unittest.result.TestResult) -> bool: ... - -@overload -def removeHandler(method: None = None) -> None: ... -@overload -def removeHandler(method: Callable[_P, _T]) -> Callable[_P, _T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/suite.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/suite.vpi deleted file mode 100644 index b7cf75c6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/suite.vpi +++ /dev/null @@ -1,23 +0,0 @@ -import unittest.case -import unittest.result -from collections.abc import Iterable, Iterator -from typing import ClassVar, TypeAlias - -_TestType: TypeAlias = unittest.case.TestCase | TestSuite - -class BaseTestSuite: - _tests: list[unittest.case.TestCase] - _removed_tests: int - def __init__(self, tests: Iterable[_TestType] = ()) -> None: ... - def __call__(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ... - def addTest(self, test: _TestType) -> None: ... - def addTests(self, tests: Iterable[_TestType]) -> None: ... - def run(self, result: unittest.result.TestResult) -> unittest.result.TestResult: ... - def debug(self) -> None: ... - def countTestCases(self) -> int: ... - def __iter__(self) -> Iterator[_TestType]: ... - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -class TestSuite(BaseTestSuite): - def run(self, result: unittest.result.TestResult, debug: bool = False) -> unittest.result.TestResult: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/util.vpi deleted file mode 100644 index 11a6f903..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/unittest/util.vpi +++ /dev/null @@ -1,39 +0,0 @@ -from collections.abc import MutableSequence, Sequence -from typing import Any, Final, Literal, Protocol, TypeAlias, TypeVar, type_check_only - -@type_check_only -class _SupportsDunderLT(Protocol): - def __lt__(self, other: Any, /) -> bool: ... - -@type_check_only -class _SupportsDunderGT(Protocol): - def __gt__(self, other: Any, /) -> bool: ... - -@type_check_only -class _SupportsDunderLE(Protocol): - def __le__(self, other: Any, /) -> bool: ... - -@type_check_only -class _SupportsDunderGE(Protocol): - def __ge__(self, other: Any, /) -> bool: ... - -_T = TypeVar("_T") -_Mismatch: TypeAlias = tuple[_T, _T, int] -_SupportsComparison: TypeAlias = _SupportsDunderLE | _SupportsDunderGE | _SupportsDunderGT | _SupportsDunderLT - -_MAX_LENGTH: Final = 80 -_PLACEHOLDER_LEN: Final = 12 -_MIN_BEGIN_LEN: Final = 5 -_MIN_END_LEN: Final = 5 -_MIN_COMMON_LEN: Final = 5 -_MIN_DIFF_LEN: Final = 41 - -def _shorten(s: str, prefixlen: int, suffixlen: int) -> str: ... -def _common_shorten_repr(*args: str) -> tuple[str, ...]: ... -def safe_repr(obj: object, short: bool = False) -> str: ... -def strclass(cls: type) -> str: ... -def sorted_list_difference(expected: Sequence[_T], actual: Sequence[_T]) -> tuple[list[_T], list[_T]]: ... -def unorderable_list_difference(expected: MutableSequence[_T], actual: MutableSequence[_T]) -> tuple[list[_T], list[_T]]: ... -def three_way_cmp(x: _SupportsComparison, y: _SupportsComparison) -> Literal[-1, 0, 1]: ... -def _count_diff_all_purpose(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ... -def _count_diff_hashable(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/error.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/error.vpi deleted file mode 100644 index 6255f1ae..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/error.vpi +++ /dev/null @@ -1,29 +0,0 @@ -from email.message import Message -from typing import IO -from urllib.response import addinfourl - -__all__ = ["URLError", "HTTPError", "ContentTooShortError"] - -class URLError(OSError): - reason: str | BaseException - # The `filename` attribute only exists if it was provided to `__init__` and wasn't `None`. - filename: str - def __init__(self, reason: str | BaseException, filename: str | None = None) -> None: ... - -class HTTPError(URLError, addinfourl): - @property - def headers(self) -> Message: ... - @headers.setter - def headers(self, headers: Message) -> None: ... - - @property - def reason(self) -> str: ... # type: ignore[override] - code: int - msg: str - hdrs: Message - fp: IO[bytes] - def __init__(self, url: str, code: int, msg: str, hdrs: Message, fp: IO[bytes] | None) -> None: ... - -class ContentTooShortError(URLError): - content: tuple[str, Message] - def __init__(self, message: str, content: tuple[str, Message]) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/parse.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/parse.vpi deleted file mode 100644 index b83a0f4e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/parse.vpi +++ /dev/null @@ -1,354 +0,0 @@ -import sys -from collections.abc import Iterable, Mapping, Sequence -from types import GenericAlias -from typing import Any, AnyStr, Final, Generic, Literal, NamedTuple, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import TypeVar - -__all__ = [ - "urlparse", - "urlunparse", - "urljoin", - "urldefrag", - "urlsplit", - "urlunsplit", - "urlencode", - "parse_qs", - "parse_qsl", - "quote", - "quote_plus", - "quote_from_bytes", - "unquote", - "unquote_plus", - "unquote_to_bytes", - "DefragResult", - "ParseResult", - "SplitResult", - "DefragResultBytes", - "ParseResultBytes", - "SplitResultBytes", -] - -uses_relative: Final[list[str]] -uses_netloc: Final[list[str]] -uses_params: Final[list[str]] -non_hierarchical: Final[list[str]] -uses_query: Final[list[str]] -uses_fragment: Final[list[str]] -scheme_chars: Final[str] -if sys.version_info < (3, 11): - MAX_CACHE_SIZE: Final[int] - -_ResultStrT = TypeVar("_ResultStrT", str, bytes) -_ResultComponentT = TypeVar("_ResultComponentT", str, bytes, str | None, bytes | None) -_StrComponentT = TypeVar("_StrComponentT", str, str | None, default=str) -_BytesComponentT = TypeVar("_BytesComponentT", bytes, bytes | None, default=bytes) - -class _ResultMixinStr: - __slots__ = () - def encode(self, encoding: str = "ascii", errors: str = "strict") -> _ResultMixinBytes: ... - -class _ResultMixinBytes: - __slots__ = () - def decode(self, encoding: str = "ascii", errors: str = "strict") -> _ResultMixinStr: ... - -class _NetlocResultMixinBase(Generic[AnyStr]): - __slots__ = () - @property - def username(self) -> AnyStr | None: ... - @property - def password(self) -> AnyStr | None: ... - @property - def hostname(self) -> AnyStr | None: ... - @property - def port(self) -> int | None: ... - def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... - -class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): - __slots__ = () - -class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): - __slots__ = () - -# Need to duplicate the whole class because mypy rejects version-specific -# branches in namedtuple bodies. -if sys.version_info >= (3, 15): - class _DefragResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - url: _ResultStrT - fragment: _ResultComponentT - # Ignore needed due to mypy#21453. - def geturl(self) -> _ResultStrT: ... # type: ignore[misc] - -else: - class _DefragResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - url: _ResultStrT - fragment: _ResultComponentT - -if sys.version_info >= (3, 15): - class _SplitResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - scheme: _ResultComponentT - netloc: _ResultComponentT - path: _ResultStrT - query: _ResultComponentT - fragment: _ResultComponentT - # Ignore needed due to mypy#21453. - def geturl(self) -> _ResultStrT: ... # type: ignore[misc] - -else: - class _SplitResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - scheme: _ResultComponentT - netloc: _ResultComponentT - path: _ResultStrT - query: _ResultComponentT - fragment: _ResultComponentT - -if sys.version_info >= (3, 15): - class _ParseResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - scheme: _ResultComponentT - netloc: _ResultComponentT - path: _ResultStrT - params: _ResultComponentT - query: _ResultComponentT - fragment: _ResultComponentT - # Ignore needed due to mypy#21453. - def geturl(self) -> _ResultStrT: ... # type: ignore[misc] - -else: - class _ParseResultBase(NamedTuple, Generic[_ResultStrT, _ResultComponentT]): - scheme: _ResultComponentT - netloc: _ResultComponentT - path: _ResultStrT - params: _ResultComponentT - query: _ResultComponentT - fragment: _ResultComponentT - -if sys.version_info >= (3, 15): - # Structured result objects for string data - class DefragResult(_DefragResultBase[str, _StrComponentT], _ResultMixinStr, Generic[_StrComponentT]): ... - class SplitResult(_SplitResultBase[str, _StrComponentT], _NetlocResultMixinStr, Generic[_StrComponentT]): ... - class ParseResult(_ParseResultBase[str, _StrComponentT], _NetlocResultMixinStr, Generic[_StrComponentT]): ... - # Structured result objects for bytes data - class DefragResultBytes(_DefragResultBase[bytes, _BytesComponentT], _ResultMixinBytes, Generic[_BytesComponentT]): ... - class SplitResultBytes(_SplitResultBase[bytes, _BytesComponentT], _NetlocResultMixinBytes, Generic[_BytesComponentT]): ... - class ParseResultBytes(_ParseResultBase[bytes, _BytesComponentT], _NetlocResultMixinBytes, Generic[_BytesComponentT]): ... - -else: - # Structured result objects for string data - class DefragResult(_DefragResultBase[str, str], _ResultMixinStr): - def geturl(self) -> str: ... - - class SplitResult(_SplitResultBase[str, str], _NetlocResultMixinStr): - def geturl(self) -> str: ... - - class ParseResult(_ParseResultBase[str, str], _NetlocResultMixinStr): - def geturl(self) -> str: ... - - # Structured result objects for bytes data - class DefragResultBytes(_DefragResultBase[bytes, bytes], _ResultMixinBytes): - def geturl(self) -> bytes: ... - - class SplitResultBytes(_SplitResultBase[bytes, bytes], _NetlocResultMixinBytes): - def geturl(self) -> bytes: ... - - class ParseResultBytes(_ParseResultBase[bytes, bytes], _NetlocResultMixinBytes): - def geturl(self) -> bytes: ... - -def parse_qs( - qs: AnyStr | None, - keep_blank_values: bool = False, - strict_parsing: bool = False, - encoding: str = "utf-8", - errors: str = "replace", - max_num_fields: int | None = None, - separator: str = "&", -) -> dict[AnyStr, list[AnyStr]]: ... -def parse_qsl( - qs: AnyStr | None, - keep_blank_values: bool = False, - strict_parsing: bool = False, - encoding: str = "utf-8", - errors: str = "replace", - max_num_fields: int | None = None, - separator: str = "&", -) -> list[tuple[AnyStr, AnyStr]]: ... - -@overload -def quote(string: str, safe: str | Iterable[int] = "/", encoding: str | None = None, errors: str | None = None) -> str: ... -@overload -def quote(string: bytes | bytearray, safe: str | Iterable[int] = "/") -> str: ... - -def quote_from_bytes(bs: bytes | bytearray, safe: str | Iterable[int] = "/") -> str: ... - -@overload -def quote_plus(string: str, safe: str | Iterable[int] = "", encoding: str | None = None, errors: str | None = None) -> str: ... -@overload -def quote_plus(string: bytes | bytearray, safe: str | Iterable[int] = "") -> str: ... - -def unquote(string: str | bytes, encoding: str = "utf-8", errors: str = "replace") -> str: ... -def unquote_to_bytes(string: str | bytes | bytearray) -> bytes: ... -def unquote_plus(string: str, encoding: str = "utf-8", errors: str = "replace") -> str: ... - -@overload -def urldefrag(url: str) -> DefragResult: ... -@overload -def urldefrag(url: bytes | bytearray | None) -> DefragResultBytes: ... -if sys.version_info >= (3, 15): - @overload - def urldefrag(url: str, *, missing_as_none: Literal[True]) -> DefragResult[str | None]: ... - @overload - def urldefrag(url: str, *, missing_as_none: Literal[False] = False) -> DefragResult[str]: ... - @overload - def urldefrag(url: bytes | bytearray | None, *, missing_as_none: Literal[True]) -> DefragResultBytes[bytes | None]: ... - @overload - def urldefrag(url: bytes | bytearray | None, *, missing_as_none: Literal[False] = False) -> DefragResultBytes[bytes]: ... - @overload - def urldefrag(url: str, *, missing_as_none: bool) -> DefragResult[str | None]: ... - @overload - def urldefrag(url: bytes | bytearray | None, *, missing_as_none: bool) -> DefragResultBytes[bytes | None]: ... - -# The values are passed through `str()` (unless they are bytes), so anything is valid. -_QueryType: TypeAlias = ( - Mapping[str, object] - | Mapping[bytes, object] - | Mapping[str | bytes, object] - | Mapping[str, Sequence[object]] - | Mapping[bytes, Sequence[object]] - | Mapping[str | bytes, Sequence[object]] - | Sequence[tuple[str | bytes, object]] - | Sequence[tuple[str | bytes, Sequence[object]]] -) - -@type_check_only -class _QuoteVia(Protocol): - @overload - def __call__(self, string: str, safe: str | bytes, encoding: str, errors: str, /) -> str: ... - @overload - def __call__(self, string: bytes, safe: str | bytes, /) -> str: ... - -def urlencode( - query: _QueryType, - doseq: bool = False, - safe: str | bytes = "", - encoding: str | None = None, - errors: str | None = None, - quote_via: _QuoteVia = ..., -) -> str: ... -def urljoin(base: AnyStr, url: AnyStr | None, allow_fragments: bool = True) -> AnyStr: ... - -@overload -def urlparse(url: str, scheme: str = "", allow_fragments: bool = True) -> ParseResult: ... -@overload -def urlparse( - url: bytes | bytearray | None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True -) -> ParseResultBytes: ... -if sys.version_info >= (3, 15): - @overload - def urlparse( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[True] - ) -> ParseResult[str | None]: ... - @overload - def urlparse( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[False] = False - ) -> ParseResult[str]: ... - @overload - def urlparse( - url: bytes | bytearray | None, - scheme: bytes | bytearray | None | Literal[""] = "", - allow_fragments: bool = True, - *, - missing_as_none: Literal[True], - ) -> ParseResultBytes[bytes | None]: ... - @overload - def urlparse( - url: bytes | bytearray | None, - scheme: bytes | bytearray | None | Literal[""] = "", - allow_fragments: bool = True, - *, - missing_as_none: Literal[False] = False, - ) -> ParseResultBytes[bytes]: ... - @overload - def urlparse( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: bool - ) -> ParseResult[str | None]: ... - @overload - def urlparse( - url: bytes | bytearray | None, - scheme: bytes | bytearray | None | Literal[""] = "", - allow_fragments: bool = True, - *, - missing_as_none: bool, - ) -> ParseResultBytes[bytes | None]: ... - -@overload -def urlsplit(url: str, scheme: str = "", allow_fragments: bool = True) -> SplitResult: ... - -if sys.version_info >= (3, 11): - @overload - def urlsplit( - url: bytes | None, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True - ) -> SplitResultBytes: ... -else: - @overload - def urlsplit( - url: bytes | bytearray | None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True - ) -> SplitResultBytes: ... -if sys.version_info >= (3, 15): - @overload - def urlsplit( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[True] - ) -> SplitResult[str | None]: ... - @overload - def urlsplit( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: Literal[False] = False - ) -> SplitResult[str]: ... - @overload - def urlsplit( - url: bytes | None, - scheme: bytes | None | Literal[""] = "", - allow_fragments: bool = True, - *, - missing_as_none: Literal[True], - ) -> SplitResultBytes[bytes | None]: ... - @overload - def urlsplit( - url: bytes | None, - scheme: bytes | None | Literal[""] = "", - allow_fragments: bool = True, - *, - missing_as_none: Literal[False] = False, - ) -> SplitResultBytes[bytes]: ... - @overload - def urlsplit( - url: str, scheme: str = "", allow_fragments: bool = True, *, missing_as_none: bool - ) -> SplitResult[str | None]: ... - @overload - def urlsplit( - url: bytes | None, scheme: bytes | None | Literal[""] = "", allow_fragments: bool = True, *, missing_as_none: bool - ) -> SplitResultBytes[bytes | None]: ... - -if sys.version_info >= (3, 15): - # Requires an iterable of length 6 - @overload - def urlunparse(components: Iterable[None], *, keep_empty: bool = ...) -> Literal[b""]: ... # type: ignore[overload-overlap] - @overload - def urlunparse(components: Iterable[AnyStr | None], *, keep_empty: bool = ...) -> AnyStr: ... -else: - # Requires an iterable of length 6 - @overload - def urlunparse(components: Iterable[None]) -> Literal[b""]: ... # type: ignore[overload-overlap] - @overload - def urlunparse(components: Iterable[AnyStr | None]) -> AnyStr: ... - -if sys.version_info >= (3, 15): - # Requires an iterable of length 5 - @overload - def urlunsplit(components: Iterable[None], *, keep_empty: bool = ...) -> Literal[b""]: ... # type: ignore[overload-overlap] - @overload - def urlunsplit(components: Iterable[AnyStr | None], *, keep_empty: bool = ...) -> AnyStr: ... -else: - # Requires an iterable of length 5 - @overload - def urlunsplit(components: Iterable[None]) -> Literal[b""]: ... # type: ignore[overload-overlap] - @overload - def urlunsplit(components: Iterable[AnyStr | None]) -> AnyStr: ... - -def unwrap(url: str) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/request.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/request.vpi deleted file mode 100644 index 0ec26052..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/request.vpi +++ /dev/null @@ -1,443 +0,0 @@ -import ssl -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, SupportsRead -from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence -from email.message import Message -from http.client import HTTPConnection, HTTPMessage, HTTPResponse -from http.cookiejar import CookieJar -from re import Pattern -from typing import IO, Any, ClassVar, Literal, NoReturn, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import deprecated -from urllib.error import HTTPError as HTTPError -from urllib.response import addclosehook, addinfourl - -__all__ = [ - "Request", - "OpenerDirector", - "BaseHandler", - "HTTPDefaultErrorHandler", - "HTTPRedirectHandler", - "HTTPCookieProcessor", - "ProxyHandler", - "HTTPPasswordMgr", - "HTTPPasswordMgrWithDefaultRealm", - "HTTPPasswordMgrWithPriorAuth", - "AbstractBasicAuthHandler", - "HTTPBasicAuthHandler", - "ProxyBasicAuthHandler", - "AbstractDigestAuthHandler", - "HTTPDigestAuthHandler", - "ProxyDigestAuthHandler", - "HTTPHandler", - "FileHandler", - "FTPHandler", - "CacheFTPHandler", - "DataHandler", - "UnknownHandler", - "HTTPErrorProcessor", - "urlopen", - "install_opener", - "build_opener", - "pathname2url", - "url2pathname", - "getproxies", - "urlretrieve", - "urlcleanup", - "HTTPSHandler", -] -if sys.version_info < (3, 14): - __all__ += ["URLopener", "FancyURLopener"] - -_T = TypeVar("_T") - -# The actual type is `addinfourl | HTTPResponse`, but users would need to use `typing.cast` or `isinstance` to narrow the type, -# so we use `Any` instead. -# See -# - https://github.com/python/typeshed/pull/15042 -# - https://github.com/python/typing/issues/566 -_UrlopenRet: TypeAlias = Any - -_DataType: TypeAlias = ReadableBuffer | SupportsRead[bytes] | Iterable[bytes] | None - -if sys.version_info >= (3, 13): - def urlopen( - url: str | Request, data: _DataType | None = None, timeout: float | None = ..., *, context: ssl.SSLContext | None = None - ) -> _UrlopenRet: ... - -else: - @overload - def urlopen( - url: str | Request, - data: _DataType | None = None, - timeout: float | None = ..., - *, - cafile: None = None, - capath: None = None, - cadefault: Literal[False] = False, - context: ssl.SSLContext | None = None, - ) -> _UrlopenRet: ... - @overload - @deprecated( - "The `cafile`, `capath`, `cadefault` parameters are deprecated since Python 3.6; " - "removed in Python 3.13. Use `context` parameter instead." - ) - def urlopen( - url: str | Request, - data: _DataType | None = None, - timeout: float | None = ..., - *, - cafile: StrOrBytesPath | None = None, - capath: StrOrBytesPath | None = None, - cadefault: bool = False, - context: None = None, - ) -> _UrlopenRet: ... - -def install_opener(opener: OpenerDirector | None) -> None: ... -def build_opener(*handlers: BaseHandler | Callable[[], BaseHandler]) -> OpenerDirector: ... - -if sys.version_info >= (3, 14): - def url2pathname(url: str, *, require_scheme: bool = False, resolve_host: bool = False) -> str: ... - def pathname2url(pathname: str, *, add_scheme: bool = False) -> str: ... - -else: - if sys.platform == "win32": - from nturl2path import pathname2url as pathname2url, url2pathname as url2pathname - else: - def url2pathname(pathname: str) -> str: ... - def pathname2url(pathname: str) -> str: ... - -def getproxies() -> dict[str, str]: ... -def getproxies_environment() -> dict[str, str]: ... -def parse_http_list(s: str) -> list[str]: ... -def parse_keqv_list(l: list[str]) -> dict[str, str]: ... - -if sys.platform == "win32" or sys.platform == "darwin": - def proxy_bypass(host: str) -> Any: ... # undocumented - -else: - def proxy_bypass(host: str, proxies: Mapping[str, str] | None = None) -> Any: ... # undocumented - -class Request: - @property - def full_url(self) -> str: ... - @full_url.setter - def full_url(self, value: str) -> None: ... - @full_url.deleter - def full_url(self) -> None: ... - - type: str - host: str - origin_req_host: str - selector: str - data: _DataType - headers: MutableMapping[str, str] - unredirected_hdrs: dict[str, str] - unverifiable: bool - method: str | None - timeout: float | None # Undocumented, only set after __init__() by OpenerDirector.open() - def __init__( - self, - url: str, - data: _DataType = None, - headers: MutableMapping[str, str] = {}, - origin_req_host: str | None = None, - unverifiable: bool = False, - method: str | None = None, - ) -> None: ... - def get_method(self) -> str: ... - def add_header(self, key: str, val: str) -> None: ... - def add_unredirected_header(self, key: str, val: str) -> None: ... - def has_header(self, header_name: str) -> bool: ... - def remove_header(self, header_name: str) -> None: ... - def get_full_url(self) -> str: ... - def set_proxy(self, host: str, type: str) -> None: ... - - @overload - def get_header(self, header_name: str) -> str | None: ... - @overload - def get_header(self, header_name: str, default: _T) -> str | _T: ... - - def header_items(self) -> list[tuple[str, str]]: ... - def has_proxy(self) -> bool: ... - -class OpenerDirector: - addheaders: list[tuple[str, str]] - def add_handler(self, handler: BaseHandler) -> None: ... - def open(self, fullurl: str | Request, data: _DataType = None, timeout: float | None = ...) -> _UrlopenRet: ... - def error(self, proto: str, *args: Any) -> _UrlopenRet: ... - def close(self) -> None: ... - -class BaseHandler: - handler_order: ClassVar[int] - parent: OpenerDirector - def add_parent(self, parent: OpenerDirector) -> None: ... - def close(self) -> None: ... - def __lt__(self, other: object) -> bool: ... - -class HTTPDefaultErrorHandler(BaseHandler): - def http_error_default( - self, req: Request, fp: IO[bytes], code: int, msg: str, hdrs: HTTPMessage - ) -> HTTPError: ... # undocumented - -class HTTPRedirectHandler(BaseHandler): - max_redirections: ClassVar[int] # undocumented - max_repeats: ClassVar[int] # undocumented - inf_msg: ClassVar[str] # undocumented - def redirect_request( - self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage, newurl: str - ) -> Request | None: ... - def http_error_301(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - def http_error_302(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - def http_error_303(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - def http_error_307(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - if sys.version_info >= (3, 11): - def http_error_308( - self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage - ) -> _UrlopenRet | None: ... - -class HTTPCookieProcessor(BaseHandler): - cookiejar: CookieJar - def __init__(self, cookiejar: CookieJar | None = None) -> None: ... - def http_request(self, request: Request) -> Request: ... # undocumented - def http_response(self, request: Request, response: HTTPResponse) -> HTTPResponse: ... # undocumented - def https_request(self, request: Request) -> Request: ... # undocumented - def https_response(self, request: Request, response: HTTPResponse) -> HTTPResponse: ... # undocumented - -class ProxyHandler(BaseHandler): - def __init__(self, proxies: dict[str, str] | None = None) -> None: ... - def proxy_open(self, req: Request, proxy: str, type: str) -> _UrlopenRet | None: ... # undocumented - # TODO: add a method for every (common) proxy protocol - -class HTTPPasswordMgr: - def add_password(self, realm: str, uri: str | Sequence[str], user: str, passwd: str) -> None: ... - def find_user_password(self, realm: str, authuri: str) -> tuple[str | None, str | None]: ... - def is_suburi(self, base: str, test: str) -> bool: ... # undocumented - def reduce_uri(self, uri: str, default_port: bool = True) -> tuple[str, str]: ... # undocumented - -class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): - def add_password(self, realm: str | None, uri: str | Sequence[str], user: str, passwd: str) -> None: ... - def find_user_password(self, realm: str | None, authuri: str) -> tuple[str | None, str | None]: ... - -class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm): - def add_password( - self, realm: str | None, uri: str | Sequence[str], user: str, passwd: str, is_authenticated: bool = False - ) -> None: ... - def update_authenticated(self, uri: str | Sequence[str], is_authenticated: bool = False) -> None: ... - def is_authenticated(self, authuri: str) -> bool | None: ... - -class AbstractBasicAuthHandler: - rx: ClassVar[Pattern[str]] # undocumented - passwd: HTTPPasswordMgr - add_password: Callable[[str, str | Sequence[str], str, str], None] - def __init__(self, password_mgr: HTTPPasswordMgr | None = None) -> None: ... - def http_error_auth_reqed(self, authreq: str, host: str, req: Request, headers: HTTPMessage) -> None: ... - def http_request(self, req: Request) -> Request: ... # undocumented - def http_response(self, req: Request, response: HTTPResponse) -> HTTPResponse: ... # undocumented - def https_request(self, req: Request) -> Request: ... # undocumented - def https_response(self, req: Request, response: HTTPResponse) -> HTTPResponse: ... # undocumented - def retry_http_basic_auth(self, host: str, req: Request, realm: str) -> _UrlopenRet | None: ... # undocumented - -class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): - auth_header: ClassVar[str] # undocumented - def http_error_401(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - -class ProxyBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler): - auth_header: ClassVar[str] - def http_error_407(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - -class AbstractDigestAuthHandler: - def __init__(self, passwd: HTTPPasswordMgr | None = None) -> None: ... - def reset_retry_count(self) -> None: ... - def http_error_auth_reqed(self, auth_header: str, host: str, req: Request, headers: HTTPMessage) -> None: ... - def retry_http_digest_auth(self, req: Request, auth: str) -> _UrlopenRet | None: ... - def get_cnonce(self, nonce: str) -> str: ... - def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str | None: ... - def get_algorithm_impls(self, algorithm: str) -> tuple[Callable[[str], str], Callable[[str, str], str]]: ... - def get_entity_digest(self, data: ReadableBuffer | None, chal: Mapping[str, str]) -> str | None: ... - -class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): - auth_header: ClassVar[str] # undocumented - def http_error_401(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - -class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): - auth_header: ClassVar[str] # undocumented - def http_error_407(self, req: Request, fp: IO[bytes], code: int, msg: str, headers: HTTPMessage) -> _UrlopenRet | None: ... - -@type_check_only -class _HTTPConnectionProtocol(Protocol): - def __call__( - self, - host: str, - /, - *, - port: int | None = ..., - timeout: float = ..., - source_address: tuple[str, int] | None = ..., - blocksize: int = ..., - ) -> HTTPConnection: ... - -class AbstractHTTPHandler(BaseHandler): # undocumented - if sys.version_info >= (3, 12): - def __init__(self, debuglevel: int | None = None) -> None: ... - else: - def __init__(self, debuglevel: int = 0) -> None: ... - - def set_http_debuglevel(self, level: int) -> None: ... - def do_request_(self, request: Request) -> Request: ... - def do_open(self, http_class: _HTTPConnectionProtocol, req: Request, **http_conn_args: Any) -> HTTPResponse: ... - -class HTTPHandler(AbstractHTTPHandler): - def http_open(self, req: Request) -> HTTPResponse: ... - def http_request(self, request: Request) -> Request: ... # undocumented - -class HTTPSHandler(AbstractHTTPHandler): - if sys.version_info >= (3, 12): - def __init__( - self, debuglevel: int | None = None, context: ssl.SSLContext | None = None, check_hostname: bool | None = None - ) -> None: ... - else: - def __init__( - self, debuglevel: int = 0, context: ssl.SSLContext | None = None, check_hostname: bool | None = None - ) -> None: ... - - def https_open(self, req: Request) -> HTTPResponse: ... - def https_request(self, request: Request) -> Request: ... # undocumented - -class FileHandler(BaseHandler): - names: ClassVar[tuple[str, ...] | None] # undocumented - def file_open(self, req: Request) -> addinfourl: ... - def get_names(self) -> tuple[str, ...]: ... # undocumented - def open_local_file(self, req: Request) -> addinfourl: ... # undocumented - -class DataHandler(BaseHandler): - def data_open(self, req: Request) -> addinfourl: ... - -class ftpwrapper: # undocumented - def __init__( - self, user: str, passwd: str, host: str, port: int, dirs: str, timeout: float | None = None, persistent: bool = True - ) -> None: ... - def close(self) -> None: ... - def endtransfer(self) -> None: ... - def file_close(self) -> None: ... - def init(self) -> None: ... - def real_close(self) -> None: ... - def retrfile(self, file: str, type: str) -> tuple[addclosehook, int | None]: ... - -class FTPHandler(BaseHandler): - def ftp_open(self, req: Request) -> addinfourl: ... - def connect_ftp( - self, user: str, passwd: str, host: str, port: int, dirs: str, timeout: float - ) -> ftpwrapper: ... # undocumented - -class CacheFTPHandler(FTPHandler): - def setTimeout(self, t: float) -> None: ... - def setMaxConns(self, m: int) -> None: ... - def check_cache(self) -> None: ... # undocumented - def clear_cache(self) -> None: ... # undocumented - -class UnknownHandler(BaseHandler): - def unknown_open(self, req: Request) -> NoReturn: ... - -class HTTPErrorProcessor(BaseHandler): - def http_response(self, request: Request, response: HTTPResponse) -> _UrlopenRet: ... - def https_response(self, request: Request, response: HTTPResponse) -> _UrlopenRet: ... - -def urlretrieve( - url: str, - filename: StrOrBytesPath | None = None, - reporthook: Callable[[int, int, int], object] | None = None, - data: _DataType = None, -) -> tuple[str, HTTPMessage]: ... -def urlcleanup() -> None: ... - -if sys.version_info < (3, 14): - @deprecated("Deprecated since Python 3.3; removed in Python 3.14. Use newer `urlopen` functions and methods.") - class URLopener: - version: ClassVar[str] - def __init__(self, proxies: dict[str, str] | None = None, **x509: str) -> None: ... - def open(self, fullurl: str, data: ReadableBuffer | None = None) -> _UrlopenRet: ... - def open_unknown(self, fullurl: str, data: ReadableBuffer | None = None) -> _UrlopenRet: ... - def retrieve( - self, - url: str, - filename: str | None = None, - reporthook: Callable[[int, int, int], object] | None = None, - data: ReadableBuffer | None = None, - ) -> tuple[str, Message | None]: ... - def addheader(self, *args: tuple[str, str]) -> None: ... # undocumented - def cleanup(self) -> None: ... # undocumented - def close(self) -> None: ... # undocumented - def http_error( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: bytes | None = None - ) -> _UrlopenRet: ... # undocumented - def http_error_default( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage - ) -> _UrlopenRet: ... # undocumented - def open_data(self, url: str, data: ReadableBuffer | None = None) -> addinfourl: ... # undocumented - def open_file(self, url: str) -> addinfourl: ... # undocumented - def open_ftp(self, url: str) -> addinfourl: ... # undocumented - def open_http(self, url: str, data: ReadableBuffer | None = None) -> _UrlopenRet: ... # undocumented - def open_https(self, url: str, data: ReadableBuffer | None = None) -> _UrlopenRet: ... # undocumented - def open_local_file(self, url: str) -> addinfourl: ... # undocumented - def open_unknown_proxy(self, proxy: str, fullurl: str, data: ReadableBuffer | None = None) -> None: ... # undocumented - def __del__(self) -> None: ... - - @deprecated("Deprecated since Python 3.3; removed in Python 3.14. Use newer `urlopen` functions and methods.") - class FancyURLopener(URLopener): - def prompt_user_passwd(self, host: str, realm: str) -> tuple[str, str]: ... - def get_user_passwd(self, host: str, realm: str, clear_cache: int = 0) -> tuple[str, str]: ... # undocumented - def http_error_301( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None = None - ) -> _UrlopenRet | addinfourl | None: ... # undocumented - def http_error_302( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None = None - ) -> _UrlopenRet | addinfourl | None: ... # undocumented - def http_error_303( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None = None - ) -> _UrlopenRet | addinfourl | None: ... # undocumented - def http_error_307( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None = None - ) -> _UrlopenRet | addinfourl | None: ... # undocumented - if sys.version_info >= (3, 11): - def http_error_308( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None = None - ) -> _UrlopenRet | addinfourl | None: ... # undocumented - - def http_error_401( - self, - url: str, - fp: IO[bytes], - errcode: int, - errmsg: str, - headers: HTTPMessage, - data: ReadableBuffer | None = None, - retry: bool = False, - ) -> _UrlopenRet | None: ... # undocumented - def http_error_407( - self, - url: str, - fp: IO[bytes], - errcode: int, - errmsg: str, - headers: HTTPMessage, - data: ReadableBuffer | None = None, - retry: bool = False, - ) -> _UrlopenRet | None: ... # undocumented - def http_error_default( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage - ) -> addinfourl: ... # undocumented - def redirect_internal( - self, url: str, fp: IO[bytes], errcode: int, errmsg: str, headers: HTTPMessage, data: ReadableBuffer | None - ) -> _UrlopenRet | None: ... # undocumented - def retry_http_basic_auth( - self, url: str, realm: str, data: ReadableBuffer | None = None - ) -> _UrlopenRet | None: ... # undocumented - def retry_https_basic_auth( - self, url: str, realm: str, data: ReadableBuffer | None = None - ) -> _UrlopenRet | None: ... # undocumented - def retry_proxy_http_basic_auth( - self, url: str, realm: str, data: ReadableBuffer | None = None - ) -> _UrlopenRet | None: ... # undocumented - def retry_proxy_https_basic_auth( - self, url: str, realm: str, data: ReadableBuffer | None = None - ) -> _UrlopenRet | None: ... # undocumented diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/response.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/response.vpi deleted file mode 100644 index 459b9d1b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/response.vpi +++ /dev/null @@ -1,45 +0,0 @@ -import tempfile -from _typeshed import ReadableBuffer -from collections.abc import Callable, Iterable -from email.message import Message -from types import TracebackType -from typing import IO, Any -from typing_extensions import deprecated - -__all__ = ["addbase", "addclosehook", "addinfo", "addinfourl"] - -class addbase(tempfile._TemporaryFileWrapper[bytes]): - fp: IO[bytes] - def __init__(self, fp: IO[bytes]) -> None: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - # These methods don't actually exist, but the class inherits at runtime from - # tempfile._TemporaryFileWrapper, which uses __getattr__ to delegate to the - # underlying file object. To satisfy the BinaryIO interface, we pretend that this - # class has these additional methods. - def write(self, s: ReadableBuffer) -> int: ... - def writelines(self, lines: Iterable[ReadableBuffer]) -> None: ... - -class addclosehook(addbase): - closehook: Callable[..., object] - hookargs: tuple[Any, ...] - def __init__(self, fp: IO[bytes], closehook: Callable[..., object], *hookargs: Any) -> None: ... - -class addinfo(addbase): - headers: Message - def __init__(self, fp: IO[bytes], headers: Message) -> None: ... - def info(self) -> Message: ... - -class addinfourl(addinfo): - url: str - code: int | None # Deprecated since Python 3.9. Use `addinfourl.status` attribute instead. - @property - def status(self) -> int | None: ... - def __init__(self, fp: IO[bytes], headers: Message, url: str, code: int | None = None) -> None: ... - @deprecated("Deprecated since Python 3.9. Use `addinfourl.url` attribute instead.") - def geturl(self) -> str: ... - @deprecated("Deprecated since Python 3.9. Use `addinfourl.headers` attribute instead.") - def info(self) -> Message: ... - @deprecated("Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.") - def getcode(self) -> int | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/robotparser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/robotparser.vpi deleted file mode 100644 index 14ceef55..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/urllib/robotparser.vpi +++ /dev/null @@ -1,20 +0,0 @@ -from collections.abc import Iterable -from typing import NamedTuple - -__all__ = ["RobotFileParser"] - -class RequestRate(NamedTuple): - requests: int - seconds: int - -class RobotFileParser: - def __init__(self, url: str = "") -> None: ... - def set_url(self, url: str) -> None: ... - def read(self) -> None: ... - def parse(self, lines: Iterable[str]) -> None: ... - def can_fetch(self, useragent: str, url: str) -> bool: ... - def mtime(self) -> int: ... - def modified(self) -> None: ... - def crawl_delay(self, useragent: str) -> str | None: ... - def request_rate(self, useragent: str) -> RequestRate | None: ... - def site_maps(self) -> list[str] | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/uu.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/uu.vpi deleted file mode 100644 index 62bf6cb0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/uu.vpi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import BinaryIO, TypeAlias - -__all__ = ["Error", "encode", "decode"] - -_File: TypeAlias = str | BinaryIO - -class Error(Exception): ... - -def encode( - in_file: _File, out_file: _File, name: str | None = None, mode: int | None = None, *, backtick: bool = False -) -> None: ... -def decode(in_file: _File, out_file: _File | None = None, mode: int | None = None, quiet: bool = False) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/uuid.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/uuid.vpi deleted file mode 100644 index 06285e03..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/uuid.vpi +++ /dev/null @@ -1,106 +0,0 @@ -import builtins -import sys -from _typeshed import Unused -from enum import Enum -from typing import Final, NoReturn, TypeAlias -from typing_extensions import LiteralString - -_FieldsType: TypeAlias = tuple[int, int, int, int, int, int] - -class SafeUUID(Enum): - safe = 0 - unsafe = -1 - unknown = None - -class UUID: - __slots__ = ("int", "is_safe", "__weakref__") - is_safe: Final[SafeUUID] - int: Final[builtins.int] - - def __init__( - self, - hex: str | None = None, - bytes: builtins.bytes | None = None, - bytes_le: builtins.bytes | None = None, - fields: _FieldsType | None = None, - int: builtins.int | None = None, - version: builtins.int | None = None, - *, - is_safe: SafeUUID = SafeUUID.unknown, - ) -> None: ... - @property - def bytes(self) -> builtins.bytes: ... - @property - def bytes_le(self) -> builtins.bytes: ... - @property - def clock_seq(self) -> builtins.int: ... - @property - def clock_seq_hi_variant(self) -> builtins.int: ... - @property - def clock_seq_low(self) -> builtins.int: ... - @property - def fields(self) -> _FieldsType: ... - @property - def hex(self) -> str: ... - @property - def node(self) -> builtins.int: ... - @property - def time(self) -> builtins.int: ... - @property - def time_hi_version(self) -> builtins.int: ... - @property - def time_low(self) -> builtins.int: ... - @property - def time_mid(self) -> builtins.int: ... - @property - def urn(self) -> str: ... - @property - def variant(self) -> str: ... - @property - def version(self) -> builtins.int | None: ... - def __int__(self) -> builtins.int: ... - def __eq__(self, other: object) -> bool: ... - def __lt__(self, other: UUID) -> bool: ... - def __le__(self, other: UUID) -> bool: ... - def __gt__(self, other: UUID) -> bool: ... - def __ge__(self, other: UUID) -> bool: ... - def __hash__(self) -> builtins.int: ... - def __setattr__(self, name: Unused, value: Unused) -> NoReturn: ... - -def getnode() -> int: ... -def uuid1(node: int | None = None, clock_seq: int | None = None) -> UUID: ... - -if sys.version_info >= (3, 14): - def uuid6(node: int | None = None, clock_seq: int | None = None) -> UUID: ... - def uuid7() -> UUID: ... - def uuid8(a: int | None = None, b: int | None = None, c: int | None = None) -> UUID: ... - -if sys.version_info >= (3, 12): - def uuid3(namespace: UUID, name: str | bytes) -> UUID: ... - -else: - def uuid3(namespace: UUID, name: str) -> UUID: ... - -def uuid4() -> UUID: ... - -if sys.version_info >= (3, 12): - def uuid5(namespace: UUID, name: str | bytes) -> UUID: ... - -else: - def uuid5(namespace: UUID, name: str) -> UUID: ... - -if sys.version_info >= (3, 14): - NIL: Final[UUID] - MAX: Final[UUID] - -NAMESPACE_DNS: Final[UUID] -NAMESPACE_URL: Final[UUID] -NAMESPACE_OID: Final[UUID] -NAMESPACE_X500: Final[UUID] -RESERVED_NCS: Final[LiteralString] -RFC_4122: Final[LiteralString] -RESERVED_MICROSOFT: Final[LiteralString] -RESERVED_FUTURE: Final[LiteralString] - -if sys.version_info >= (3, 12): - def main() -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/venv/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/venv/__init__.vpi deleted file mode 100644 index 14db8852..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/venv/__init__.vpi +++ /dev/null @@ -1,86 +0,0 @@ -import logging -import sys -from _typeshed import StrOrBytesPath -from collections.abc import Iterable, Sequence -from types import SimpleNamespace -from typing import Final - -logger: logging.Logger - -CORE_VENV_DEPS: Final[tuple[str, ...]] - -class EnvBuilder: - system_site_packages: bool - clear: bool - symlinks: bool - upgrade: bool - with_pip: bool - prompt: str | None - - if sys.version_info >= (3, 13): - def __init__( - self, - system_site_packages: bool = False, - clear: bool = False, - symlinks: bool = False, - upgrade: bool = False, - with_pip: bool = False, - prompt: str | None = None, - upgrade_deps: bool = False, - *, - scm_ignore_files: Iterable[str] = ..., - ) -> None: ... - else: - def __init__( - self, - system_site_packages: bool = False, - clear: bool = False, - symlinks: bool = False, - upgrade: bool = False, - with_pip: bool = False, - prompt: str | None = None, - upgrade_deps: bool = False, - ) -> None: ... - - def create(self, env_dir: StrOrBytesPath) -> None: ... - def clear_directory(self, path: StrOrBytesPath) -> None: ... # undocumented - def ensure_directories(self, env_dir: StrOrBytesPath) -> SimpleNamespace: ... - def create_configuration(self, context: SimpleNamespace) -> None: ... - def symlink_or_copy( - self, src: StrOrBytesPath, dst: StrOrBytesPath, relative_symlinks_ok: bool = False - ) -> None: ... # undocumented - def setup_python(self, context: SimpleNamespace) -> None: ... - def _setup_pip(self, context: SimpleNamespace) -> None: ... # undocumented - def setup_scripts(self, context: SimpleNamespace) -> None: ... - def post_setup(self, context: SimpleNamespace) -> None: ... - def replace_variables(self, text: str, context: SimpleNamespace) -> str: ... # undocumented - def install_scripts(self, context: SimpleNamespace, path: str) -> None: ... - def upgrade_dependencies(self, context: SimpleNamespace) -> None: ... - if sys.version_info >= (3, 13): - def create_git_ignore_file(self, context: SimpleNamespace) -> None: ... - -if sys.version_info >= (3, 13): - def create( - env_dir: StrOrBytesPath, - system_site_packages: bool = False, - clear: bool = False, - symlinks: bool = False, - with_pip: bool = False, - prompt: str | None = None, - upgrade_deps: bool = False, - *, - scm_ignore_files: Iterable[str] = ..., - ) -> None: ... - -else: - def create( - env_dir: StrOrBytesPath, - system_site_packages: bool = False, - clear: bool = False, - symlinks: bool = False, - with_pip: bool = False, - prompt: str | None = None, - upgrade_deps: bool = False, - ) -> None: ... - -def main(args: Sequence[str] | None = None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wave.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wave.vpi deleted file mode 100644 index 74f8b8a9..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wave.vpi +++ /dev/null @@ -1,105 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, StrOrBytesPath, Unused -from typing import IO, Any, BinaryIO, Final, Literal, NamedTuple, NoReturn, TypeAlias, overload -from typing_extensions import Self, deprecated - -__all__ = ["open", "Error", "Wave_read", "Wave_write"] -if sys.version_info >= (3, 15): - __all__ += ["WAVE_FORMAT_PCM", "WAVE_FORMAT_IEEE_FLOAT", "WAVE_FORMAT_EXTENSIBLE"] - -if sys.version_info >= (3, 15): - _File: TypeAlias = StrOrBytesPath | IO[bytes] -else: - _File: TypeAlias = str | IO[bytes] - -class Error(Exception): ... - -WAVE_FORMAT_PCM: Final = 0x0001 -if sys.version_info >= (3, 15): - WAVE_FORMAT_IEEE_FLOAT: Final = 0x0003 - WAVE_FORMAT_EXTENSIBLE: Final = 0xFFFE - -class _wave_params(NamedTuple): - nchannels: int - sampwidth: int - framerate: int - nframes: int - comptype: str - compname: str - -class Wave_read: - def __init__(self, f: _File) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def __del__(self) -> None: ... - def getfp(self) -> BinaryIO | None: ... - def rewind(self) -> None: ... - def close(self) -> None: ... - def tell(self) -> int: ... - def getnchannels(self) -> int: ... - def getnframes(self) -> int: ... - def getsampwidth(self) -> int: ... - def getframerate(self) -> int: ... - if sys.version_info >= (3, 15): - def getformat(self) -> int: ... - - def getcomptype(self) -> str: ... - def getcompname(self) -> str: ... - def getparams(self) -> _wave_params: ... - if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def getmarkers(self) -> None: ... - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def getmark(self, id: Any) -> NoReturn: ... - - def setpos(self, pos: int) -> None: ... - def readframes(self, nframes: int) -> bytes: ... - -class Wave_write: - def __init__(self, f: _File) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, *args: Unused) -> None: ... - def __del__(self) -> None: ... - def setnchannels(self, nchannels: int) -> None: ... - def getnchannels(self) -> int: ... - def setsampwidth(self, sampwidth: int) -> None: ... - def getsampwidth(self) -> int: ... - def setframerate(self, framerate: float) -> None: ... - def getframerate(self) -> int: ... - if sys.version_info >= (3, 15): - def setformat(self, format: int) -> None: ... - def getformat(self) -> int: ... - - def setnframes(self, nframes: int) -> None: ... - def getnframes(self) -> int: ... - def setcomptype(self, comptype: str, compname: str) -> None: ... - def getcomptype(self) -> str: ... - def getcompname(self) -> str: ... - if sys.version_info >= (3, 15): - def setparams( - self, params: _wave_params | tuple[int, int, int, int, str, str] | tuple[int, int, int, int, str, str, int] - ) -> None: ... - else: - def setparams(self, params: _wave_params | tuple[int, int, int, int, str, str]) -> None: ... - - def getparams(self) -> _wave_params: ... - - if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def setmark(self, id: Any, pos: Any, name: Any) -> NoReturn: ... - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def getmark(self, id: Any) -> NoReturn: ... - @deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.") - def getmarkers(self) -> None: ... - - def tell(self) -> int: ... - def writeframesraw(self, data: ReadableBuffer) -> None: ... - def writeframes(self, data: ReadableBuffer) -> None: ... - def close(self) -> None: ... - -@overload -def open(f: _File, mode: Literal["r", "rb"]) -> Wave_read: ... -@overload -def open(f: _File, mode: Literal["w", "wb"]) -> Wave_write: ... -@overload -def open(f: _File, mode: str | None = None) -> Any: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/webbrowser.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/webbrowser.vpi deleted file mode 100644 index 40b57c3c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/webbrowser.vpi +++ /dev/null @@ -1,78 +0,0 @@ -import sys -from abc import abstractmethod -from collections.abc import Callable, Sequence -from typing import Literal -from typing_extensions import deprecated - -__all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"] - -class Error(Exception): ... - -def register( - name: str, klass: Callable[[], BaseBrowser] | None, instance: BaseBrowser | None = None, *, preferred: bool = False -) -> None: ... -def get(using: str | None = None) -> BaseBrowser: ... -def open(url: str, new: int = 0, autoraise: bool = True) -> bool: ... -def open_new(url: str) -> bool: ... -def open_new_tab(url: str) -> bool: ... - -class BaseBrowser: - args: list[str] - name: str - basename: str - def __init__(self, name: str = "") -> None: ... - @abstractmethod - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - def open_new(self, url: str) -> bool: ... - def open_new_tab(self, url: str) -> bool: ... - -class GenericBrowser(BaseBrowser): - def __init__(self, name: str | Sequence[str]) -> None: ... - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - -class BackgroundBrowser(GenericBrowser): ... - -class UnixBrowser(BaseBrowser): - def open(self, url: str, new: Literal[0, 1, 2] = 0, autoraise: bool = True) -> bool: ... # type: ignore[override] - raise_opts: list[str] | None - background: bool - redirect_stdout: bool - remote_args: list[str] - remote_action: str - remote_action_newwin: str - remote_action_newtab: str - -class Mozilla(UnixBrowser): ... - -if sys.version_info < (3, 12): - class Galeon(UnixBrowser): - raise_opts: list[str] - - class Grail(BaseBrowser): - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - -class Chrome(UnixBrowser): ... -class Opera(UnixBrowser): ... -class Elinks(UnixBrowser): ... - -class Konqueror(BaseBrowser): - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - -if sys.platform == "win32": - class WindowsDefault(BaseBrowser): - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - -if sys.platform == "darwin": - if sys.version_info < (3, 13): - @deprecated("Deprecated since Python 3.11; removed in Python 3.13.") - class MacOSX(BaseBrowser): - def __init__(self, name: str) -> None: ... - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... - - class MacOSXOSAScript(BaseBrowser): # In runtime this class does not have `name` and `basename` - if sys.version_info >= (3, 11): - def __init__(self, name: str = "default") -> None: ... - else: - def __init__(self, name: str) -> None: ... - - def open(self, url: str, new: int = 0, autoraise: bool = True) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/winreg.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/winreg.vpi deleted file mode 100644 index 8a886112..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/winreg.vpi +++ /dev/null @@ -1,137 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, Unused -from types import TracebackType -from typing import Any, Final, Literal, TypeAlias, final, overload -from typing_extensions import Self - -if sys.platform == "win32": - _KeyType: TypeAlias = HKEYType | int - def CloseKey(hkey: _KeyType, /) -> None: ... - def ConnectRegistry(computer_name: str | None, key: _KeyType, /) -> HKEYType: ... - def CreateKey(key: _KeyType, sub_key: str | None, /) -> HKEYType: ... - def CreateKeyEx(key: _KeyType, sub_key: str | None, reserved: int = 0, access: int = 131078) -> HKEYType: ... - def DeleteKey(key: _KeyType, sub_key: str, /) -> None: ... - def DeleteKeyEx(key: _KeyType, sub_key: str, access: int = 256, reserved: int = 0) -> None: ... - if sys.version_info >= (3, 15): - def DeleteTree(key: _KeyType, sub_key: str | None = None, /) -> None: ... - - def DeleteValue(key: _KeyType, value: str, /) -> None: ... - def EnumKey(key: _KeyType, index: int, /) -> str: ... - def EnumValue(key: _KeyType, index: int, /) -> tuple[str, Any, int]: ... - def ExpandEnvironmentStrings(string: str, /) -> str: ... - def FlushKey(key: _KeyType, /) -> None: ... - def LoadKey(key: _KeyType, sub_key: str, file_name: str, /) -> None: ... - def OpenKey(key: _KeyType, sub_key: str | None, reserved: int = 0, access: int = 131097) -> HKEYType: ... - def OpenKeyEx(key: _KeyType, sub_key: str | None, reserved: int = 0, access: int = 131097) -> HKEYType: ... - def QueryInfoKey(key: _KeyType, /) -> tuple[int, int, int]: ... - def QueryValue(key: _KeyType, sub_key: str | None, /) -> str: ... - def QueryValueEx(key: _KeyType, name: str, /) -> tuple[Any, int]: ... - def SaveKey(key: _KeyType, file_name: str, /) -> None: ... - def SetValue(key: _KeyType, sub_key: str | None, type: int, value: str, /) -> None: ... - - @overload # type=REG_DWORD|REG_QWORD - def SetValueEx( - key: _KeyType, value_name: str | None, reserved: Unused, type: Literal[4, 5], value: int | None, / - ) -> None: ... - @overload # type=REG_SZ|REG_EXPAND_SZ - def SetValueEx( - key: _KeyType, value_name: str | None, reserved: Unused, type: Literal[1, 2], value: str | None, / - ) -> None: ... - @overload # type=REG_MULTI_SZ - def SetValueEx( - key: _KeyType, value_name: str | None, reserved: Unused, type: Literal[7], value: list[str] | None, / - ) -> None: ... - @overload # type=REG_BINARY and everything else - def SetValueEx( - key: _KeyType, - value_name: str | None, - reserved: Unused, - type: Literal[0, 3, 8, 9, 10, 11], - value: ReadableBuffer | None, - /, - ) -> None: ... - @overload # Unknown or undocumented - def SetValueEx( - key: _KeyType, - value_name: str | None, - reserved: Unused, - type: int, - value: int | str | list[str] | ReadableBuffer | None, - /, - ) -> None: ... - - def DisableReflectionKey(key: _KeyType, /) -> None: ... - def EnableReflectionKey(key: _KeyType, /) -> None: ... - def QueryReflectionKey(key: _KeyType, /) -> bool: ... - - HKEY_CLASSES_ROOT: Final[int] - HKEY_CURRENT_USER: Final[int] - HKEY_LOCAL_MACHINE: Final[int] - HKEY_USERS: Final[int] - HKEY_PERFORMANCE_DATA: Final[int] - HKEY_CURRENT_CONFIG: Final[int] - HKEY_DYN_DATA: Final[int] - - KEY_ALL_ACCESS: Final = 983103 - KEY_WRITE: Final = 131078 - KEY_READ: Final = 131097 - KEY_EXECUTE: Final = 131097 - KEY_QUERY_VALUE: Final = 1 - KEY_SET_VALUE: Final = 2 - KEY_CREATE_SUB_KEY: Final = 4 - KEY_ENUMERATE_SUB_KEYS: Final = 8 - KEY_NOTIFY: Final = 16 - KEY_CREATE_LINK: Final = 32 - - KEY_WOW64_64KEY: Final = 256 - KEY_WOW64_32KEY: Final = 512 - - REG_BINARY: Final = 3 - REG_DWORD: Final = 4 - REG_DWORD_LITTLE_ENDIAN: Final = 4 - REG_DWORD_BIG_ENDIAN: Final = 5 - REG_EXPAND_SZ: Final = 2 - REG_LINK: Final = 6 - REG_MULTI_SZ: Final = 7 - REG_NONE: Final = 0 - REG_QWORD: Final = 11 - REG_QWORD_LITTLE_ENDIAN: Final = 11 - REG_RESOURCE_LIST: Final = 8 - REG_FULL_RESOURCE_DESCRIPTOR: Final = 9 - REG_RESOURCE_REQUIREMENTS_LIST: Final = 10 - REG_SZ: Final = 1 - - REG_CREATED_NEW_KEY: Final = 1 # undocumented - REG_LEGAL_CHANGE_FILTER: Final = 268435471 # undocumented - REG_LEGAL_OPTION: Final = 31 # undocumented - REG_NOTIFY_CHANGE_ATTRIBUTES: Final = 2 # undocumented - REG_NOTIFY_CHANGE_LAST_SET: Final = 4 # undocumented - REG_NOTIFY_CHANGE_NAME: Final = 1 # undocumented - REG_NOTIFY_CHANGE_SECURITY: Final = 8 # undocumented - REG_NO_LAZY_FLUSH: Final = 4 # undocumented - REG_OPENED_EXISTING_KEY: Final = 2 # undocumented - REG_OPTION_BACKUP_RESTORE: Final = 4 # undocumented - REG_OPTION_CREATE_LINK: Final = 2 # undocumented - REG_OPTION_NON_VOLATILE: Final = 0 # undocumented - REG_OPTION_OPEN_LINK: Final = 8 # undocumented - REG_OPTION_RESERVED: Final = 0 # undocumented - REG_OPTION_VOLATILE: Final = 1 # undocumented - REG_REFRESH_HIVE: Final = 2 # undocumented - REG_WHOLE_HIVE_VOLATILE: Final = 1 # undocumented - - error = OSError - - # Though this class has a __name__ of PyHKEY, it's exposed as HKEYType for some reason - @final - class HKEYType: - def __bool__(self) -> bool: ... - def __int__(self) -> int: ... - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None, / - ) -> bool | None: ... - def Close(self) -> None: ... - def Detach(self) -> int: ... - def __hash__(self) -> int: ... - @property - def handle(self) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/winsound.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/winsound.vpi deleted file mode 100644 index 9c7f314f..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/winsound.vpi +++ /dev/null @@ -1,40 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from typing import Final, Literal, overload - -if sys.platform == "win32": - SND_APPLICATION: Final = 128 - SND_FILENAME: Final = 131072 - SND_ALIAS: Final = 65536 - SND_LOOP: Final = 8 - SND_MEMORY: Final = 4 - SND_PURGE: Final = 64 - SND_ASYNC: Final = 1 - SND_NODEFAULT: Final = 2 - SND_NOSTOP: Final = 16 - SND_NOWAIT: Final = 8192 - if sys.version_info >= (3, 14): - SND_SENTRY: Final = 524288 - SND_SYNC: Final = 0 - SND_SYSTEM: Final = 2097152 - - MB_ICONASTERISK: Final = 64 - MB_ICONEXCLAMATION: Final = 48 - MB_ICONHAND: Final = 16 - MB_ICONQUESTION: Final = 32 - MB_OK: Final = 0 - if sys.version_info >= (3, 14): - MB_ICONERROR: Final = 16 - MB_ICONINFORMATION: Final = 64 - MB_ICONSTOP: Final = 16 - MB_ICONWARNING: Final = 48 - - def Beep(frequency: int, duration: int) -> None: ... - - # Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible - @overload - def PlaySound(sound: ReadableBuffer | None, flags: Literal[4]) -> None: ... - @overload - def PlaySound(sound: str | ReadableBuffer | None, flags: int) -> None: ... - - def MessageBeep(type: int = 0) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/handlers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/handlers.vpi deleted file mode 100644 index ebead540..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/handlers.vpi +++ /dev/null @@ -1,91 +0,0 @@ -from _typeshed import OptExcInfo -from _typeshed.wsgi import ErrorStream, InputStream, StartResponse, WSGIApplication, WSGIEnvironment -from abc import abstractmethod -from collections.abc import Callable, MutableMapping -from typing import IO - -from .headers import Headers -from .util import FileWrapper - -__all__ = ["BaseHandler", "SimpleHandler", "BaseCGIHandler", "CGIHandler", "IISCGIHandler", "read_environ"] - -def format_date_time(timestamp: float | None) -> str: ... # undocumented -def read_environ() -> dict[str, str]: ... - -class BaseHandler: - wsgi_version: tuple[int, int] # undocumented - wsgi_multithread: bool - wsgi_multiprocess: bool - wsgi_run_once: bool - - origin_server: bool - http_version: str - server_software: str | None - - os_environ: MutableMapping[str, str] - - wsgi_file_wrapper: type[FileWrapper] | None - headers_class: type[Headers] # undocumented - - traceback_limit: int | None - error_status: str - error_headers: list[tuple[str, str]] - error_body: bytes - def run(self, application: WSGIApplication) -> None: ... - def setup_environ(self) -> None: ... - def finish_response(self) -> None: ... - def get_scheme(self) -> str: ... - def set_content_length(self) -> None: ... - def cleanup_headers(self) -> None: ... - def start_response( - self, status: str, headers: list[tuple[str, str]], exc_info: OptExcInfo | None = None - ) -> Callable[[bytes], None]: ... - def send_preamble(self) -> None: ... - def write(self, data: bytes) -> None: ... - def sendfile(self) -> bool: ... - def finish_content(self) -> None: ... - def close(self) -> None: ... - def send_headers(self) -> None: ... - def result_is_file(self) -> bool: ... - def client_is_modern(self) -> bool: ... - def log_exception(self, exc_info: OptExcInfo) -> None: ... - def handle_error(self) -> None: ... - def error_output(self, environ: WSGIEnvironment, start_response: StartResponse) -> list[bytes]: ... - @abstractmethod - def _write(self, data: bytes) -> None: ... - @abstractmethod - def _flush(self) -> None: ... - @abstractmethod - def get_stdin(self) -> InputStream: ... - @abstractmethod - def get_stderr(self) -> ErrorStream: ... - @abstractmethod - def add_cgi_vars(self) -> None: ... - -class SimpleHandler(BaseHandler): - stdin: InputStream - stdout: IO[bytes] - stderr: ErrorStream - base_env: MutableMapping[str, str] - def __init__( - self, - stdin: InputStream, - stdout: IO[bytes], - stderr: ErrorStream, - environ: MutableMapping[str, str], - multithread: bool = True, - multiprocess: bool = False, - ) -> None: ... - def get_stdin(self) -> InputStream: ... - def get_stderr(self) -> ErrorStream: ... - def add_cgi_vars(self) -> None: ... - def _write(self, data: bytes) -> None: ... - def _flush(self) -> None: ... - -class BaseCGIHandler(SimpleHandler): ... - -class CGIHandler(BaseCGIHandler): - def __init__(self) -> None: ... - -class IISCGIHandler(BaseCGIHandler): - def __init__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/headers.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/headers.vpi deleted file mode 100644 index 6a0fb571..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/headers.vpi +++ /dev/null @@ -1,27 +0,0 @@ -from re import Pattern -from typing import Final, TypeAlias, overload - -_HeaderList: TypeAlias = list[tuple[str, str]] - -tspecials: Final[Pattern[str]] # undocumented - -class Headers: - def __init__(self, headers: _HeaderList | None = None) -> None: ... - def __len__(self) -> int: ... - def __setitem__(self, name: str, val: str) -> None: ... - def __delitem__(self, name: str) -> None: ... - def __getitem__(self, name: str) -> str | None: ... - def __contains__(self, name: str) -> bool: ... - def get_all(self, name: str) -> list[str]: ... - - @overload - def get(self, name: str, default: str) -> str: ... - @overload - def get(self, name: str, default: str | None = None) -> str | None: ... - - def keys(self) -> list[str]: ... - def values(self) -> list[str]: ... - def items(self) -> _HeaderList: ... - def __bytes__(self) -> bytes: ... - def setdefault(self, name: str, value: str) -> str: ... - def add_header(self, _name: str, _value: str | None, **_params: str | None) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/simple_server.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/simple_server.vpi deleted file mode 100644 index bdf58719..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/simple_server.vpi +++ /dev/null @@ -1,37 +0,0 @@ -from _typeshed.wsgi import ErrorStream, StartResponse, WSGIApplication, WSGIEnvironment -from http.server import BaseHTTPRequestHandler, HTTPServer -from typing import Final, TypeVar, overload - -from .handlers import SimpleHandler - -__all__ = ["WSGIServer", "WSGIRequestHandler", "demo_app", "make_server"] - -server_version: Final[str] # undocumented -sys_version: Final[str] # undocumented -software_version: Final[str] # undocumented - -class ServerHandler(SimpleHandler): # undocumented - server_software: str - -class WSGIServer(HTTPServer): - application: WSGIApplication | None - base_environ: WSGIEnvironment # only available after call to setup_environ() - def setup_environ(self) -> None: ... - def get_app(self) -> WSGIApplication | None: ... - def set_app(self, application: WSGIApplication | None) -> None: ... - -class WSGIRequestHandler(BaseHTTPRequestHandler): - server_version: str - def get_environ(self) -> WSGIEnvironment: ... - def get_stderr(self) -> ErrorStream: ... - -def demo_app(environ: WSGIEnvironment, start_response: StartResponse) -> list[bytes]: ... - -_S = TypeVar("_S", bound=WSGIServer) - -@overload -def make_server(host: str, port: int, app: WSGIApplication, *, handler_class: type[WSGIRequestHandler] = ...) -> WSGIServer: ... -@overload -def make_server( - host: str, port: int, app: WSGIApplication, server_class: type[_S], handler_class: type[WSGIRequestHandler] = ... -) -> _S: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/types.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/types.vpi deleted file mode 100644 index b7fd9980..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/types.vpi +++ /dev/null @@ -1,31 +0,0 @@ -from _typeshed import OptExcInfo -from collections.abc import Callable, Iterable, Iterator -from typing import Any, Protocol, TypeAlias - -__all__ = ["StartResponse", "WSGIEnvironment", "WSGIApplication", "InputStream", "ErrorStream", "FileWrapper"] - -class StartResponse(Protocol): - def __call__( - self, status: str, headers: list[tuple[str, str]], exc_info: OptExcInfo | None = ..., / - ) -> Callable[[bytes], object]: ... - -WSGIEnvironment: TypeAlias = dict[str, Any] -WSGIApplication: TypeAlias = Callable[[WSGIEnvironment, StartResponse], Iterable[bytes]] - -class InputStream(Protocol): - def read(self, size: int = ..., /) -> bytes: ... - def readline(self, size: int = ..., /) -> bytes: ... - def readlines(self, hint: int = ..., /) -> list[bytes]: ... - def __iter__(self) -> Iterator[bytes]: ... - -class ErrorStream(Protocol): - def flush(self) -> object: ... - def write(self, s: str, /) -> object: ... - def writelines(self, seq: list[str], /) -> object: ... - -class _Readable(Protocol): - def read(self, size: int = ..., /) -> bytes: ... - # Optional: def close(self) -> object: ... - -class FileWrapper(Protocol): - def __call__(self, file: _Readable, block_size: int = ..., /) -> Iterable[bytes]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/util.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/util.vpi deleted file mode 100644 index 3966e17b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/util.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import sys -from _typeshed.wsgi import WSGIEnvironment -from collections.abc import Callable -from typing import IO, Any - -__all__ = ["FileWrapper", "guess_scheme", "application_uri", "request_uri", "shift_path_info", "setup_testing_defaults"] -if sys.version_info >= (3, 13): - __all__ += ["is_hop_by_hop"] - -class FileWrapper: - filelike: IO[bytes] - blksize: int - close: Callable[[], None] # only exists if filelike.close exists - def __init__(self, filelike: IO[bytes], blksize: int = 8192) -> None: ... - if sys.version_info < (3, 11): - def __getitem__(self, key: Any) -> bytes: ... - - def __iter__(self) -> FileWrapper: ... - def __next__(self) -> bytes: ... - -def guess_scheme(environ: WSGIEnvironment) -> str: ... -def application_uri(environ: WSGIEnvironment) -> str: ... -def request_uri(environ: WSGIEnvironment, include_query: bool = True) -> str: ... -def shift_path_info(environ: WSGIEnvironment) -> str | None: ... -def setup_testing_defaults(environ: WSGIEnvironment) -> None: ... -def is_hop_by_hop(header_name: str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/validate.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/validate.vpi deleted file mode 100644 index 498e03aa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/wsgiref/validate.vpi +++ /dev/null @@ -1,49 +0,0 @@ -from _typeshed.wsgi import ErrorStream, InputStream, WSGIApplication -from collections.abc import Callable, Iterable, Iterator -from typing import Any, NoReturn, TypeAlias - -__all__ = ["validator"] - -class WSGIWarning(Warning): ... - -def validator(application: WSGIApplication) -> WSGIApplication: ... - -class InputWrapper: - input: InputStream - def __init__(self, wsgi_input: InputStream) -> None: ... - def read(self, size: int) -> bytes: ... - def readline(self, size: int = ...) -> bytes: ... - def readlines(self, hint: int = ...) -> bytes: ... - def __iter__(self) -> Iterator[bytes]: ... - def close(self) -> NoReturn: ... - -class ErrorWrapper: - errors: ErrorStream - def __init__(self, wsgi_errors: ErrorStream) -> None: ... - def write(self, s: str) -> None: ... - def flush(self) -> None: ... - def writelines(self, seq: Iterable[str]) -> None: ... - def close(self) -> NoReturn: ... - -_WriterCallback: TypeAlias = Callable[[bytes], Any] - -class WriteWrapper: - writer: _WriterCallback - def __init__(self, wsgi_writer: _WriterCallback) -> None: ... - def __call__(self, s: bytes) -> None: ... - -class PartialIteratorWrapper: - iterator: Iterator[bytes] - def __init__(self, wsgi_iterator: Iterator[bytes]) -> None: ... - def __iter__(self) -> IteratorWrapper: ... - -class IteratorWrapper: - original_iterator: Iterator[bytes] - iterator: Iterator[bytes] - closed: bool - check_start_response: bool | None - def __init__(self, wsgi_iterator: Iterator[bytes], check_start_response: bool | None) -> None: ... - def __iter__(self) -> IteratorWrapper: ... - def __next__(self) -> bytes: ... - def close(self) -> None: ... - def __del__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xdrlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xdrlib.vpi deleted file mode 100644 index 78f3ecec..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xdrlib.vpi +++ /dev/null @@ -1,57 +0,0 @@ -from collections.abc import Callable, Sequence -from typing import TypeVar - -__all__ = ["Error", "Packer", "Unpacker", "ConversionError"] - -_T = TypeVar("_T") - -class Error(Exception): - msg: str - def __init__(self, msg: str) -> None: ... - -class ConversionError(Error): ... - -class Packer: - def reset(self) -> None: ... - def get_buffer(self) -> bytes: ... - def get_buf(self) -> bytes: ... - def pack_uint(self, x: int) -> None: ... - def pack_int(self, x: int) -> None: ... - def pack_enum(self, x: int) -> None: ... - def pack_bool(self, x: bool) -> None: ... - def pack_uhyper(self, x: int) -> None: ... - def pack_hyper(self, x: int) -> None: ... - def pack_float(self, x: float) -> None: ... - def pack_double(self, x: float) -> None: ... - def pack_fstring(self, n: int, s: bytes) -> None: ... - def pack_fopaque(self, n: int, s: bytes) -> None: ... - def pack_string(self, s: bytes) -> None: ... - def pack_opaque(self, s: bytes) -> None: ... - def pack_bytes(self, s: bytes) -> None: ... - def pack_list(self, list: Sequence[_T], pack_item: Callable[[_T], object]) -> None: ... - def pack_farray(self, n: int, list: Sequence[_T], pack_item: Callable[[_T], object]) -> None: ... - def pack_array(self, list: Sequence[_T], pack_item: Callable[[_T], object]) -> None: ... - -class Unpacker: - def __init__(self, data: bytes) -> None: ... - def reset(self, data: bytes) -> None: ... - def get_position(self) -> int: ... - def set_position(self, position: int) -> None: ... - def get_buffer(self) -> bytes: ... - def done(self) -> None: ... - def unpack_uint(self) -> int: ... - def unpack_int(self) -> int: ... - def unpack_enum(self) -> int: ... - def unpack_bool(self) -> bool: ... - def unpack_uhyper(self) -> int: ... - def unpack_hyper(self) -> int: ... - def unpack_float(self) -> float: ... - def unpack_double(self) -> float: ... - def unpack_fstring(self, n: int) -> bytes: ... - def unpack_fopaque(self, n: int) -> bytes: ... - def unpack_string(self) -> bytes: ... - def unpack_opaque(self) -> bytes: ... - def unpack_bytes(self) -> bytes: ... - def unpack_list(self, unpack_item: Callable[[], _T]) -> list[_T]: ... - def unpack_farray(self, n: int, unpack_item: Callable[[], _T]) -> list[_T]: ... - def unpack_array(self, unpack_item: Callable[[], _T]) -> list[_T]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/__init__.vpi deleted file mode 100644 index c7654e7b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/__init__.vpi +++ /dev/null @@ -1,9 +0,0 @@ -# At runtime, listing submodules in __all__ without them being imported is -# valid, and causes them to be included in a star import. See #6523 -import sys - -__all__ = ["dom", "parsers", "sax", "etree"] # noqa: F822 # viper: ignore[reportUnsupportedDunderAll] - -if sys.version_info >= (3, 15): - __all__ += ["is_valid_name"] # viper: ignore[reportUnsupportedDunderAll] - from xml.utils import is_valid_name as is_valid_name, is_valid_text as is_valid_text diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/NodeFilter.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/NodeFilter.vpi deleted file mode 100644 index 7b301373..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/NodeFilter.vpi +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Final -from xml.dom.minidom import Node - -class NodeFilter: - FILTER_ACCEPT: Final = 1 - FILTER_REJECT: Final = 2 - FILTER_SKIP: Final = 3 - - SHOW_ALL: Final = 0xFFFFFFFF - SHOW_ELEMENT: Final = 0x00000001 - SHOW_ATTRIBUTE: Final = 0x00000002 - SHOW_TEXT: Final = 0x00000004 - SHOW_CDATA_SECTION: Final = 0x00000008 - SHOW_ENTITY_REFERENCE: Final = 0x00000010 - SHOW_ENTITY: Final = 0x00000020 - SHOW_PROCESSING_INSTRUCTION: Final = 0x00000040 - SHOW_COMMENT: Final = 0x00000080 - SHOW_DOCUMENT: Final = 0x00000100 - SHOW_DOCUMENT_TYPE: Final = 0x00000200 - SHOW_DOCUMENT_FRAGMENT: Final = 0x00000400 - SHOW_NOTATION: Final = 0x00000800 - def acceptNode(self, node: Node) -> int: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/__init__.vpi deleted file mode 100644 index 5dbb6c53..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/__init__.vpi +++ /dev/null @@ -1,101 +0,0 @@ -from typing import Any, Final, Literal - -from .domreg import getDOMImplementation as getDOMImplementation, registerDOMImplementation as registerDOMImplementation - -class Node: - __slots__ = () - ELEMENT_NODE: Final = 1 - ATTRIBUTE_NODE: Final = 2 - TEXT_NODE: Final = 3 - CDATA_SECTION_NODE: Final = 4 - ENTITY_REFERENCE_NODE: Final = 5 - ENTITY_NODE: Final = 6 - PROCESSING_INSTRUCTION_NODE: Final = 7 - COMMENT_NODE: Final = 8 - DOCUMENT_NODE: Final = 9 - DOCUMENT_TYPE_NODE: Final = 10 - DOCUMENT_FRAGMENT_NODE: Final = 11 - NOTATION_NODE: Final = 12 - -# ExceptionCode -INDEX_SIZE_ERR: Final = 1 -DOMSTRING_SIZE_ERR: Final = 2 -HIERARCHY_REQUEST_ERR: Final = 3 -WRONG_DOCUMENT_ERR: Final = 4 -INVALID_CHARACTER_ERR: Final = 5 -NO_DATA_ALLOWED_ERR: Final = 6 -NO_MODIFICATION_ALLOWED_ERR: Final = 7 -NOT_FOUND_ERR: Final = 8 -NOT_SUPPORTED_ERR: Final = 9 -INUSE_ATTRIBUTE_ERR: Final = 10 -INVALID_STATE_ERR: Final = 11 -SYNTAX_ERR: Final = 12 -INVALID_MODIFICATION_ERR: Final = 13 -NAMESPACE_ERR: Final = 14 -INVALID_ACCESS_ERR: Final = 15 -VALIDATION_ERR: Final = 16 - -class DOMException(Exception): - code: int - def __init__(self, *args: Any, **kw: Any) -> None: ... - def _get_code(self) -> int: ... - -class IndexSizeErr(DOMException): - code: Literal[1] - -class DomstringSizeErr(DOMException): - code: Literal[2] - -class HierarchyRequestErr(DOMException): - code: Literal[3] - -class WrongDocumentErr(DOMException): - code: Literal[4] - -class InvalidCharacterErr(DOMException): - code: Literal[5] - -class NoDataAllowedErr(DOMException): - code: Literal[6] - -class NoModificationAllowedErr(DOMException): - code: Literal[7] - -class NotFoundErr(DOMException): - code: Literal[8] - -class NotSupportedErr(DOMException): - code: Literal[9] - -class InuseAttributeErr(DOMException): - code: Literal[10] - -class InvalidStateErr(DOMException): - code: Literal[11] - -class SyntaxErr(DOMException): - code: Literal[12] - -class InvalidModificationErr(DOMException): - code: Literal[13] - -class NamespaceErr(DOMException): - code: Literal[14] - -class InvalidAccessErr(DOMException): - code: Literal[15] - -class ValidationErr(DOMException): - code: Literal[16] - -class UserDataHandler: - NODE_CLONED: Final = 1 - NODE_IMPORTED: Final = 2 - NODE_DELETED: Final = 3 - NODE_RENAMED: Final = 4 - -XML_NAMESPACE: Final = "http://www.w3.org/XML/1998/namespace" -XMLNS_NAMESPACE: Final = "http://www.w3.org/2000/xmlns/" -XHTML_NAMESPACE: Final = "http://www.w3.org/1999/xhtml" -EMPTY_NAMESPACE: Final[None] -EMPTY_PREFIX: Final[None] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/domreg.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/domreg.vpi deleted file mode 100644 index 346a4bf6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/domreg.vpi +++ /dev/null @@ -1,8 +0,0 @@ -from _typeshed.xml import DOMImplementation -from collections.abc import Callable, Iterable - -well_known_implementations: dict[str, str] -registered: dict[str, Callable[[], DOMImplementation]] - -def registerDOMImplementation(name: str, factory: Callable[[], DOMImplementation]) -> None: ... -def getDOMImplementation(name: str | None = None, features: str | Iterable[tuple[str, str | None]] = ()) -> DOMImplementation: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/expatbuilder.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/expatbuilder.vpi deleted file mode 100644 index e4106718..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/expatbuilder.vpi +++ /dev/null @@ -1,125 +0,0 @@ -from _typeshed import ReadableBuffer, SupportsRead -from typing import Any, Final, NoReturn, TypeAlias -from xml.dom.minidom import Document, DocumentFragment, DOMImplementation, Element, Node, TypeInfo -from xml.dom.xmlbuilder import DOMBuilderFilter, Options -from xml.parsers.expat import XMLParserType - -_Model: TypeAlias = tuple[int, int, str | None, tuple[Any, ...]] # same as in pyexpat - -TEXT_NODE: Final = Node.TEXT_NODE -CDATA_SECTION_NODE: Final = Node.CDATA_SECTION_NODE -DOCUMENT_NODE: Final = Node.DOCUMENT_NODE -FILTER_ACCEPT: Final = DOMBuilderFilter.FILTER_ACCEPT -FILTER_REJECT: Final = DOMBuilderFilter.FILTER_REJECT -FILTER_SKIP: Final = DOMBuilderFilter.FILTER_SKIP -FILTER_INTERRUPT: Final = DOMBuilderFilter.FILTER_INTERRUPT -theDOMImplementation: DOMImplementation - -class ElementInfo: - __slots__ = ("_attr_info", "_model", "tagName") - tagName: str - def __init__(self, tagName: str, model: _Model | None = None) -> None: ... - def getAttributeType(self, aname: str) -> TypeInfo: ... - def getAttributeTypeNS(self, namespaceURI: str | None, localName: str) -> TypeInfo: ... - def isElementContent(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isId(self, aname: str) -> bool: ... - def isIdNS(self, euri: str, ename: str, auri: str, aname: str) -> bool: ... - -class ExpatBuilder: - document: Document # Created in self.reset() - curNode: DocumentFragment | Element | Document # Created in self.reset() - def __init__(self, options: Options | None = None) -> None: ... - def createParser(self) -> XMLParserType: ... - def getParser(self) -> XMLParserType: ... - def reset(self) -> None: ... - def install(self, parser: XMLParserType) -> None: ... - def parseFile(self, file: SupportsRead[ReadableBuffer | str]) -> Document: ... - def parseString(self, string: str | ReadableBuffer) -> Document: ... - def start_doctype_decl_handler( - self, doctypeName: str, systemId: str | None, publicId: str | None, has_internal_subset: bool - ) -> None: ... - def end_doctype_decl_handler(self) -> None: ... - def pi_handler(self, target: str, data: str) -> None: ... - def character_data_handler_cdata(self, data: str) -> None: ... - def character_data_handler(self, data: str) -> None: ... - def start_cdata_section_handler(self) -> None: ... - def end_cdata_section_handler(self) -> None: ... - def entity_decl_handler( - self, - entityName: str, - is_parameter_entity: bool, - value: str | None, - base: str | None, - systemId: str, - publicId: str | None, - notationName: str | None, - ) -> None: ... - def notation_decl_handler(self, notationName: str, base: str | None, systemId: str, publicId: str | None) -> None: ... - def comment_handler(self, data: str) -> None: ... - def external_entity_ref_handler(self, context: str, base: str | None, systemId: str | None, publicId: str | None) -> int: ... - def first_element_handler(self, name: str, attributes: list[str]) -> None: ... - def start_element_handler(self, name: str, attributes: list[str]) -> None: ... - def end_element_handler(self, name: str) -> None: ... - def element_decl_handler(self, name: str, model: _Model) -> None: ... - def attlist_decl_handler(self, elem: str, name: str, type: str, default: str | None, required: bool) -> None: ... - def xml_decl_handler(self, version: str, encoding: str | None, standalone: int) -> None: ... - -class FilterVisibilityController: - __slots__ = ("filter",) - filter: DOMBuilderFilter - def __init__(self, filter: DOMBuilderFilter) -> None: ... - def startContainer(self, node: Node) -> int: ... - def acceptNode(self, node: Node) -> int: ... - -class FilterCrutch: - __slots__ = ("_builder", "_level", "_old_start", "_old_end") - def __init__(self, builder: ExpatBuilder) -> None: ... - -class Rejecter(FilterCrutch): - __slots__ = () - def start_element_handler(self, *args: Any) -> None: ... - def end_element_handler(self, *args: Any) -> None: ... - -class Skipper(FilterCrutch): - __slots__ = () - def start_element_handler(self, *args: Any) -> None: ... - def end_element_handler(self, *args: Any) -> None: ... - -class FragmentBuilder(ExpatBuilder): - fragment: DocumentFragment | None - originalDocument: Document - context: Node - def __init__(self, context: Node, options: Options | None = None) -> None: ... - def reset(self) -> None: ... - def parseFile(self, file: SupportsRead[ReadableBuffer | str]) -> DocumentFragment: ... # type: ignore[override] - def parseString(self, string: ReadableBuffer | str) -> DocumentFragment: ... # type: ignore[override] - def external_entity_ref_handler(self, context: str, base: str | None, systemId: str | None, publicId: str | None) -> int: ... - -class Namespaces: - def createParser(self) -> XMLParserType: ... - def install(self, parser: XMLParserType) -> None: ... - def start_namespace_decl_handler(self, prefix: str | None, uri: str) -> None: ... - def start_element_handler(self, name: str, attributes: list[str]) -> None: ... - def end_element_handler(self, name: str) -> None: ... # only exists if __debug__ - -class ExpatBuilderNS(Namespaces, ExpatBuilder): ... -class FragmentBuilderNS(Namespaces, FragmentBuilder): ... -class ParseEscape(Exception): ... - -class InternalSubsetExtractor(ExpatBuilder): - subset: str | list[str] | None = None - def getSubset(self) -> str: ... - def parseFile(self, file: SupportsRead[ReadableBuffer | str]) -> None: ... # type: ignore[override] - def parseString(self, string: str | ReadableBuffer) -> None: ... # type: ignore[override] - def start_doctype_decl_handler( # type: ignore[override] - self, name: str, publicId: str | None, systemId: str | None, has_internal_subset: bool - ) -> None: ... - def end_doctype_decl_handler(self) -> NoReturn: ... - def start_element_handler(self, name: str, attrs: list[str]) -> NoReturn: ... - -def parse(file: str | SupportsRead[ReadableBuffer | str], namespaces: bool = True) -> Document: ... -def parseString(string: str | ReadableBuffer, namespaces: bool = True) -> Document: ... -def parseFragment(file: str | SupportsRead[ReadableBuffer | str], context: Node, namespaces: bool = True) -> DocumentFragment: ... -def parseFragmentString(string: str | ReadableBuffer, context: Node, namespaces: bool = True) -> DocumentFragment: ... -def makeBuilder(options: Options) -> ExpatBuilderNS | ExpatBuilder: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minicompat.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minicompat.vpi deleted file mode 100644 index 6fcaee01..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minicompat.vpi +++ /dev/null @@ -1,24 +0,0 @@ -from collections.abc import Iterable -from typing import Any, Literal, TypeVar - -__all__ = ["NodeList", "EmptyNodeList", "StringTypes", "defproperty"] - -_T = TypeVar("_T") - -StringTypes: tuple[type[str]] - -class NodeList(list[_T]): - __slots__ = () - @property - def length(self) -> int: ... - def item(self, index: int) -> _T | None: ... - -class EmptyNodeList(tuple[()]): - __slots__ = () - @property - def length(self) -> Literal[0]: ... - def item(self, index: int) -> None: ... - def __add__(self, other: Iterable[_T]) -> NodeList[_T]: ... # type: ignore[override] - def __radd__(self, other: Iterable[_T]) -> NodeList[_T]: ... - -def defproperty(klass: type[Any], name: str, doc: str) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minidom.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minidom.vpi deleted file mode 100644 index 6577b00e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/minidom.vpi +++ /dev/null @@ -1,693 +0,0 @@ -import xml.dom -from _collections_abc import dict_keys, dict_values -from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite -from collections.abc import Iterable, Sequence -from types import TracebackType -from typing import Any, ClassVar, Generic, Literal, NoReturn, Protocol, TypeAlias, TypeVar, overload, type_check_only -from typing_extensions import Self -from xml.dom.minicompat import EmptyNodeList, NodeList -from xml.dom.xmlbuilder import DocumentLS, DOMImplementationLS -from xml.sax.xmlreader import XMLReader - -_NSName: TypeAlias = tuple[str | None, str] - -# Entity can also have children, but it's not implemented the same way as the -# others, so is deliberately omitted here. -_NodesWithChildren: TypeAlias = DocumentFragment | Attr | Element | Document -_NodesThatAreChildren: TypeAlias = CDATASection | Comment | DocumentType | Element | Notation | ProcessingInstruction | Text - -_AttrChildren: TypeAlias = Text # Also EntityReference, but we don't implement it -_ElementChildren: TypeAlias = Element | ProcessingInstruction | Comment | Text | CDATASection -_EntityChildren: TypeAlias = Text # I think; documentation is a little unclear -_DocumentFragmentChildren: TypeAlias = Element | Text | CDATASection | ProcessingInstruction | Comment | Notation -_DocumentChildren: TypeAlias = Comment | DocumentType | Element | ProcessingInstruction - -_N = TypeVar("_N", bound=Node) -_ChildNodeVar = TypeVar("_ChildNodeVar", bound=_NodesThatAreChildren) -_ChildNodePlusFragmentVar = TypeVar("_ChildNodePlusFragmentVar", bound=_NodesThatAreChildren | DocumentFragment) -_DocumentChildrenVar = TypeVar("_DocumentChildrenVar", bound=_DocumentChildren) -_ImportableNodeVar = TypeVar( - "_ImportableNodeVar", - bound=DocumentFragment - | Attr - | Element - | ProcessingInstruction - | CharacterData - | Text - | Comment - | CDATASection - | Entity - | Notation, -) - -@type_check_only -class _DOMErrorHandler(Protocol): - def handleError(self, error: Exception) -> bool: ... - -@type_check_only -class _UserDataHandler(Protocol): - def handle(self, operation: int, key: str, data: Any, src: Node, dst: Node) -> None: ... - -def parse( - file: str | SupportsRead[ReadableBuffer | str], parser: XMLReader | None = None, bufsize: int | None = None -) -> Document: ... -def parseString(string: str | ReadableBuffer, parser: XMLReader | None = None) -> Document: ... - -@overload -def getDOMImplementation(features: None = None) -> DOMImplementation: ... -@overload -def getDOMImplementation(features: str | Iterable[tuple[str, str | None]]) -> DOMImplementation | None: ... - -class Node(xml.dom.Node): - parentNode: _NodesWithChildren | Entity | None - ownerDocument: Document | None - nextSibling: _NodesThatAreChildren | None - previousSibling: _NodesThatAreChildren | None - namespaceURI: str | None # non-null only for Element and Attr - prefix: str | None # non-null only for NS Element and Attr - - # These aren't defined on Node, but they exist on all Node subclasses - # and various methods of Node require them to exist. - childNodes: ( - NodeList[_DocumentFragmentChildren] - | NodeList[_AttrChildren] - | NodeList[_ElementChildren] - | NodeList[_DocumentChildren] - | NodeList[_EntityChildren] - | EmptyNodeList - ) - nodeType: ClassVar[Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]] - nodeName: str | None # only possibly None on DocumentType - - # Not defined on Node, but exist on all Node subclasses. - nodeValue: str | None # non-null for Attr, ProcessingInstruction, Text, Comment, and CDATASection - attributes: NamedNodeMap | None # non-null only for Element - - @property - def firstChild(self) -> _NodesThatAreChildren | None: ... - @property - def lastChild(self) -> _NodesThatAreChildren | None: ... - @property - def localName(self) -> str | None: ... # non-null only for Element and Attr - def __bool__(self) -> Literal[True]: ... - - @overload - def toxml(self, encoding: str, standalone: bool | None = None) -> bytes: ... - @overload - def toxml(self, encoding: None = None, standalone: bool | None = None) -> str: ... - - @overload - def toprettyxml( - self, - indent: str = "\t", - newl: str = "\n", - # Handle any case where encoding is not provided or where it is passed with None - encoding: None = None, - standalone: bool | None = None, - ) -> str: ... - @overload - def toprettyxml( - self, - indent: str, - newl: str, - # Handle cases where encoding is passed as str *positionally* - encoding: str, - standalone: bool | None = None, - ) -> bytes: ... - @overload - def toprettyxml( - self, - indent: str = "\t", - newl: str = "\n", - # Handle all cases where encoding is passed as a keyword argument; because standalone - # comes after, it will also have to be a keyword arg if encoding is - *, - encoding: str, - standalone: bool | None = None, - ) -> bytes: ... - - def hasChildNodes(self) -> bool: ... - def insertBefore( # type: ignore[misc] - self: _NodesWithChildren, # viper: ignore[reportGeneralTypeIssues] - newChild: _ChildNodePlusFragmentVar, - refChild: _NodesThatAreChildren | None, - ) -> _ChildNodePlusFragmentVar: ... - def appendChild( # type: ignore[misc] - self: _NodesWithChildren, node: _ChildNodePlusFragmentVar # viper: ignore[reportGeneralTypeIssues] - ) -> _ChildNodePlusFragmentVar: ... - - @overload - def replaceChild( # type: ignore[misc] - self: _NodesWithChildren, newChild: DocumentFragment, oldChild: _ChildNodeVar - ) -> _ChildNodeVar | DocumentFragment: ... - @overload - def replaceChild( # type: ignore[misc] - self: _NodesWithChildren, newChild: _NodesThatAreChildren, oldChild: _ChildNodeVar - ) -> _ChildNodeVar | None: ... - - def removeChild(self: _NodesWithChildren, oldChild: _ChildNodeVar) -> _ChildNodeVar: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def normalize(self: _NodesWithChildren) -> None: ... # type: ignore[misc] # viper: ignore[reportGeneralTypeIssues] - def cloneNode(self, deep: bool) -> Self | None: ... - def isSupported(self, feature: str, version: str | None) -> bool: ... - def isSameNode(self, other: Node) -> bool: ... - def getInterface(self, feature: str) -> Self | None: ... - def getUserData(self, key: str) -> Any | None: ... - def setUserData(self, key: str, data: Any, handler: _UserDataHandler) -> Any: ... - def unlink(self) -> None: ... - def __enter__(self) -> Self: ... - def __exit__(self, et: type[BaseException] | None, ev: BaseException | None, tb: TracebackType | None) -> None: ... - -_DFChildrenVar = TypeVar("_DFChildrenVar", bound=_DocumentFragmentChildren) -_DFChildrenPlusFragment = TypeVar("_DFChildrenPlusFragment", bound=_DocumentFragmentChildren | DocumentFragment) - -class DocumentFragment(Node): - nodeType: ClassVar[Literal[11]] - nodeName: Literal["#document-fragment"] - nodeValue: None - attributes: None - - parentNode: None - nextSibling: None - previousSibling: None - childNodes: NodeList[_DocumentFragmentChildren] - @property - def firstChild(self) -> _DocumentFragmentChildren | None: ... - @property - def lastChild(self) -> _DocumentFragmentChildren | None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - def __init__(self) -> None: ... - def insertBefore( # type: ignore[override] - self, newChild: _DFChildrenPlusFragment, refChild: _DocumentFragmentChildren | None - ) -> _DFChildrenPlusFragment: ... - def appendChild(self, node: _DFChildrenPlusFragment) -> _DFChildrenPlusFragment: ... # type: ignore[override] - - @overload # type: ignore[override] - def replaceChild(self, newChild: DocumentFragment, oldChild: _DFChildrenVar) -> _DFChildrenVar | DocumentFragment: ... - @overload - def replaceChild(self, newChild: _DocumentFragmentChildren, oldChild: _DFChildrenVar) -> _DFChildrenVar | None: ... # type: ignore[override] - - def removeChild(self, oldChild: _DFChildrenVar) -> _DFChildrenVar: ... # type: ignore[override] - -_AttrChildrenVar = TypeVar("_AttrChildrenVar", bound=_AttrChildren) -_AttrChildrenPlusFragment = TypeVar("_AttrChildrenPlusFragment", bound=_AttrChildren | DocumentFragment) - -class Attr(Node): - __slots__ = ("_name", "_value", "namespaceURI", "_prefix", "childNodes", "_localName", "ownerDocument", "ownerElement") - nodeType: ClassVar[Literal[2]] - nodeName: str # same as Attr.name - nodeValue: str # same as Attr.value - attributes: None - - parentNode: None - nextSibling: None - previousSibling: None - childNodes: NodeList[_AttrChildren] - @property - def firstChild(self) -> _AttrChildren | None: ... - @property - def lastChild(self) -> _AttrChildren | None: ... - - namespaceURI: str | None - prefix: str | None - @property - def localName(self) -> str: ... - - name: str - value: str - specified: bool - ownerElement: Element | None - - def __init__( - self, qName: str, namespaceURI: str | None = None, localName: str | None = None, prefix: str | None = None - ) -> None: ... - def unlink(self) -> None: ... - @property - def isId(self) -> bool: ... - @property - def schemaType(self) -> TypeInfo: ... - def insertBefore(self, newChild: _AttrChildrenPlusFragment, refChild: _AttrChildren | None) -> _AttrChildrenPlusFragment: ... # type: ignore[override] - def appendChild(self, node: _AttrChildrenPlusFragment) -> _AttrChildrenPlusFragment: ... # type: ignore[override] - - @overload # type: ignore[override] - def replaceChild(self, newChild: DocumentFragment, oldChild: _AttrChildrenVar) -> _AttrChildrenVar | DocumentFragment: ... - @overload - def replaceChild(self, newChild: _AttrChildren, oldChild: _AttrChildrenVar) -> _AttrChildrenVar | None: ... # type: ignore[override] - - def removeChild(self, oldChild: _AttrChildrenVar) -> _AttrChildrenVar: ... # type: ignore[override] - -# In the DOM, this interface isn't specific to Attr, but our implementation is -# because that's the only place we use it. -class NamedNodeMap: - __slots__ = ("_attrs", "_attrsNS", "_ownerElement") - def __init__(self, attrs: dict[str, Attr], attrsNS: dict[_NSName, Attr], ownerElement: Element) -> None: ... - @property - def length(self) -> int: ... - def item(self, index: int) -> Node | None: ... - def items(self) -> list[tuple[str, str]]: ... - def itemsNS(self) -> list[tuple[_NSName, str]]: ... - def __contains__(self, key: str | _NSName) -> bool: ... - def keys(self) -> dict_keys[str, Attr]: ... - def keysNS(self) -> dict_keys[_NSName, Attr]: ... - def values(self) -> dict_values[str, Attr]: ... - def get(self, name: str, value: Attr | None = None) -> Attr | None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __len__(self) -> int: ... - def __eq__(self, other: object) -> bool: ... - def __ge__(self, other: NamedNodeMap) -> bool: ... - def __gt__(self, other: NamedNodeMap) -> bool: ... - def __le__(self, other: NamedNodeMap) -> bool: ... - def __lt__(self, other: NamedNodeMap) -> bool: ... - def __getitem__(self, attname_or_tuple: _NSName | str) -> Attr: ... - def __setitem__(self, attname: str, value: Attr | str) -> None: ... - def getNamedItem(self, name: str) -> Attr | None: ... - def getNamedItemNS(self, namespaceURI: str | None, localName: str) -> Attr | None: ... - def removeNamedItem(self, name: str) -> Attr: ... - def removeNamedItemNS(self, namespaceURI: str | None, localName: str) -> Attr: ... - def setNamedItem(self, node: Attr) -> Attr | None: ... - def setNamedItemNS(self, node: Attr) -> Attr | None: ... - def __delitem__(self, attname_or_tuple: _NSName | str) -> None: ... - -AttributeList = NamedNodeMap - -class TypeInfo: - __slots__ = ("namespace", "name") - namespace: str | None - name: str | None - def __init__(self, namespace: Incomplete | None, name: str | None) -> None: ... - -_ElementChildrenVar = TypeVar("_ElementChildrenVar", bound=_ElementChildren) -_ElementChildrenPlusFragment = TypeVar("_ElementChildrenPlusFragment", bound=_ElementChildren | DocumentFragment) - -class Element(Node): - __slots__ = ( - "ownerDocument", - "parentNode", - "tagName", - "nodeName", - "prefix", - "namespaceURI", - "_localName", - "childNodes", - "_attrs", - "_attrsNS", - "nextSibling", - "previousSibling", - ) - nodeType: ClassVar[Literal[1]] - nodeName: str # same as Element.tagName - nodeValue: None - @property - def attributes(self) -> NamedNodeMap: ... # type: ignore[override] - - parentNode: Document | Element | DocumentFragment | None - nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - childNodes: NodeList[_ElementChildren] - @property - def firstChild(self) -> _ElementChildren | None: ... - @property - def lastChild(self) -> _ElementChildren | None: ... - - namespaceURI: str | None - prefix: str | None - @property - def localName(self) -> str: ... - - schemaType: TypeInfo - tagName: str - - def __init__( - self, tagName: str, namespaceURI: str | None = None, prefix: str | None = None, localName: str | None = None - ) -> None: ... - def unlink(self) -> None: ... - def getAttribute(self, attname: str) -> str: ... - def getAttributeNS(self, namespaceURI: str | None, localName: str) -> str: ... - def setAttribute(self, attname: str, value: str) -> None: ... - def setAttributeNS(self, namespaceURI: str | None, qualifiedName: str, value: str) -> None: ... - def getAttributeNode(self, attrname: str) -> Attr | None: ... - def getAttributeNodeNS(self, namespaceURI: str | None, localName: str) -> Attr | None: ... - def setAttributeNode(self, attr: Attr) -> Attr | None: ... - setAttributeNodeNS = setAttributeNode - def removeAttribute(self, name: str) -> None: ... - def removeAttributeNS(self, namespaceURI: str | None, localName: str) -> None: ... - def removeAttributeNode(self, node: Attr) -> Attr: ... - removeAttributeNodeNS = removeAttributeNode - def hasAttribute(self, name: str) -> bool: ... - def hasAttributeNS(self, namespaceURI: str | None, localName: str) -> bool: ... - def getElementsByTagName(self, name: str) -> NodeList[Element]: ... - def getElementsByTagNameNS(self, namespaceURI: str | None, localName: str) -> NodeList[Element]: ... - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - def hasAttributes(self) -> bool: ... - def setIdAttribute(self, name: str) -> None: ... - def setIdAttributeNS(self, namespaceURI: str | None, localName: str) -> None: ... - def setIdAttributeNode(self, idAttr: Attr) -> None: ... - def insertBefore( # type: ignore[override] - self, newChild: _ElementChildrenPlusFragment, refChild: _ElementChildren | None - ) -> _ElementChildrenPlusFragment: ... - def appendChild(self, node: _ElementChildrenPlusFragment) -> _ElementChildrenPlusFragment: ... # type: ignore[override] - - @overload # type: ignore[override] - def replaceChild( - self, newChild: DocumentFragment, oldChild: _ElementChildrenVar - ) -> _ElementChildrenVar | DocumentFragment: ... - @overload - def replaceChild(self, newChild: _ElementChildren, oldChild: _ElementChildrenVar) -> _ElementChildrenVar | None: ... # type: ignore[override] - - def removeChild(self, oldChild: _ElementChildrenVar) -> _ElementChildrenVar: ... # type: ignore[override] - -class Childless: - __slots__ = () - attributes: None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - def appendChild(self, node: _NodesThatAreChildren | DocumentFragment) -> NoReturn: ... - def hasChildNodes(self) -> Literal[False]: ... - def insertBefore( - self, newChild: _NodesThatAreChildren | DocumentFragment, refChild: _NodesThatAreChildren | None - ) -> NoReturn: ... - def removeChild(self, oldChild: _NodesThatAreChildren) -> NoReturn: ... - def normalize(self) -> None: ... - def replaceChild(self, newChild: _NodesThatAreChildren | DocumentFragment, oldChild: _NodesThatAreChildren) -> NoReturn: ... - -class ProcessingInstruction(Childless, Node): - __slots__ = ("target", "data") - nodeType: ClassVar[Literal[7]] - nodeName: str # same as ProcessingInstruction.target - nodeValue: str # same as ProcessingInstruction.data - attributes: None - - parentNode: Document | Element | DocumentFragment | None - nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - - target: str - data: str - - def __init__(self, target: str, data: str) -> None: ... - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - -class CharacterData(Childless, Node): - __slots__ = ("_data", "ownerDocument", "parentNode", "previousSibling", "nextSibling") - nodeValue: str - attributes: None - - childNodes: EmptyNodeList - nextSibling: _NodesThatAreChildren | None - previousSibling: _NodesThatAreChildren | None - - @property - def localName(self) -> None: ... - - ownerDocument: Document | None - data: str - - def __init__(self) -> None: ... - @property - def length(self) -> int: ... - def __len__(self) -> int: ... - def substringData(self, offset: int, count: int) -> str: ... - def appendData(self, arg: str) -> None: ... - def insertData(self, offset: int, arg: str) -> None: ... - def deleteData(self, offset: int, count: int) -> None: ... - def replaceData(self, offset: int, count: int, arg: str) -> None: ... - -class Text(CharacterData): - __slots__ = () - nodeType: ClassVar[Literal[3]] - nodeName: Literal["#text"] - nodeValue: str # same as CharacterData.data, the content of the text node - attributes: None - - parentNode: Attr | Element | DocumentFragment | None - nextSibling: _DocumentFragmentChildren | _ElementChildren | _AttrChildren | None - previousSibling: _DocumentFragmentChildren | _ElementChildren | _AttrChildren | None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - - data: str - def splitText(self, offset: int) -> Self: ... - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - def replaceWholeText(self, content: str) -> Self | None: ... - @property - def isWhitespaceInElementContent(self) -> bool: ... - @property - def wholeText(self) -> str: ... - -class Comment(CharacterData): - nodeType: ClassVar[Literal[8]] - nodeName: Literal["#comment"] - nodeValue: str # same as CharacterData.data, the content of the comment - attributes: None - - parentNode: Document | Element | DocumentFragment | None - nextSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - previousSibling: _DocumentChildren | _ElementChildren | _DocumentFragmentChildren | None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - def __init__(self, data: str) -> None: ... - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - -class CDATASection(Text): - __slots__ = () - nodeType: ClassVar[Literal[4]] # type: ignore[assignment] - nodeName: Literal["#cdata-section"] # type: ignore[assignment] - nodeValue: str # same as CharacterData.data, the content of the CDATA Section - attributes: None - - parentNode: Element | DocumentFragment | None - nextSibling: _DocumentFragmentChildren | _ElementChildren | None - previousSibling: _DocumentFragmentChildren | _ElementChildren | None - - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - -class ReadOnlySequentialNamedNodeMap(Generic[_N]): - __slots__ = ("_seq",) - def __init__(self, seq: Sequence[_N] = ()) -> None: ... - def __len__(self) -> int: ... - def getNamedItem(self, name: str) -> _N | None: ... - def getNamedItemNS(self, namespaceURI: str | None, localName: str) -> _N | None: ... - def __getitem__(self, name_or_tuple: str | _NSName) -> _N | None: ... - def item(self, index: int) -> _N | None: ... - def removeNamedItem(self, name: str) -> NoReturn: ... - def removeNamedItemNS(self, namespaceURI: str | None, localName: str) -> NoReturn: ... - def setNamedItem(self, node: Node) -> NoReturn: ... - def setNamedItemNS(self, node: Node) -> NoReturn: ... - @property - def length(self) -> int: ... - -class Identified: - __slots__ = ("publicId", "systemId") - publicId: str | None - systemId: str | None - -class DocumentType(Identified, Childless, Node): - nodeType: ClassVar[Literal[10]] - nodeName: str | None # same as DocumentType.name - nodeValue: None - attributes: None - - parentNode: Document | None - nextSibling: _DocumentChildren | None - previousSibling: _DocumentChildren | None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - - name: str | None - internalSubset: str | None - entities: ReadOnlySequentialNamedNodeMap[Entity] - notations: ReadOnlySequentialNamedNodeMap[Notation] - - def __init__(self, qualifiedName: str | None) -> None: ... - def cloneNode(self, deep: bool) -> DocumentType | None: ... - def writexml(self, writer: SupportsWrite[str], indent: str = "", addindent: str = "", newl: str = "") -> None: ... - -class Entity(Identified, Node): - nodeType: ClassVar[Literal[6]] - nodeName: str # entity name - nodeValue: None - attributes: None - - parentNode: None - nextSibling: None - previousSibling: None - childNodes: NodeList[_EntityChildren] - @property - def firstChild(self) -> _EntityChildren | None: ... - @property - def lastChild(self) -> _EntityChildren | None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - - actualEncoding: str | None - encoding: str | None - version: str | None - notationName: str | None - - def __init__(self, name: str, publicId: str | None, systemId: str | None, notation: str | None) -> None: ... - def appendChild(self, newChild: _EntityChildren) -> NoReturn: ... # type: ignore[override] - def insertBefore(self, newChild: _EntityChildren, refChild: _EntityChildren | None) -> NoReturn: ... # type: ignore[override] - def removeChild(self, oldChild: _EntityChildren) -> NoReturn: ... # type: ignore[override] - def replaceChild(self, newChild: _EntityChildren, oldChild: _EntityChildren) -> NoReturn: ... # type: ignore[override] - -class Notation(Identified, Childless, Node): - nodeType: ClassVar[Literal[12]] - nodeName: str # notation name - nodeValue: None - attributes: None - - parentNode: DocumentFragment | None - nextSibling: _DocumentFragmentChildren | None - previousSibling: _DocumentFragmentChildren | None - childNodes: EmptyNodeList - @property - def firstChild(self) -> None: ... - @property - def lastChild(self) -> None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - def __init__(self, name: str, publicId: str | None, systemId: str | None) -> None: ... - -class DOMImplementation(DOMImplementationLS): - def hasFeature(self, feature: str, version: str | None) -> bool: ... - def createDocument(self, namespaceURI: str | None, qualifiedName: str | None, doctype: DocumentType | None) -> Document: ... - def createDocumentType(self, qualifiedName: str | None, publicId: str | None, systemId: str | None) -> DocumentType: ... - def getInterface(self, feature: str) -> Self | None: ... - -class ElementInfo: - __slots__ = ("tagName",) - tagName: str - def __init__(self, name: str) -> None: ... - def getAttributeType(self, aname: str) -> TypeInfo: ... - def getAttributeTypeNS(self, namespaceURI: str | None, localName: str) -> TypeInfo: ... - def isElementContent(self) -> bool: ... - def isEmpty(self) -> bool: ... - def isId(self, aname: str) -> bool: ... - def isIdNS(self, namespaceURI: str | None, localName: str) -> bool: ... - -_DocumentChildrenPlusFragment = TypeVar("_DocumentChildrenPlusFragment", bound=_DocumentChildren | DocumentFragment) - -class Document(Node, DocumentLS): - __slots__ = ("_elem_info", "doctype", "_id_search_stack", "childNodes", "_id_cache") - nodeType: ClassVar[Literal[9]] - nodeName: Literal["#document"] - nodeValue: None - attributes: None - - parentNode: None - previousSibling: None - nextSibling: None - childNodes: NodeList[_DocumentChildren] - @property - def firstChild(self) -> _DocumentChildren | None: ... - @property - def lastChild(self) -> _DocumentChildren | None: ... - - namespaceURI: None - prefix: None - @property - def localName(self) -> None: ... - - implementation: DOMImplementation - actualEncoding: str | None - encoding: str | None - standalone: bool | None - version: str | None - strictErrorChecking: bool - errorHandler: _DOMErrorHandler | None - documentURI: str | None - doctype: DocumentType | None - documentElement: Element | None - - def __init__(self) -> None: ... - def appendChild(self, node: _DocumentChildrenVar) -> _DocumentChildrenVar: ... # type: ignore[override] - def removeChild(self, oldChild: _DocumentChildrenVar) -> _DocumentChildrenVar: ... # type: ignore[override] - def unlink(self) -> None: ... - def cloneNode(self, deep: bool) -> Document | None: ... - def createDocumentFragment(self) -> DocumentFragment: ... - def createElement(self, tagName: str) -> Element: ... - def createTextNode(self, data: str) -> Text: ... - def createCDATASection(self, data: str) -> CDATASection: ... - def createComment(self, data: str) -> Comment: ... - def createProcessingInstruction(self, target: str, data: str) -> ProcessingInstruction: ... - def createAttribute(self, qName: str) -> Attr: ... - def createElementNS(self, namespaceURI: str | None, qualifiedName: str) -> Element: ... - def createAttributeNS(self, namespaceURI: str | None, qualifiedName: str) -> Attr: ... - def getElementById(self, id: str) -> Element | None: ... - def getElementsByTagName(self, name: str) -> NodeList[Element]: ... - def getElementsByTagNameNS(self, namespaceURI: str | None, localName: str) -> NodeList[Element]: ... - def isSupported(self, feature: str, version: str | None) -> bool: ... - def importNode(self, node: _ImportableNodeVar, deep: bool) -> _ImportableNodeVar: ... - def writexml( - self, - writer: SupportsWrite[str], - indent: str = "", - addindent: str = "", - newl: str = "", - encoding: str | None = None, - standalone: bool | None = None, - ) -> None: ... - - @overload - def renameNode(self, n: Element, namespaceURI: str, name: str) -> Element: ... - @overload - def renameNode(self, n: Attr, namespaceURI: str, name: str) -> Attr: ... - @overload - def renameNode(self, n: Element | Attr, namespaceURI: str, name: str) -> Element | Attr: ... - - def insertBefore( - self, newChild: _DocumentChildrenPlusFragment, refChild: _DocumentChildren | None # type: ignore[override] - ) -> _DocumentChildrenPlusFragment: ... - - @overload # type: ignore[override] - def replaceChild( - self, newChild: DocumentFragment, oldChild: _DocumentChildrenVar - ) -> _DocumentChildrenVar | DocumentFragment: ... - @overload - def replaceChild(self, newChild: _DocumentChildren, oldChild: _DocumentChildrenVar) -> _DocumentChildrenVar | None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/pulldom.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/pulldom.vpi deleted file mode 100644 index 4ede3901..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/pulldom.vpi +++ /dev/null @@ -1,109 +0,0 @@ -import sys -from _typeshed import Incomplete, Unused -from collections.abc import MutableSequence, Sequence -from typing import Final, Literal, NoReturn, TypeAlias -from typing_extensions import Self -from xml.dom.minidom import Comment, Document, DOMImplementation, Element, ProcessingInstruction, Text -from xml.sax import _SupportsReadClose -from xml.sax.handler import ContentHandler -from xml.sax.xmlreader import AttributesImpl, AttributesNSImpl, Locator, XMLReader - -START_ELEMENT: Final = "START_ELEMENT" -END_ELEMENT: Final = "END_ELEMENT" -COMMENT: Final = "COMMENT" -START_DOCUMENT: Final = "START_DOCUMENT" -END_DOCUMENT: Final = "END_DOCUMENT" -PROCESSING_INSTRUCTION: Final = "PROCESSING_INSTRUCTION" -IGNORABLE_WHITESPACE: Final = "IGNORABLE_WHITESPACE" -CHARACTERS: Final = "CHARACTERS" - -_NSName: TypeAlias = tuple[str | None, str] -_DocumentFactory: TypeAlias = DOMImplementation | None - -_Event: TypeAlias = ( - tuple[Literal["START_ELEMENT"], Element] - | tuple[Literal["END_ELEMENT"], Element] - | tuple[Literal["COMMENT"], Comment] - | tuple[Literal["START_DOCUMENT"], Document] - | tuple[Literal["END_DOCUMENT"], Document] - | tuple[Literal["PROCESSING_INSTRUCTION"], ProcessingInstruction] - | tuple[Literal["IGNORABLE_WHITESPACE"], Text] - | tuple[Literal["CHARACTERS"], Text] -) - -class PullDOM(ContentHandler): - document: Document | None - documentFactory: _DocumentFactory - - # firstEvent is a list of length 2 - # firstEvent[0] is always None - # firstEvent[1] is None prior to any events, after which it's a - # list of length 2, where the first item is of type _Event - # and the second item is None. - firstEvent: list[Incomplete] - - # lastEvent is also a list of length 2. The second item is always None, - # and the first item is of type _Event - # This is a slight lie: The second item is sometimes temporarily what was just - # described for the type of lastEvent, after which lastEvent is always updated - # with `self.lastEvent = self.lastEvent[1]`. - lastEvent: list[Incomplete] - - elementStack: MutableSequence[Element | Document] - pending_events: ( - list[Sequence[tuple[Literal["COMMENT"], str] | tuple[Literal["PROCESSING_INSTRUCTION"], str, str] | None]] | None - ) - def __init__(self, documentFactory: _DocumentFactory = None) -> None: ... - def pop(self) -> Element | Document: ... - def setDocumentLocator(self, locator: Locator) -> None: ... - def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ... - def endPrefixMapping(self, prefix: str | None) -> None: ... - def startElementNS(self, name: _NSName, tagName: str | None, attrs: AttributesNSImpl) -> None: ... - def endElementNS(self, name: _NSName, tagName: str | None) -> None: ... - def startElement(self, name: str, attrs: AttributesImpl) -> None: ... - def endElement(self, name: str) -> None: ... - def comment(self, s: str) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - def ignorableWhitespace(self, chars: str) -> None: ... - def characters(self, chars: str) -> None: ... - def startDocument(self) -> None: ... - def buildDocument(self, uri: str | None, tagname: str | None) -> Element: ... - def endDocument(self) -> None: ... - def clear(self) -> None: ... - -class ErrorHandler: - def warning(self, exception: BaseException) -> None: ... - def error(self, exception: BaseException) -> NoReturn: ... - def fatalError(self, exception: BaseException) -> NoReturn: ... - -class DOMEventStream: - stream: _SupportsReadClose[bytes] | _SupportsReadClose[str] - parser: XMLReader # Set to none after .clear() is called - bufsize: int - pulldom: PullDOM - def __init__(self, stream: _SupportsReadClose[bytes] | _SupportsReadClose[str], parser: XMLReader, bufsize: int) -> None: ... - if sys.version_info < (3, 11): - def __getitem__(self, pos: Unused) -> _Event: ... - - def __next__(self) -> _Event: ... - def __iter__(self) -> Self: ... - def getEvent(self) -> _Event | None: ... - def expandNode(self, node: Document) -> None: ... - def reset(self) -> None: ... - def clear(self) -> None: ... - -class SAX2DOM(PullDOM): - def startElementNS(self, name: _NSName, tagName: str | None, attrs: AttributesNSImpl) -> None: ... - def startElement(self, name: str, attrs: AttributesImpl) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - def ignorableWhitespace(self, chars: str) -> None: ... - def characters(self, chars: str) -> None: ... - -default_bufsize: Final[int] - -def parse( - stream_or_string: str | _SupportsReadClose[bytes] | _SupportsReadClose[str], - parser: XMLReader | None = None, - bufsize: int | None = None, -) -> DOMEventStream: ... -def parseString(string: str, parser: XMLReader | None = None) -> DOMEventStream: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/xmlbuilder.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/xmlbuilder.vpi deleted file mode 100644 index f19f7050..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/dom/xmlbuilder.vpi +++ /dev/null @@ -1,81 +0,0 @@ -from _typeshed import SupportsRead -from typing import Any, Final, Literal, NoReturn -from xml.dom.minidom import Document, Node, _DOMErrorHandler - -__all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"] - -class Options: - namespaces: int - namespace_declarations: bool - validation: bool - external_parameter_entities: bool - external_general_entities: bool - external_dtd_subset: bool - validate_if_schema: bool - validate: bool - datatype_normalization: bool - create_entity_ref_nodes: bool - entities: bool - whitespace_in_element_content: bool - cdata_sections: bool - comments: bool - charset_overrides_xml_encoding: bool - infoset: bool - supported_mediatypes_only: bool - errorHandler: _DOMErrorHandler | None - filter: DOMBuilderFilter | None - -class DOMBuilder: - entityResolver: DOMEntityResolver | None - errorHandler: _DOMErrorHandler | None - filter: DOMBuilderFilter | None - ACTION_REPLACE: Final = 1 - ACTION_APPEND_AS_CHILDREN: Final = 2 - ACTION_INSERT_AFTER: Final = 3 - ACTION_INSERT_BEFORE: Final = 4 - def __init__(self) -> None: ... - def setFeature(self, name: str, state: int) -> None: ... - def supportsFeature(self, name: str) -> bool: ... - def canSetFeature(self, name: str, state: Literal[1, 0]) -> bool: ... - # getFeature could return any attribute from an instance of `Options` - def getFeature(self, name: str) -> Any: ... - def parseURI(self, uri: str) -> Document: ... - def parse(self, input: DOMInputSource) -> Document: ... - def parseWithContext(self, input: DOMInputSource, cnode: Node, action: Literal[1, 2, 3, 4]) -> NoReturn: ... - -class DOMEntityResolver: - __slots__ = ("_opener",) - def resolveEntity(self, publicId: str | None, systemId: str) -> DOMInputSource: ... - -class DOMInputSource: - __slots__ = ("byteStream", "characterStream", "stringData", "encoding", "publicId", "systemId", "baseURI") - byteStream: SupportsRead[bytes] | None - characterStream: SupportsRead[str] | None - stringData: str | None - encoding: str | None - publicId: str | None - systemId: str | None - baseURI: str | None - -class DOMBuilderFilter: - FILTER_ACCEPT: Final = 1 - FILTER_REJECT: Final = 2 - FILTER_SKIP: Final = 3 - FILTER_INTERRUPT: Final = 4 - whatToShow: int - def acceptNode(self, element: Node) -> Literal[1, 2, 3, 4]: ... - def startContainer(self, element: Node) -> Literal[1, 2, 3, 4]: ... - -class DocumentLS: - async_: bool - def abort(self) -> NoReturn: ... - def load(self, uri: str) -> NoReturn: ... - def loadXML(self, source: str) -> NoReturn: ... - def saveXML(self, snode: Node | None) -> str: ... - -class DOMImplementationLS: - MODE_SYNCHRONOUS: Final = 1 - MODE_ASYNCHRONOUS: Final = 2 - def createDOMBuilder(self, mode: Literal[1], schemaType: None) -> DOMBuilder: ... - def createDOMWriter(self) -> NoReturn: ... - def createDOMInputSource(self) -> DOMInputSource: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementInclude.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementInclude.vpi deleted file mode 100644 index 5db08fb0..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementInclude.vpi +++ /dev/null @@ -1,28 +0,0 @@ -from _typeshed import FileDescriptorOrPath -from typing import Final, Literal, Protocol, overload, type_check_only -from xml.etree.ElementTree import Element - -@type_check_only -class _Loader(Protocol): - @overload - def __call__(self, href: FileDescriptorOrPath, parse: Literal["xml"], encoding: str | None = None) -> Element: ... - @overload - def __call__(self, href: FileDescriptorOrPath, parse: Literal["text"], encoding: str | None = None) -> str: ... - -XINCLUDE: Final = "{http://www.w3.org/2001/XInclude}" - -XINCLUDE_INCLUDE: Final = "{http://www.w3.org/2001/XInclude}include" -XINCLUDE_FALLBACK: Final = "{http://www.w3.org/2001/XInclude}fallback" - -DEFAULT_MAX_INCLUSION_DEPTH: Final = 6 - -class FatalIncludeError(SyntaxError): ... - -@overload -def default_loader(href: FileDescriptorOrPath, parse: Literal["xml"], encoding: str | None = None) -> Element: ... -@overload -def default_loader(href: FileDescriptorOrPath, parse: Literal["text"], encoding: str | None = None) -> str: ... - -def include(elem: Element, loader: _Loader | None = None, base_url: str | None = None, max_depth: int | None = 6) -> None: ... - -class LimitedRecursiveIncludeError(FatalIncludeError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementPath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementPath.vpi deleted file mode 100644 index 1dd6f86c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementPath.vpi +++ /dev/null @@ -1,42 +0,0 @@ -from collections.abc import Callable, Generator, Iterable -from re import Pattern -from typing import Any, Final, Literal, TypeAlias, TypeVar, overload -from xml.etree.ElementTree import Element - -xpath_tokenizer_re: Final[Pattern[str]] - -_Token: TypeAlias = tuple[str, str] -_Next: TypeAlias = Callable[[], _Token] -_Callback: TypeAlias = Callable[[_SelectorContext, Iterable[Element]], Generator[Element]] -_T = TypeVar("_T") - -def xpath_tokenizer(pattern: str, namespaces: dict[str, str] | None = None) -> Generator[_Token]: ... -def get_parent_map(context: _SelectorContext) -> dict[Element, Element]: ... -def prepare_child(next: _Next, token: _Token) -> _Callback: ... -def prepare_star(next: _Next, token: _Token) -> _Callback: ... -def prepare_self(next: _Next, token: _Token) -> _Callback: ... -def prepare_descendant(next: _Next, token: _Token) -> _Callback | None: ... -def prepare_parent(next: _Next, token: _Token) -> _Callback: ... -def prepare_predicate(next: _Next, token: _Token) -> _Callback | None: ... - -ops: Final[dict[str, Callable[[_Next, _Token], _Callback | None]]] - -class _SelectorContext: - parent_map: dict[Element, Element] | None - root: Element - def __init__(self, root: Element) -> None: ... - -@overload -def iterfind( # type: ignore[overload-overlap] - elem: Element[Any], path: Literal[""], namespaces: dict[str, str] | None = None -) -> None: ... -@overload -def iterfind(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ... - -def find(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> Element | None: ... -def findall(elem: Element[Any], path: str, namespaces: dict[str, str] | None = None) -> list[Element]: ... - -@overload -def findtext(elem: Element[Any], path: str, default: None = None, namespaces: dict[str, str] | None = None) -> str | None: ... -@overload -def findtext(elem: Element[Any], path: str, default: _T, namespaces: dict[str, str] | None = None) -> _T | str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementTree.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementTree.vpi deleted file mode 100644 index c77af2cb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/ElementTree.vpi +++ /dev/null @@ -1,402 +0,0 @@ -import sys -from _collections_abc import dict_keys -from _typeshed import FileDescriptorOrPath, ReadableBuffer, SupportsRead, SupportsWrite -from collections.abc import Callable, Generator, ItemsView, Iterable, Iterator, Mapping, Sequence -from typing import Any, Final, Generic, Literal, Protocol, SupportsIndex, TypeAlias, TypeGuard, TypeVar, overload, type_check_only -from typing_extensions import deprecated, disjoint_base -from xml.parsers.expat import XMLParserType - -__all__ = [ - "C14NWriterTarget", - "Comment", - "dump", - "Element", - "ElementTree", - "canonicalize", - "fromstring", - "fromstringlist", - "indent", - "iselement", - "iterparse", - "parse", - "ParseError", - "PI", - "ProcessingInstruction", - "QName", - "SubElement", - "tostring", - "tostringlist", - "TreeBuilder", - "XML", - "XMLID", - "XMLParser", - "XMLPullParser", - "register_namespace", -] -if sys.version_info < (3, 15): - __all__ += ["VERSION"] - -_T = TypeVar("_T") -_FileRead: TypeAlias = FileDescriptorOrPath | SupportsRead[bytes] | SupportsRead[str] -_FileWriteC14N: TypeAlias = FileDescriptorOrPath | SupportsWrite[bytes] -_FileWrite: TypeAlias = _FileWriteC14N | SupportsWrite[str] - -VERSION: Final[str] - -class ParseError(SyntaxError): - code: int - position: tuple[int, int] - -# In reality it works based on `.tag` attribute duck typing. -def iselement(element: object) -> TypeGuard[Element]: ... - -@overload -def canonicalize( - xml_data: str | ReadableBuffer | None = None, - *, - out: None = None, - from_file: _FileRead | None = None, - with_comments: bool = False, - strip_text: bool = False, - rewrite_prefixes: bool = False, - qname_aware_tags: Iterable[str] | None = None, - qname_aware_attrs: Iterable[str] | None = None, - exclude_attrs: Iterable[str] | None = None, - exclude_tags: Iterable[str] | None = None, -) -> str: ... -@overload -def canonicalize( - xml_data: str | ReadableBuffer | None = None, - *, - out: SupportsWrite[str], - from_file: _FileRead | None = None, - with_comments: bool = False, - strip_text: bool = False, - rewrite_prefixes: bool = False, - qname_aware_tags: Iterable[str] | None = None, - qname_aware_attrs: Iterable[str] | None = None, - exclude_attrs: Iterable[str] | None = None, - exclude_tags: Iterable[str] | None = None, -) -> None: ... - -# The tag for Element can be set to the Comment or ProcessingInstruction -# functions defined in this module. -_ElementCallable: TypeAlias = Callable[..., Element[_ElementCallable]] - -_Tag = TypeVar("_Tag", default=str, bound=str | _ElementCallable) -_OtherTag = TypeVar("_OtherTag", default=str, bound=str | _ElementCallable) - -@disjoint_base -class Element(Generic[_Tag]): - tag: _Tag - attrib: dict[str, str] - text: str | None - tail: str | None - def __init__(self, tag: _Tag, attrib: dict[str, str] = {}, **extra: str) -> None: ... - def append(self, subelement: Element[Any], /) -> None: ... - def clear(self) -> None: ... - def extend(self, elements: Iterable[Element[Any]], /) -> None: ... - def find(self, path: str, namespaces: dict[str, str] | None = None) -> Element | None: ... - def findall(self, path: str, namespaces: dict[str, str] | None = None) -> list[Element]: ... - - @overload - def findtext(self, path: str, default: None = None, namespaces: dict[str, str] | None = None) -> str | None: ... - @overload - def findtext(self, path: str, default: _T, namespaces: dict[str, str] | None = None) -> _T | str: ... - - @overload - def get(self, key: str, default: None = None) -> str | None: ... - @overload - def get(self, key: str, default: _T) -> str | _T: ... - - def insert(self, index: int, subelement: Element[Any], /) -> None: ... - def items(self) -> ItemsView[str, str]: ... - def iter(self, tag: str | None = None) -> Generator[Element]: ... - - @overload - def iterfind(self, path: Literal[""], namespaces: dict[str, str] | None = None) -> None: ... # type: ignore[overload-overlap] - @overload - def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ... - - def itertext(self) -> Generator[str]: ... - def keys(self) -> dict_keys[str, str]: ... - # makeelement returns the type of self in Python impl, but not in C impl - def makeelement(self, tag: _OtherTag, attrib: dict[str, str], /) -> Element[_OtherTag]: ... - def remove(self, subelement: Element[Any], /) -> None: ... - def set(self, key: str, value: str, /) -> None: ... - def __copy__(self) -> Element[_Tag]: ... # returns the type of self in Python impl, but not in C impl - def __deepcopy__(self, memo: Any, /) -> Element: ... # Only exists in C impl - def __delitem__(self, key: SupportsIndex | slice, /) -> None: ... - - @overload - def __getitem__(self, key: SupportsIndex, /) -> Element: ... - @overload - def __getitem__(self, key: slice[SupportsIndex | None], /) -> list[Element]: ... - - def __len__(self) -> int: ... - # Doesn't actually exist at runtime, but instance of the class are indeed iterable due to __getitem__. - def __iter__(self) -> Iterator[Element]: ... - - @overload - def __setitem__(self, key: SupportsIndex, value: Element[Any], /) -> None: ... - @overload - def __setitem__(self, key: slice[SupportsIndex | None], value: Iterable[Element[Any]], /) -> None: ... - - # Doesn't really exist in earlier versions, where __len__ is called implicitly instead - @deprecated("Testing an element's truth value is deprecated.") - def __bool__(self) -> bool: ... - -def SubElement(parent: Element[Any], tag: str, attrib: dict[str, str] = ..., **extra: str) -> Element: ... -def Comment(text: str | None = None) -> Element[_ElementCallable]: ... -def ProcessingInstruction(target: str, text: str | None = None) -> Element[_ElementCallable]: ... - -PI = ProcessingInstruction - -class QName: - text: str - def __init__(self, text_or_uri: str, tag: str | None = None) -> None: ... - def __lt__(self, other: QName | str) -> bool: ... - def __le__(self, other: QName | str) -> bool: ... - def __gt__(self, other: QName | str) -> bool: ... - def __ge__(self, other: QName | str) -> bool: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - -_Root = TypeVar("_Root", Element, Element | None, default=Element | None) - -class ElementTree(Generic[_Root]): - def __init__(self, element: Element[Any] | None = None, file: _FileRead | None = None) -> None: ... - def getroot(self) -> _Root: ... - def _setroot(self, element: Element[Any]) -> None: ... - def parse(self, source: _FileRead, parser: XMLParser | None = None) -> Element: ... - def iter(self, tag: str | None = None) -> Generator[Element]: ... - def find(self, path: str, namespaces: dict[str, str] | None = None) -> Element | None: ... - - @overload - def findtext(self, path: str, default: None = None, namespaces: dict[str, str] | None = None) -> str | None: ... - @overload - def findtext(self, path: str, default: _T, namespaces: dict[str, str] | None = None) -> _T | str: ... - - def findall(self, path: str, namespaces: dict[str, str] | None = None) -> list[Element]: ... - - @overload - def iterfind(self, path: Literal[""], namespaces: dict[str, str] | None = None) -> None: ... # type: ignore[overload-overlap] - @overload - def iterfind(self, path: str, namespaces: dict[str, str] | None = None) -> Generator[Element]: ... - - def write( - self, - file_or_filename: _FileWrite, - encoding: str | None = None, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - short_empty_elements: bool = True, - ) -> None: ... - def write_c14n(self, file: _FileWriteC14N) -> None: ... - -HTML_EMPTY: Final[set[str]] - -def register_namespace(prefix: str, uri: str) -> None: ... - -@overload -def tostring( - element: Element[Any], - encoding: None = None, - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> bytes: ... -@overload -def tostring( - element: Element[Any], - encoding: Literal["unicode"], - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> str: ... -@overload -def tostring( - element: Element[Any], - encoding: str, - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> Any: ... - -@overload -def tostringlist( - element: Element[Any], - encoding: None = None, - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> list[bytes]: ... -@overload -def tostringlist( - element: Element[Any], - encoding: Literal["unicode"], - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> list[str]: ... -@overload -def tostringlist( - element: Element[Any], - encoding: str, - method: Literal["xml", "html", "text", "c14n"] | None = None, - *, - xml_declaration: bool | None = None, - default_namespace: str | None = None, - short_empty_elements: bool = True, -) -> list[Any]: ... - -def dump(elem: Element[Any] | ElementTree[Any]) -> None: ... -def indent(tree: Element[Any] | ElementTree[Any], space: str = " ", level: int = 0) -> None: ... -def parse(source: _FileRead, parser: XMLParser[Any] | None = None) -> ElementTree[Element]: ... - -# The type of the second element of the tuple yielded by iterparse depends -# on the event type in the first element of the tuple: -# * start, end: Element[str] -# * comment, pi: Element[_ElementCallable] -# * start-ns: tuple[str, str] (prefix, uri) -# * end-ns: None -_EventT_co = TypeVar("_EventT_co", bound=Element[str] | Element[_ElementCallable] | tuple[str, str] | None, covariant=True) -_EventType: TypeAlias = Literal["start", "end", "comment", "pi", "start-ns", "end-ns"] - -# This class is defined inside the body of iterparse. -@type_check_only -class _IterParseIterator(Iterator[tuple[_EventType, _EventT_co]], Protocol[_EventT_co]): - if sys.version_info >= (3, 13): - def close(self) -> None: ... - if sys.version_info >= (3, 11): - def __del__(self) -> None: ... - -# See the comment for _EventT_co above for possible iterator types. -@overload -def iterparse(source: _FileRead, events: Iterable[_EventType]) -> _IterParseIterator[Any]: ... -@overload -def iterparse(source: _FileRead, events: None = None) -> _IterParseIterator[Element[str]]: ... - -# In case a custom parser is passed, the type of the second element of the tuple -# yielded by iterparse depends on the parser. -@overload -@deprecated("The `parser` parameter is deprecated since Python 3.4.") -def iterparse(source: _FileRead, events: Iterable[_EventType], parser: XMLParser | None = None) -> _IterParseIterator[Any]: ... - -_EventQueue: TypeAlias = tuple[str] | tuple[str, tuple[str, str]] | tuple[str, None] - -class XMLPullParser(Generic[_EventT_co]): - def __init__(self, events: Iterable[_EventType] | None = None, *, _parser: XMLParser[_EventT_co] | None = None) -> None: ... - def feed(self, data: str | ReadableBuffer) -> None: ... - def close(self) -> None: ... - def read_events(self) -> Iterator[_EventQueue | tuple[_EventType, _EventT_co]]: ... - def flush(self) -> None: ... - -def XML(text: str | ReadableBuffer, parser: XMLParser | None = None) -> Element: ... -def XMLID(text: str | ReadableBuffer, parser: XMLParser | None = None) -> tuple[Element, dict[str, Element]]: ... - -# This is aliased to XML in the source. -fromstring = XML - -def fromstringlist(sequence: Sequence[str | ReadableBuffer], parser: XMLParser | None = None) -> Element: ... - -# This type is both not precise enough and too precise. The TreeBuilder -# requires the elementfactory to accept tag and attrs in its args and produce -# some kind of object that has .text and .tail properties. -# I've chosen to constrain the ElementFactory to always produce an Element -# because that is how almost everyone will use it. -# Unfortunately, the type of the factory arguments is dependent on how -# TreeBuilder is called by client code (they could pass strs, bytes or whatever); -# but we don't want to use a too-broad type, or it would be too hard to write -# elementfactories. -_ElementFactory: TypeAlias = Callable[[Any, dict[Any, Any]], Element] - -@disjoint_base -class TreeBuilder: - # comment_factory can take None because passing None to Comment is not an error - def __init__( - self, - element_factory: _ElementFactory | None = None, - *, - comment_factory: Callable[[str | None], Element[Any]] | None = None, - pi_factory: Callable[[str, str | None], Element[Any]] | None = None, - insert_comments: bool = False, - insert_pis: bool = False, - ) -> None: ... - insert_comments: bool - insert_pis: bool - - def close(self) -> Element: ... - def data(self, data: str, /) -> None: ... - # tag and attrs are passed to the element_factory, so they could be anything - # depending on what the particular factory supports. - def start(self, tag: Any, attrs: dict[Any, Any], /) -> Element: ... - def end(self, tag: str, /) -> Element: ... - # These two methods have pos-only parameters in the C implementation - def comment(self, text: str | None, /) -> Element[Any]: ... - def pi(self, target: str, text: str | None = None, /) -> Element[Any]: ... - -class C14NWriterTarget: - def __init__( - self, - write: Callable[[str], object], - *, - with_comments: bool = False, - strip_text: bool = False, - rewrite_prefixes: bool = False, - qname_aware_tags: Iterable[str] | None = None, - qname_aware_attrs: Iterable[str] | None = None, - exclude_attrs: Iterable[str] | None = None, - exclude_tags: Iterable[str] | None = None, - ) -> None: ... - def data(self, data: str) -> None: ... - def start_ns(self, prefix: str, uri: str) -> None: ... - def start(self, tag: str, attrs: Mapping[str, str]) -> None: ... - def end(self, tag: str) -> None: ... - def comment(self, text: str) -> None: ... - def pi(self, target: str, data: str) -> None: ... - -# The target type is tricky, because the implementation doesn't -# require any particular attribute to be present. This documents the attributes -# that can be present, but uncommenting any of them would require them. -@type_check_only -class _Target(Protocol): - # start: Callable[str, dict[str, str], Any] | None - # end: Callable[[str], Any] | None - # start_ns: Callable[[str, str], Any] | None - # end_ns: Callable[[str], Any] | None - # data: Callable[[str], Any] | None - # comment: Callable[[str], Any] - # pi: Callable[[str, str], Any] | None - # close: Callable[[], Any] | None - ... - -_E = TypeVar("_E", default=Element) - -# This is generic because the return type of close() depends on the target. -# The default target is TreeBuilder, which returns Element. -# C14NWriterTarget does not implement a close method, so using it results -# in a type of XMLParser[None]. -@disjoint_base -class XMLParser(Generic[_E]): - parser: XMLParserType - target: _Target - # TODO: what is entity used for??? - entity: dict[str, str] - version: str - def __init__(self, *, target: _Target | None = None, encoding: str | None = None) -> None: ... - def close(self) -> _E: ... - def feed(self, data: str | ReadableBuffer, /) -> None: ... - def flush(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/cElementTree.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/cElementTree.vpi deleted file mode 100644 index 02272d80..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/etree/cElementTree.vpi +++ /dev/null @@ -1 +0,0 @@ -from xml.etree.ElementTree import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/__init__.vpi deleted file mode 100644 index cebdb6a3..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/__init__.vpi +++ /dev/null @@ -1 +0,0 @@ -from xml.parsers import expat as expat diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/__init__.vpi deleted file mode 100644 index d9b7ea53..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/__init__.vpi +++ /dev/null @@ -1,7 +0,0 @@ -from pyexpat import * - -# This is actually implemented in the C module pyexpat, but considers itself to live here. -class ExpatError(Exception): - code: int - lineno: int - offset: int diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/errors.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/errors.vpi deleted file mode 100644 index e22d769e..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/errors.vpi +++ /dev/null @@ -1 +0,0 @@ -from pyexpat.errors import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/model.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/model.vpi deleted file mode 100644 index d8f44b47..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/parsers/expat/model.vpi +++ /dev/null @@ -1 +0,0 @@ -from pyexpat.model import * diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/__init__.vpi deleted file mode 100644 index 9b5c3bf4..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/__init__.vpi +++ /dev/null @@ -1,42 +0,0 @@ -import sys -from _typeshed import ReadableBuffer, StrPath, SupportsRead, _T_co -from collections.abc import Iterable -from typing import Final, Protocol, TypeAlias, type_check_only -from xml.sax._exceptions import ( - SAXException as SAXException, - SAXNotRecognizedException as SAXNotRecognizedException, - SAXNotSupportedException as SAXNotSupportedException, - SAXParseException as SAXParseException, - SAXReaderNotAvailable as SAXReaderNotAvailable, -) -from xml.sax.handler import ContentHandler as ContentHandler, ErrorHandler as ErrorHandler -from xml.sax.xmlreader import InputSource as InputSource, XMLReader - -@type_check_only -class _SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]): - def close(self) -> None: ... - -_Source: TypeAlias = StrPath | _SupportsReadClose[bytes] | _SupportsReadClose[str] - -default_parser_list: Final[list[str]] - -def make_parser(parser_list: Iterable[str] = ()) -> XMLReader: ... -def parse(source: _Source, handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ... -def parseString(string: ReadableBuffer | str, handler: ContentHandler, errorHandler: ErrorHandler | None = ...) -> None: ... -def _create_parser(parser_name: str) -> XMLReader: ... - -if sys.version_info >= (3, 14): - __all__ = [ - "ContentHandler", - "ErrorHandler", - "InputSource", - "SAXException", - "SAXNotRecognizedException", - "SAXNotSupportedException", - "SAXParseException", - "SAXReaderNotAvailable", - "default_parser_list", - "make_parser", - "parse", - "parseString", - ] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/_exceptions.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/_exceptions.vpi deleted file mode 100644 index e9cc8856..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/_exceptions.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import NoReturn -from xml.sax.xmlreader import Locator - -class SAXException(Exception): - def __init__(self, msg: str, exception: Exception | None = None) -> None: ... - def getMessage(self) -> str: ... - def getException(self) -> Exception | None: ... - def __getitem__(self, ix: object) -> NoReturn: ... - -class SAXParseException(SAXException): - def __init__(self, msg: str, exception: Exception | None, locator: Locator) -> None: ... - def getColumnNumber(self) -> int | None: ... - def getLineNumber(self) -> int | None: ... - def getPublicId(self) -> str | None: ... - def getSystemId(self) -> str | None: ... - -class SAXNotRecognizedException(SAXException): ... -class SAXNotSupportedException(SAXException): ... -class SAXReaderNotAvailable(SAXNotSupportedException): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/expatreader.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/expatreader.vpi deleted file mode 100644 index e29853eb..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/expatreader.vpi +++ /dev/null @@ -1,72 +0,0 @@ -from _typeshed import ReadableBuffer -from collections.abc import Mapping -from typing import Any, Final, Literal, TypeAlias, overload -from xml.sax import _Source, xmlreader -from xml.sax.handler import LexicalHandler, _ContentHandlerProtocol - -_BoolType: TypeAlias = Literal[0, 1] | bool - -version: Final[str] -AttributesImpl = xmlreader.AttributesImpl -AttributesNSImpl = xmlreader.AttributesNSImpl - -class _ClosedParser: - ErrorColumnNumber: int - ErrorLineNumber: int - -class ExpatLocator(xmlreader.Locator): - def __init__(self, parser: ExpatParser) -> None: ... - def getColumnNumber(self) -> int | None: ... - def getLineNumber(self) -> int: ... - def getPublicId(self) -> str | None: ... - def getSystemId(self) -> str | None: ... - -class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator): - def __init__(self, namespaceHandling: _BoolType = 0, bufsize: int = 65516) -> None: ... - def parse(self, source: xmlreader.InputSource | _Source) -> None: ... - def prepareParser(self, source: xmlreader.InputSource) -> None: ... - def setContentHandler(self, handler: _ContentHandlerProtocol) -> None: ... - def getFeature(self, name: str) -> _BoolType: ... - def setFeature(self, name: str, state: _BoolType) -> None: ... - - @overload - def getProperty(self, name: Literal["http://xml.org/sax/properties/lexical-handler"]) -> LexicalHandler | None: ... - @overload - def getProperty(self, name: Literal["http://www.python.org/sax/properties/interning-dict"]) -> dict[str, Any] | None: ... - @overload - def getProperty(self, name: Literal["http://xml.org/sax/properties/xml-string"]) -> bytes | None: ... - @overload - def getProperty(self, name: str) -> object: ... - - @overload - def setProperty(self, name: Literal["http://xml.org/sax/properties/lexical-handler"], value: LexicalHandler) -> None: ... - @overload - def setProperty( - self, name: Literal["http://www.python.org/sax/properties/interning-dict"], value: dict[str, Any] - ) -> None: ... - @overload - def setProperty(self, name: str, value: object) -> None: ... - - def feed(self, data: str | ReadableBuffer, isFinal: bool = False) -> None: ... - def flush(self) -> None: ... - def close(self) -> None: ... - def reset(self) -> None: ... - def getColumnNumber(self) -> int | None: ... - def getLineNumber(self) -> int: ... - def getPublicId(self) -> str | None: ... - def getSystemId(self) -> str | None: ... - def start_element(self, name: str, attrs: Mapping[str, str]) -> None: ... - def end_element(self, name: str) -> None: ... - def start_element_ns(self, name: str, attrs: Mapping[str, str]) -> None: ... - def end_element_ns(self, name: str) -> None: ... - def processing_instruction(self, target: str, data: str) -> None: ... - def character_data(self, data: str) -> None: ... - def start_namespace_decl(self, prefix: str | None, uri: str) -> None: ... - def end_namespace_decl(self, prefix: str | None) -> None: ... - def start_doctype_decl(self, name: str, sysid: str | None, pubid: str | None, has_internal_subset: bool) -> None: ... - def unparsed_entity_decl(self, name: str, base: str | None, sysid: str, pubid: str | None, notation_name: str) -> None: ... - def notation_decl(self, name: str, base: str | None, sysid: str, pubid: str | None) -> None: ... - def external_entity_ref(self, context: str, base: str | None, sysid: str, pubid: str | None) -> int: ... - def skipped_entity_handler(self, name: str, is_pe: bool) -> None: ... - -def create_parser(namespaceHandling: int = 0, bufsize: int = 65516) -> ExpatParser: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/handler.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/handler.vpi deleted file mode 100644 index e1e080ac..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/handler.vpi +++ /dev/null @@ -1,84 +0,0 @@ -from typing import Final, NoReturn, Protocol, type_check_only -from xml.sax import xmlreader - -version: Final[str] - -@type_check_only -class _ErrorHandlerProtocol(Protocol): # noqa: Y046 # Protocol is not used - def error(self, exception: BaseException) -> NoReturn: ... - def fatalError(self, exception: BaseException) -> NoReturn: ... - def warning(self, exception: BaseException) -> None: ... - -class ErrorHandler: - def error(self, exception: BaseException) -> NoReturn: ... - def fatalError(self, exception: BaseException) -> NoReturn: ... - def warning(self, exception: BaseException) -> None: ... - -@type_check_only -class _ContentHandlerProtocol(Protocol): # noqa: Y046 # Protocol is not used - def setDocumentLocator(self, locator: xmlreader.Locator) -> None: ... - def startDocument(self) -> None: ... - def endDocument(self) -> None: ... - def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ... - def endPrefixMapping(self, prefix: str | None) -> None: ... - def startElement(self, name: str, attrs: xmlreader.AttributesImpl) -> None: ... - def endElement(self, name: str) -> None: ... - def startElementNS(self, name: tuple[str | None, str], qname: str | None, attrs: xmlreader.AttributesNSImpl) -> None: ... - def endElementNS(self, name: tuple[str | None, str], qname: str | None) -> None: ... - def characters(self, content: str) -> None: ... - def ignorableWhitespace(self, whitespace: str) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - def skippedEntity(self, name: str) -> None: ... - -class ContentHandler: - def setDocumentLocator(self, locator: xmlreader.Locator) -> None: ... - def startDocument(self) -> None: ... - def endDocument(self) -> None: ... - def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ... - def endPrefixMapping(self, prefix: str | None) -> None: ... - def startElement(self, name: str, attrs: xmlreader.AttributesImpl) -> None: ... - def endElement(self, name: str) -> None: ... - def startElementNS(self, name: tuple[str | None, str], qname: str | None, attrs: xmlreader.AttributesNSImpl) -> None: ... - def endElementNS(self, name: tuple[str | None, str], qname: str | None) -> None: ... - def characters(self, content: str) -> None: ... - def ignorableWhitespace(self, whitespace: str) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - def skippedEntity(self, name: str) -> None: ... - -@type_check_only -class _DTDHandlerProtocol(Protocol): # noqa: Y046 # Protocol is not used - def notationDecl(self, name: str, publicId: str | None, systemId: str) -> None: ... - def unparsedEntityDecl(self, name: str, publicId: str | None, systemId: str, ndata: str) -> None: ... - -class DTDHandler: - def notationDecl(self, name: str, publicId: str | None, systemId: str) -> None: ... - def unparsedEntityDecl(self, name: str, publicId: str | None, systemId: str, ndata: str) -> None: ... - -@type_check_only -class _EntityResolverProtocol(Protocol): # noqa: Y046 # Protocol is not used - def resolveEntity(self, publicId: str | None, systemId: str) -> str: ... - -class EntityResolver: - def resolveEntity(self, publicId: str | None, systemId: str) -> str: ... - -feature_namespaces: Final = "http://xml.org/sax/features/namespaces" -feature_namespace_prefixes: Final = "http://xml.org/sax/features/namespace-prefixes" -feature_string_interning: Final = "http://xml.org/sax/features/string-interning" -feature_validation: Final = "http://xml.org/sax/features/validation" -feature_external_ges: Final[str] # too long string -feature_external_pes: Final[str] # too long string -all_features: Final[list[str]] -property_lexical_handler: Final = "http://xml.org/sax/properties/lexical-handler" -property_declaration_handler: Final = "http://xml.org/sax/properties/declaration-handler" -property_dom_node: Final = "http://xml.org/sax/properties/dom-node" -property_xml_string: Final = "http://xml.org/sax/properties/xml-string" -property_encoding: Final = "http://www.python.org/sax/properties/encoding" -property_interning_dict: Final[str] # too long string -all_properties: Final[list[str]] - -class LexicalHandler: - def comment(self, content: str) -> None: ... - def startDTD(self, name: str, public_id: str | None, system_id: str | None) -> None: ... - def endDTD(self) -> None: ... - def startCDATA(self) -> None: ... - def endCDATA(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/saxutils.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/saxutils.vpi deleted file mode 100644 index a29588fa..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/saxutils.vpi +++ /dev/null @@ -1,68 +0,0 @@ -from _typeshed import SupportsWrite -from codecs import StreamReaderWriter, StreamWriter -from collections.abc import Mapping -from io import RawIOBase, TextIOBase -from typing import Literal, NoReturn -from xml.sax import _Source, handler, xmlreader - -def escape(data: str, entities: Mapping[str, str] = {}) -> str: ... -def unescape(data: str, entities: Mapping[str, str] = {}) -> str: ... -def quoteattr(data: str, entities: Mapping[str, str] = {}) -> str: ... - -class XMLGenerator(handler.ContentHandler): - def __init__( - self, - out: TextIOBase | RawIOBase | StreamWriter | StreamReaderWriter | SupportsWrite[bytes] | None = None, - encoding: str = "iso-8859-1", - short_empty_elements: bool = False, - ) -> None: ... - def _qname(self, name: tuple[str | None, str]) -> str: ... - def startDocument(self) -> None: ... - def endDocument(self) -> None: ... - def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ... - def endPrefixMapping(self, prefix: str | None) -> None: ... - def startElement(self, name: str, attrs: xmlreader.AttributesImpl) -> None: ... - def endElement(self, name: str) -> None: ... - def startElementNS(self, name: tuple[str | None, str], qname: str | None, attrs: xmlreader.AttributesNSImpl) -> None: ... - def endElementNS(self, name: tuple[str | None, str], qname: str | None) -> None: ... - def characters(self, content: str) -> None: ... - def ignorableWhitespace(self, content: str) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - -class XMLFilterBase(xmlreader.XMLReader): - def __init__(self, parent: xmlreader.XMLReader | None = None) -> None: ... - # ErrorHandler methods - def error(self, exception: BaseException) -> NoReturn: ... - def fatalError(self, exception: BaseException) -> NoReturn: ... - def warning(self, exception: BaseException) -> None: ... - # ContentHandler methods - def setDocumentLocator(self, locator: xmlreader.Locator) -> None: ... - def startDocument(self) -> None: ... - def endDocument(self) -> None: ... - def startPrefixMapping(self, prefix: str | None, uri: str) -> None: ... - def endPrefixMapping(self, prefix: str | None) -> None: ... - def startElement(self, name: str, attrs: xmlreader.AttributesImpl) -> None: ... - def endElement(self, name: str) -> None: ... - def startElementNS(self, name: tuple[str | None, str], qname: str | None, attrs: xmlreader.AttributesNSImpl) -> None: ... - def endElementNS(self, name: tuple[str | None, str], qname: str | None) -> None: ... - def characters(self, content: str) -> None: ... - def ignorableWhitespace(self, chars: str) -> None: ... - def processingInstruction(self, target: str, data: str) -> None: ... - def skippedEntity(self, name: str) -> None: ... - # DTDHandler methods - def notationDecl(self, name: str, publicId: str | None, systemId: str) -> None: ... - def unparsedEntityDecl(self, name: str, publicId: str | None, systemId: str, ndata: str) -> None: ... - # EntityResolver methods - def resolveEntity(self, publicId: str | None, systemId: str) -> str: ... - # XMLReader methods - def parse(self, source: xmlreader.InputSource | _Source) -> None: ... - def setLocale(self, locale: str) -> None: ... - def getFeature(self, name: str) -> Literal[1, 0] | bool: ... - def setFeature(self, name: str, state: Literal[1, 0] | bool) -> None: ... - def getProperty(self, name: str) -> object: ... - def setProperty(self, name: str, value: object) -> None: ... - # XMLFilter methods - def getParent(self) -> xmlreader.XMLReader | None: ... - def setParent(self, parent: xmlreader.XMLReader) -> None: ... - -def prepare_input_source(source: xmlreader.InputSource | _Source, base: str = "") -> xmlreader.InputSource: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/xmlreader.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/xmlreader.vpi deleted file mode 100644 index a7ae5edc..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/sax/xmlreader.vpi +++ /dev/null @@ -1,94 +0,0 @@ -from _typeshed import ReadableBuffer -from collections.abc import Mapping -from typing import Generic, Literal, TypeAlias, TypeVar, overload -from typing_extensions import Self -from xml.sax import _Source, _SupportsReadClose -from xml.sax.handler import _ContentHandlerProtocol, _DTDHandlerProtocol, _EntityResolverProtocol, _ErrorHandlerProtocol - -class XMLReader: - def parse(self, source: InputSource | _Source) -> None: ... - def getContentHandler(self) -> _ContentHandlerProtocol: ... - def setContentHandler(self, handler: _ContentHandlerProtocol) -> None: ... - def getDTDHandler(self) -> _DTDHandlerProtocol: ... - def setDTDHandler(self, handler: _DTDHandlerProtocol) -> None: ... - def getEntityResolver(self) -> _EntityResolverProtocol: ... - def setEntityResolver(self, resolver: _EntityResolverProtocol) -> None: ... - def getErrorHandler(self) -> _ErrorHandlerProtocol: ... - def setErrorHandler(self, handler: _ErrorHandlerProtocol) -> None: ... - def setLocale(self, locale: str) -> None: ... - def getFeature(self, name: str) -> Literal[0, 1] | bool: ... - def setFeature(self, name: str, state: Literal[0, 1] | bool) -> None: ... - def getProperty(self, name: str) -> object: ... - def setProperty(self, name: str, value: object) -> None: ... - -class IncrementalParser(XMLReader): - def __init__(self, bufsize: int = 65536) -> None: ... - def parse(self, source: InputSource | _Source) -> None: ... - def feed(self, data: str | ReadableBuffer) -> None: ... - def prepareParser(self, source: InputSource) -> None: ... - def close(self) -> None: ... - def reset(self) -> None: ... - -class Locator: - def getColumnNumber(self) -> int | None: ... - def getLineNumber(self) -> int | None: ... - def getPublicId(self) -> str | None: ... - def getSystemId(self) -> str | None: ... - -class InputSource: - def __init__(self, system_id: str | None = None) -> None: ... - def setPublicId(self, public_id: str | None) -> None: ... - def getPublicId(self) -> str | None: ... - def setSystemId(self, system_id: str | None) -> None: ... - def getSystemId(self) -> str | None: ... - def setEncoding(self, encoding: str | None) -> None: ... - def getEncoding(self) -> str | None: ... - def setByteStream(self, bytefile: _SupportsReadClose[bytes] | None) -> None: ... - def getByteStream(self) -> _SupportsReadClose[bytes] | None: ... - def setCharacterStream(self, charfile: _SupportsReadClose[str] | None) -> None: ... - def getCharacterStream(self) -> _SupportsReadClose[str] | None: ... - -_AttrKey = TypeVar("_AttrKey", default=str) - -class AttributesImpl(Generic[_AttrKey]): - def __init__(self, attrs: Mapping[_AttrKey, str]) -> None: ... - def getLength(self) -> int: ... - def getType(self, name: str) -> str: ... - def getValue(self, name: _AttrKey) -> str: ... - def getValueByQName(self, name: str) -> str: ... - def getNameByQName(self, name: str) -> _AttrKey: ... - def getQNameByName(self, name: _AttrKey) -> str: ... - def getNames(self) -> list[_AttrKey]: ... - def getQNames(self) -> list[str]: ... - def __len__(self) -> int: ... - def __getitem__(self, name: _AttrKey) -> str: ... - def keys(self) -> list[_AttrKey]: ... - def __contains__(self, name: _AttrKey) -> bool: ... - - @overload - def get(self, name: _AttrKey, alternative: None = None) -> str | None: ... - @overload - def get(self, name: _AttrKey, alternative: str) -> str: ... - - def copy(self) -> Self: ... - def items(self) -> list[tuple[_AttrKey, str]]: ... - def values(self) -> list[str]: ... - -_NSName: TypeAlias = tuple[str | None, str] - -class AttributesNSImpl(AttributesImpl[_NSName]): - def __init__(self, attrs: Mapping[_NSName, str], qnames: Mapping[_NSName, str]) -> None: ... - def getValue(self, name: _NSName) -> str: ... - def getNameByQName(self, name: str) -> _NSName: ... - def getQNameByName(self, name: _NSName) -> str: ... - def getNames(self) -> list[_NSName]: ... - def __getitem__(self, name: _NSName) -> str: ... - def keys(self) -> list[_NSName]: ... - def __contains__(self, name: _NSName) -> bool: ... - - @overload - def get(self, name: _NSName, alternative: None = None) -> str | None: ... - @overload - def get(self, name: _NSName, alternative: str) -> str: ... - - def items(self) -> list[tuple[_NSName, str]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/utils.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xml/utils.vpi deleted file mode 100644 index 1c3bb877..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xml/utils.vpi +++ /dev/null @@ -1,2 +0,0 @@ -def is_valid_name(name: str) -> bool: ... -def is_valid_text(data: str) -> bool: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/__init__.vpi deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/client.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/client.vpi deleted file mode 100644 index 573401f1..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/client.vpi +++ /dev/null @@ -1,300 +0,0 @@ -import gzip -import http.client -import time -from _typeshed import ReadableBuffer, SizedBuffer, SupportsRead, SupportsWrite -from collections.abc import Callable, Iterable, Mapping -from datetime import datetime -from io import BytesIO -from types import TracebackType -from typing import Any, ClassVar, Final, Literal, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self - -@type_check_only -class _SupportsTimeTuple(Protocol): - def timetuple(self) -> time.struct_time: ... - -_DateTimeComparable: TypeAlias = DateTime | datetime | str | _SupportsTimeTuple -_Marshallable: TypeAlias = ( - bool - | int - | float - | str - | bytes - | bytearray - | None - | tuple[_Marshallable, ...] - # Ideally we'd use _Marshallable for list and dict, but invariance makes that impractical - | list[Any] - | dict[str, Any] - | datetime - | DateTime - | Binary -) -_XMLDate: TypeAlias = int | datetime | tuple[int, ...] | time.struct_time -_HostType: TypeAlias = tuple[str, dict[str, str]] | str - -def escape(s: str) -> str: ... # undocumented - -MAXINT: Final[int] # undocumented -MININT: Final[int] # undocumented - -PARSE_ERROR: Final[int] # undocumented -SERVER_ERROR: Final[int] # undocumented -APPLICATION_ERROR: Final[int] # undocumented -SYSTEM_ERROR: Final[int] # undocumented -TRANSPORT_ERROR: Final[int] # undocumented - -NOT_WELLFORMED_ERROR: Final[int] # undocumented -UNSUPPORTED_ENCODING: Final[int] # undocumented -INVALID_ENCODING_CHAR: Final[int] # undocumented -INVALID_XMLRPC: Final[int] # undocumented -METHOD_NOT_FOUND: Final[int] # undocumented -INVALID_METHOD_PARAMS: Final[int] # undocumented -INTERNAL_ERROR: Final[int] # undocumented - -class Error(Exception): ... - -class ProtocolError(Error): - url: str - errcode: int - errmsg: str - headers: dict[str, str] - def __init__(self, url: str, errcode: int, errmsg: str, headers: dict[str, str]) -> None: ... - -class ResponseError(Error): ... - -class Fault(Error): - faultCode: int - faultString: str - def __init__(self, faultCode: int, faultString: str, **extra: Any) -> None: ... - -boolean = bool -Boolean = bool - -def _iso8601_format(value: datetime) -> str: ... # undocumented -def _strftime(value: _XMLDate) -> str: ... # undocumented - -class DateTime: - value: str # undocumented - def __init__(self, value: int | str | datetime | time.struct_time | tuple[int, ...] = 0) -> None: ... - __hash__: ClassVar[None] # type: ignore[assignment] - def __lt__(self, other: _DateTimeComparable) -> bool: ... - def __le__(self, other: _DateTimeComparable) -> bool: ... - def __gt__(self, other: _DateTimeComparable) -> bool: ... - def __ge__(self, other: _DateTimeComparable) -> bool: ... - def __eq__(self, other: _DateTimeComparable) -> bool: ... # type: ignore[override] - def make_comparable(self, other: _DateTimeComparable) -> tuple[str, str]: ... # undocumented - def timetuple(self) -> time.struct_time: ... # undocumented - def decode(self, data: Any) -> None: ... - def encode(self, out: SupportsWrite[str]) -> None: ... - -def _datetime(data: Any) -> DateTime: ... # undocumented -def _datetime_type(data: str) -> datetime: ... # undocumented - -class Binary: - data: bytes - def __init__(self, data: bytes | bytearray | None = None) -> None: ... - def decode(self, data: ReadableBuffer) -> None: ... - def encode(self, out: SupportsWrite[str]) -> None: ... - def __eq__(self, other: object) -> bool: ... - __hash__: ClassVar[None] # type: ignore[assignment] - -def _binary(data: ReadableBuffer) -> Binary: ... # undocumented - -WRAPPERS: Final[tuple[type[DateTime], type[Binary]]] # undocumented - -class ExpatParser: # undocumented - def __init__(self, target: Unmarshaller) -> None: ... - def feed(self, data: str | ReadableBuffer) -> None: ... - def close(self) -> None: ... - -_WriteCallback: TypeAlias = Callable[[str], object] - -class Marshaller: - dispatch: dict[type[_Marshallable] | Literal["_arbitrary_instance"], Callable[[Marshaller, Any, _WriteCallback], None]] - memo: dict[Any, None] - data: None - encoding: str | None - allow_none: bool - def __init__(self, encoding: str | None = None, allow_none: bool = False) -> None: ... - def dumps(self, values: Fault | Iterable[_Marshallable]) -> str: ... - def __dump(self, value: _Marshallable, write: _WriteCallback) -> None: ... # undocumented - def dump_nil(self, value: None, write: _WriteCallback) -> None: ... - def dump_bool(self, value: bool, write: _WriteCallback) -> None: ... - def dump_long(self, value: int, write: _WriteCallback) -> None: ... - def dump_int(self, value: int, write: _WriteCallback) -> None: ... - def dump_double(self, value: float, write: _WriteCallback) -> None: ... - def dump_unicode(self, value: str, write: _WriteCallback, escape: Callable[[str], str] = ...) -> None: ... - def dump_bytes(self, value: ReadableBuffer, write: _WriteCallback) -> None: ... - def dump_array(self, value: Iterable[_Marshallable], write: _WriteCallback) -> None: ... - def dump_struct( - self, value: Mapping[str, _Marshallable], write: _WriteCallback, escape: Callable[[str], str] = ... - ) -> None: ... - def dump_datetime(self, value: _XMLDate, write: _WriteCallback) -> None: ... - def dump_instance(self, value: object, write: _WriteCallback) -> None: ... - -class Unmarshaller: - dispatch: dict[str, Callable[[Unmarshaller, str], None]] - - _type: str | None - _stack: list[_Marshallable] - _marks: list[int] - _data: list[str] - _value: bool - _methodname: str | None - _encoding: str - append: Callable[[Any], None] - _use_datetime: bool - _use_builtin_types: bool - def __init__(self, use_datetime: bool = False, use_builtin_types: bool = False) -> None: ... - def close(self) -> tuple[_Marshallable, ...]: ... - def getmethodname(self) -> str | None: ... - def xml(self, encoding: str, standalone: Any) -> None: ... # Standalone is ignored - def start(self, tag: str, attrs: dict[str, str]) -> None: ... - def data(self, text: str) -> None: ... - def end(self, tag: str) -> None: ... - def end_dispatch(self, tag: str, data: str) -> None: ... - def end_nil(self, data: str) -> None: ... - def end_boolean(self, data: str) -> None: ... - def end_int(self, data: str) -> None: ... - def end_double(self, data: str) -> None: ... - def end_bigdecimal(self, data: str) -> None: ... - def end_string(self, data: str) -> None: ... - def end_array(self, data: str) -> None: ... - def end_struct(self, data: str) -> None: ... - def end_base64(self, data: str) -> None: ... - def end_dateTime(self, data: str) -> None: ... - def end_value(self, data: str) -> None: ... - def end_params(self, data: str) -> None: ... - def end_fault(self, data: str) -> None: ... - def end_methodName(self, data: str) -> None: ... - -class _MultiCallMethod: # undocumented - __call_list: list[tuple[str, tuple[_Marshallable, ...]]] - __name: str - def __init__(self, call_list: list[tuple[str, _Marshallable]], name: str) -> None: ... - def __getattr__(self, name: str) -> _MultiCallMethod: ... - def __call__(self, *args: _Marshallable) -> None: ... - -class MultiCallIterator: # undocumented - results: list[list[_Marshallable]] - def __init__(self, results: list[list[_Marshallable]]) -> None: ... - def __getitem__(self, i: int) -> _Marshallable: ... - -class MultiCall: - __server: ServerProxy - __call_list: list[tuple[str, tuple[_Marshallable, ...]]] - def __init__(self, server: ServerProxy) -> None: ... - def __getattr__(self, name: str) -> _MultiCallMethod: ... - def __call__(self) -> MultiCallIterator: ... - -# A little white lie -FastMarshaller: Marshaller | None -FastParser: ExpatParser | None -FastUnmarshaller: Unmarshaller | None - -def getparser(use_datetime: bool = False, use_builtin_types: bool = False) -> tuple[ExpatParser, Unmarshaller]: ... -def dumps( - params: Fault | tuple[_Marshallable, ...], - methodname: str | None = None, - methodresponse: bool | None = None, - encoding: str | None = None, - allow_none: bool = False, -) -> str: ... -def loads( - data: str | ReadableBuffer, use_datetime: bool = False, use_builtin_types: bool = False -) -> tuple[tuple[_Marshallable, ...], str | None]: ... -def gzip_encode(data: ReadableBuffer) -> bytes: ... # undocumented -def gzip_decode(data: ReadableBuffer, max_decode: int = 20971520) -> bytes: ... # undocumented - -class GzipDecodedResponse(gzip.GzipFile): # undocumented - io: BytesIO - def __init__(self, response: SupportsRead[ReadableBuffer]) -> None: ... - -class _Method: # undocumented - __send: Callable[[str, tuple[_Marshallable, ...]], _Marshallable] - __name: str - def __init__(self, send: Callable[[str, tuple[_Marshallable, ...]], _Marshallable], name: str) -> None: ... - def __getattr__(self, name: str) -> _Method: ... - def __call__(self, *args: _Marshallable) -> _Marshallable: ... - -class Transport: - user_agent: str - accept_gzip_encoding: bool - encode_threshold: int | None - - _use_datetime: bool - _use_builtin_types: bool - _connection: tuple[_HostType | None, http.client.HTTPConnection | None] - _headers: list[tuple[str, str]] - _extra_headers: list[tuple[str, str]] - - def __init__( - self, use_datetime: bool = False, use_builtin_types: bool = False, *, headers: Iterable[tuple[str, str]] = () - ) -> None: ... - def request( - self, host: _HostType, handler: str, request_body: SizedBuffer, verbose: bool = False - ) -> tuple[_Marshallable, ...]: ... - def single_request( - self, host: _HostType, handler: str, request_body: SizedBuffer, verbose: bool = False - ) -> tuple[_Marshallable, ...]: ... - def getparser(self) -> tuple[ExpatParser, Unmarshaller]: ... - def get_host_info(self, host: _HostType) -> tuple[str, list[tuple[str, str]], dict[str, str]]: ... - def make_connection(self, host: _HostType) -> http.client.HTTPConnection: ... - def close(self) -> None: ... - def send_request( - self, host: _HostType, handler: str, request_body: SizedBuffer, debug: bool - ) -> http.client.HTTPConnection: ... - def send_headers(self, connection: http.client.HTTPConnection, headers: list[tuple[str, str]]) -> None: ... - def send_content(self, connection: http.client.HTTPConnection, request_body: SizedBuffer) -> None: ... - def parse_response(self, response: http.client.HTTPResponse) -> tuple[_Marshallable, ...]: ... - -class SafeTransport(Transport): - def __init__( - self, - use_datetime: bool = False, - use_builtin_types: bool = False, - *, - headers: Iterable[tuple[str, str]] = (), - context: Any | None = None, - ) -> None: ... - def make_connection(self, host: _HostType) -> http.client.HTTPSConnection: ... - -class ServerProxy: - __host: str - __handler: str - __transport: Transport - __encoding: str - __verbose: bool - __allow_none: bool - - def __init__( - self, - uri: str, - transport: Transport | None = None, - encoding: str | None = None, - verbose: bool = False, - allow_none: bool = False, - use_datetime: bool = False, - use_builtin_types: bool = False, - *, - headers: Iterable[tuple[str, str]] = (), - context: Any | None = None, - ) -> None: ... - def __getattr__(self, name: str) -> _Method: ... - - @overload - def __call__(self, attr: Literal["close"]) -> Callable[[], None]: ... - @overload - def __call__(self, attr: Literal["transport"]) -> Transport: ... - @overload - def __call__(self, attr: str) -> Callable[[], None] | Transport: ... - - def __enter__(self) -> Self: ... - def __exit__( - self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None - ) -> None: ... - def __close(self) -> None: ... # undocumented - def __request(self, methodname: str, params: tuple[_Marshallable, ...]) -> tuple[_Marshallable, ...]: ... # undocumented - -Server = ServerProxy diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/server.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/server.vpi deleted file mode 100644 index 7bf397d2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xmlrpc/server.vpi +++ /dev/null @@ -1,149 +0,0 @@ -import http.server -import pydoc -import socketserver -from _typeshed import ReadableBuffer -from collections.abc import Callable, Iterable, Mapping -from re import Pattern -from typing import Any, ClassVar, Protocol, TypeAlias, type_check_only -from xmlrpc.client import Fault, _Marshallable - -# The dispatch accepts anywhere from 0 to N arguments, no easy way to allow this in mypy -@type_check_only -class _DispatchArity0(Protocol): - def __call__(self) -> _Marshallable: ... - -@type_check_only -class _DispatchArity1(Protocol): - def __call__(self, arg1: _Marshallable, /) -> _Marshallable: ... - -@type_check_only -class _DispatchArity2(Protocol): - def __call__(self, arg1: _Marshallable, arg2: _Marshallable, /) -> _Marshallable: ... - -@type_check_only -class _DispatchArity3(Protocol): - def __call__(self, arg1: _Marshallable, arg2: _Marshallable, arg3: _Marshallable, /) -> _Marshallable: ... - -@type_check_only -class _DispatchArity4(Protocol): - def __call__( - self, arg1: _Marshallable, arg2: _Marshallable, arg3: _Marshallable, arg4: _Marshallable, / - ) -> _Marshallable: ... - -@type_check_only -class _DispatchArityN(Protocol): - def __call__(self, *args: _Marshallable) -> _Marshallable: ... - -_DispatchProtocol: TypeAlias = ( - _DispatchArity0 | _DispatchArity1 | _DispatchArity2 | _DispatchArity3 | _DispatchArity4 | _DispatchArityN -) - -def resolve_dotted_attribute(obj: Any, attr: str, allow_dotted_names: bool = True) -> Any: ... # undocumented -def list_public_methods(obj: Any) -> list[str]: ... # undocumented - -class SimpleXMLRPCDispatcher: # undocumented - funcs: dict[str, _DispatchProtocol] - instance: Any | None - allow_none: bool - encoding: str - use_builtin_types: bool - def __init__(self, allow_none: bool = False, encoding: str | None = None, use_builtin_types: bool = False) -> None: ... - def register_instance(self, instance: Any, allow_dotted_names: bool = False) -> None: ... - def register_function(self, function: _DispatchProtocol | None = None, name: str | None = None) -> Callable[..., Any]: ... - def register_introspection_functions(self) -> None: ... - def register_multicall_functions(self) -> None: ... - def _marshaled_dispatch( - self, - data: str | ReadableBuffer, - dispatch_method: Callable[[str, tuple[_Marshallable, ...]], Fault | tuple[_Marshallable, ...]] | None = None, - path: Any | None = None, - ) -> str: ... # undocumented - def system_listMethods(self) -> list[str]: ... # undocumented - def system_methodSignature(self, method_name: str) -> str: ... # undocumented - def system_methodHelp(self, method_name: str) -> str: ... # undocumented - def system_multicall(self, call_list: list[dict[str, _Marshallable]]) -> list[_Marshallable]: ... # undocumented - def _dispatch(self, method: str, params: Iterable[_Marshallable]) -> _Marshallable: ... # undocumented - -class SimpleXMLRPCRequestHandler(http.server.BaseHTTPRequestHandler): - rpc_paths: ClassVar[tuple[str, ...]] - encode_threshold: int # undocumented - aepattern: Pattern[str] # undocumented - def accept_encodings(self) -> dict[str, float]: ... - def is_rpc_path_valid(self) -> bool: ... - def do_POST(self) -> None: ... - def decode_request_content(self, data: bytes) -> bytes | None: ... - def report_404(self) -> None: ... - -class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher): - _send_traceback_handler: bool - def __init__( - self, - addr: tuple[str, int], - requestHandler: type[SimpleXMLRPCRequestHandler] = ..., - logRequests: bool = True, - allow_none: bool = False, - encoding: str | None = None, - bind_and_activate: bool = True, - use_builtin_types: bool = False, - ) -> None: ... - -class MultiPathXMLRPCServer(SimpleXMLRPCServer): # undocumented - dispatchers: dict[str, SimpleXMLRPCDispatcher] - def __init__( - self, - addr: tuple[str, int], - requestHandler: type[SimpleXMLRPCRequestHandler] = ..., - logRequests: bool = True, - allow_none: bool = False, - encoding: str | None = None, - bind_and_activate: bool = True, - use_builtin_types: bool = False, - ) -> None: ... - def add_dispatcher(self, path: str, dispatcher: SimpleXMLRPCDispatcher) -> SimpleXMLRPCDispatcher: ... - def get_dispatcher(self, path: str) -> SimpleXMLRPCDispatcher: ... - -class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher): - def __init__(self, allow_none: bool = False, encoding: str | None = None, use_builtin_types: bool = False) -> None: ... - def handle_xmlrpc(self, request_text: str) -> None: ... - def handle_get(self) -> None: ... - def handle_request(self, request_text: str | None = None) -> None: ... - -class ServerHTMLDoc(pydoc.HTMLDoc): # undocumented - def docroutine( # type: ignore[override] - self, - object: object, - name: str, - mod: str | None = None, - funcs: Mapping[str, str] = {}, - classes: Mapping[str, str] = {}, - methods: Mapping[str, str] = {}, - cl: type | None = None, - ) -> str: ... - def docserver(self, server_name: str, package_documentation: str, methods: dict[str, str]) -> str: ... - -class XMLRPCDocGenerator: # undocumented - server_name: str - server_documentation: str - server_title: str - def set_server_title(self, server_title: str) -> None: ... - def set_server_name(self, server_name: str) -> None: ... - def set_server_documentation(self, server_documentation: str) -> None: ... - def generate_html_documentation(self) -> str: ... - -class DocXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): - def do_GET(self) -> None: ... - -class DocXMLRPCServer(SimpleXMLRPCServer, XMLRPCDocGenerator): - def __init__( - self, - addr: tuple[str, int], - requestHandler: type[SimpleXMLRPCRequestHandler] = ..., - logRequests: bool = True, - allow_none: bool = False, - encoding: str | None = None, - bind_and_activate: bool = True, - use_builtin_types: bool = False, - ) -> None: ... - -class DocCGIXMLRPCRequestHandler(CGIXMLRPCRequestHandler, XMLRPCDocGenerator): - def __init__(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/xxlimited.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/xxlimited.vpi deleted file mode 100644 index 503caf01..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/xxlimited.vpi +++ /dev/null @@ -1,15 +0,0 @@ -import sys -from typing import Any, final - -class Str(str): ... - -@final -class Xxo: - def demo(self) -> None: ... - if sys.version_info >= (3, 11) and sys.platform != "win32": - x_exports: int - -def foo(i: int, j: int, /) -> Any: ... -def new() -> Xxo: ... - -class Error(Exception): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zipapp.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zipapp.vpi deleted file mode 100644 index 48713bce..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zipapp.vpi +++ /dev/null @@ -1,19 +0,0 @@ -from collections.abc import Callable -from pathlib import Path -from typing import BinaryIO, TypeAlias - -__all__ = ["ZipAppError", "create_archive", "get_interpreter"] - -_Path: TypeAlias = str | Path | BinaryIO - -class ZipAppError(ValueError): ... - -def create_archive( - source: _Path, - target: _Path | None = None, - interpreter: str | None = None, - main: str | None = None, - filter: Callable[[Path], bool] | None = None, - compressed: bool = False, -) -> None: ... -def get_interpreter(archive: _Path) -> str: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/__init__.vpi deleted file mode 100644 index 0039a05b..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/__init__.vpi +++ /dev/null @@ -1,411 +0,0 @@ -import io -import sys -from _typeshed import SizedBuffer, StrOrBytesPath, StrPath -from collections.abc import Callable, Iterable, Iterator -from io import TextIOWrapper -from os import PathLike -from types import TracebackType -from typing import IO, Final, Literal, Protocol, TypeAlias, overload, type_check_only -from typing_extensions import Self - -__all__ = [ - "BadZipFile", - "BadZipfile", - "Path", - "error", - "ZIP_STORED", - "ZIP_DEFLATED", - "ZIP_BZIP2", - "ZIP_LZMA", - "is_zipfile", - "ZipInfo", - "ZipFile", - "PyZipFile", - "LargeZipFile", -] - -if sys.version_info >= (3, 14): - __all__ += ["ZIP_ZSTANDARD"] - -# TODO: use TypeAlias for these two when mypy bugs are fixed -# https://github.com/python/mypy/issues/16581 -_DateTuple = tuple[int, int, int, int, int, int] # noqa: Y026 -_ZipFileMode = Literal["r", "w", "x", "a"] # noqa: Y026 - -_ReadWriteMode: TypeAlias = Literal["r", "w"] - -class BadZipFile(Exception): ... - -BadZipfile = BadZipFile -error = BadZipfile - -class LargeZipFile(Exception): ... - -@type_check_only -class _ZipStream(Protocol): - def read(self, n: int, /) -> bytes: ... - # The following methods are optional: - # def seekable(self) -> bool: ... - # def tell(self) -> int: ... - # def seek(self, n: int, /) -> object: ... - -# Stream shape as required by _EndRecData() and _EndRecData64(). -@type_check_only -class _SupportsReadSeekTell(Protocol): - def read(self, n: int = ..., /) -> bytes: ... - def seek(self, cookie: int, whence: int, /) -> object: ... - def tell(self) -> int: ... - -@type_check_only -class _ClosableZipStream(_ZipStream, Protocol): - def close(self) -> object: ... - -class ZipExtFile(io.BufferedIOBase): - MAX_N: int - MIN_READ_SIZE: int - MAX_SEEK_READ: int - newlines: list[bytes] | None - mode: _ReadWriteMode - name: str - - @overload - def __init__( - self, fileobj: _ClosableZipStream, mode: _ReadWriteMode, zipinfo: ZipInfo, pwd: bytes | None, close_fileobj: Literal[True] - ) -> None: ... - @overload - def __init__( - self, - fileobj: _ClosableZipStream, - mode: _ReadWriteMode, - zipinfo: ZipInfo, - pwd: bytes | None = None, - *, - close_fileobj: Literal[True], - ) -> None: ... - @overload - def __init__( - self, - fileobj: _ZipStream, - mode: _ReadWriteMode, - zipinfo: ZipInfo, - pwd: bytes | None = None, - close_fileobj: Literal[False] = False, - ) -> None: ... - - def read(self, n: int | None = -1) -> bytes: ... - def readline(self, limit: int = -1) -> bytes: ... # type: ignore[override] - def peek(self, n: int = 1) -> bytes: ... - def read1(self, n: int | None) -> bytes: ... # type: ignore[override] - def seek(self, offset: int, whence: int = 0) -> int: ... - -@type_check_only -class _Writer(Protocol): - def write(self, s: str, /) -> object: ... - -@type_check_only -class _ZipReadable(Protocol): - def seek(self, offset: int, whence: int = 0, /) -> int: ... - def read(self, n: int = -1, /) -> bytes: ... - -@type_check_only -class _ZipTellable(Protocol): - def tell(self) -> int: ... - -@type_check_only -class _ZipReadableTellable(_ZipReadable, _ZipTellable, Protocol): ... - -@type_check_only -class _ZipWritable(Protocol): - def flush(self) -> None: ... - def close(self) -> None: ... - def write(self, b: bytes, /) -> int: ... - -class ZipFile: - filename: str | None - debug: int - comment: bytes - filelist: list[ZipInfo] - fp: IO[bytes] | None - NameToInfo: dict[str, ZipInfo] - start_dir: int # undocumented - compression: int # undocumented - compresslevel: int | None # undocumented - mode: _ZipFileMode # undocumented - pwd: bytes | None # undocumented - # metadata_encoding is new in 3.11 - if sys.version_info >= (3, 11): - @overload - def __init__( - self, - file: StrPath | IO[bytes], - mode: _ZipFileMode = "r", - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - metadata_encoding: str | None = None, - ) -> None: ... - # metadata_encoding is only allowed for read mode - @overload - def __init__( - self, - file: StrPath | _ZipReadable, - mode: Literal["r"] = "r", - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - metadata_encoding: str | None = None, - ) -> None: ... - @overload - def __init__( - self, - file: StrPath | _ZipWritable, - mode: Literal["w", "x"], - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - metadata_encoding: None = None, - ) -> None: ... - @overload - def __init__( - self, - file: StrPath | _ZipReadableTellable, - mode: Literal["a"], - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - metadata_encoding: None = None, - ) -> None: ... - else: - @overload - def __init__( - self, - file: StrPath | IO[bytes], - mode: _ZipFileMode = "r", - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - ) -> None: ... - @overload - def __init__( - self, - file: StrPath | _ZipReadable, - mode: Literal["r"] = "r", - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - ) -> None: ... - @overload - def __init__( - self, - file: StrPath | _ZipWritable, - mode: Literal["w", "x"], - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - ) -> None: ... - @overload - def __init__( - self, - file: StrPath | _ZipReadableTellable, - mode: Literal["a"], - compression: int = 0, - allowZip64: bool = True, - compresslevel: int | None = None, - *, - strict_timestamps: bool = True, - ) -> None: ... - - def __enter__(self) -> Self: ... - def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None - ) -> None: ... - def close(self) -> None: ... - def getinfo(self, name: str) -> ZipInfo: ... - def infolist(self) -> list[ZipInfo]: ... - def namelist(self) -> list[str]: ... - def open( - self, name: str | ZipInfo, mode: _ReadWriteMode = "r", pwd: bytes | None = None, *, force_zip64: bool = False - ) -> IO[bytes]: ... - def extract(self, member: str | ZipInfo, path: StrPath | None = None, pwd: bytes | None = None) -> str: ... - def extractall( - self, path: StrPath | None = None, members: Iterable[str | ZipInfo] | None = None, pwd: bytes | None = None - ) -> None: ... - def printdir(self, file: _Writer | None = None) -> None: ... - def setpassword(self, pwd: bytes) -> None: ... - def read(self, name: str | ZipInfo, pwd: bytes | None = None) -> bytes: ... - def testzip(self) -> str | None: ... - def write( - self, - filename: StrPath, - arcname: StrPath | None = None, - compress_type: int | None = None, - compresslevel: int | None = None, - ) -> None: ... - def writestr( - self, - zinfo_or_arcname: str | ZipInfo, - data: SizedBuffer | str, - compress_type: int | None = None, - compresslevel: int | None = None, - ) -> None: ... - if sys.version_info >= (3, 11): - def mkdir(self, zinfo_or_directory_name: str | ZipInfo, mode: int = 0o777) -> None: ... - - def __del__(self) -> None: ... - -class PyZipFile(ZipFile): - def __init__( - self, file: str | IO[bytes], mode: _ZipFileMode = "r", compression: int = 0, allowZip64: bool = True, optimize: int = -1 - ) -> None: ... - def writepy(self, pathname: str, basename: str = "", filterfunc: Callable[[str], bool] | None = None) -> None: ... - -class ZipInfo: - __slots__ = ( - "orig_filename", - "filename", - "date_time", - "compress_type", - "compress_level", - "comment", - "extra", - "create_system", - "create_version", - "extract_version", - "reserved", - "flag_bits", - "volume", - "internal_attr", - "external_attr", - "header_offset", - "CRC", - "compress_size", - "file_size", - "_raw_time", - "_end_offset", - ) - filename: str - date_time: _DateTuple - compress_type: int - comment: bytes - extra: bytes - create_system: int - create_version: int - extract_version: int - reserved: int - flag_bits: int - volume: int - internal_attr: int - external_attr: int - header_offset: int - CRC: int - compress_size: int - file_size: int - orig_filename: str # undocumented - if sys.version_info >= (3, 13): - compress_level: int | None - - def __init__(self, filename: str = "NoName", date_time: _DateTuple = (1980, 1, 1, 0, 0, 0)) -> None: ... - @classmethod - def from_file(cls, filename: StrPath, arcname: StrPath | None = None, *, strict_timestamps: bool = True) -> Self: ... - def is_dir(self) -> bool: ... - def FileHeader(self, zip64: bool | None = None) -> bytes: ... - if sys.version_info >= (3, 14): - def _for_archive(self, archive: ZipFile) -> Self: ... - -if sys.version_info >= (3, 12): - from zipfile._path import CompleteDirs as CompleteDirs, Path as Path - -else: - class CompleteDirs(ZipFile): - def resolve_dir(self, name: str) -> str: ... - - @overload - @classmethod - def make(cls, source: ZipFile) -> CompleteDirs: ... - @overload - @classmethod - def make(cls, source: StrPath | IO[bytes]) -> Self: ... - - class Path: - root: CompleteDirs - at: str - def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = "") -> None: ... - @property - def name(self) -> str: ... - @property - def parent(self) -> PathLike[str]: ... # undocumented - @property - def filename(self) -> PathLike[str]: ... # undocumented - if sys.version_info >= (3, 11): - @property - def suffix(self) -> str: ... - @property - def suffixes(self) -> list[str]: ... - @property - def stem(self) -> str: ... - - @overload - def open( - self, - mode: Literal["r", "w"] = "r", - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - *, - pwd: bytes | None = None, - ) -> TextIOWrapper: ... - @overload - def open(self, mode: Literal["rb", "wb"], *, pwd: bytes | None = None) -> IO[bytes]: ... - - def iterdir(self) -> Iterator[Self]: ... - def is_dir(self) -> bool: ... - def is_file(self) -> bool: ... - def exists(self) -> bool: ... - def read_text( - self, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - ) -> str: ... - def read_bytes(self) -> bytes: ... - def joinpath(self, *other: StrPath) -> Path: ... - def __truediv__(self, add: StrPath) -> Path: ... - -def is_zipfile(filename: StrOrBytesPath | _SupportsReadSeekTell) -> bool: ... - -ZIP64_LIMIT: Final[int] -ZIP_FILECOUNT_LIMIT: Final[int] -ZIP_MAX_COMMENT: Final[int] - -ZIP_STORED: Final = 0 -ZIP_DEFLATED: Final = 8 -ZIP_BZIP2: Final = 12 -ZIP_LZMA: Final = 14 -if sys.version_info >= (3, 14): - ZIP_ZSTANDARD: Final = 93 - -DEFAULT_VERSION: Final[int] -ZIP64_VERSION: Final[int] -BZIP2_VERSION: Final[int] -LZMA_VERSION: Final[int] -if sys.version_info >= (3, 14): - ZSTANDARD_VERSION: Final[int] -MAX_EXTRACT_VERSION: Final[int] diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/__init__.vpi deleted file mode 100644 index e1449dc6..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/__init__.vpi +++ /dev/null @@ -1,87 +0,0 @@ -import sys -from _typeshed import StrPath -from collections.abc import Iterator, Sequence -from io import TextIOWrapper -from os import PathLike -from typing import IO, Literal, TypeVar, overload -from typing_extensions import Self -from zipfile import ZipFile - -_ZF = TypeVar("_ZF", bound=ZipFile) - -if sys.version_info >= (3, 12): - __all__ = ["Path"] - - class InitializedState: - def __init__(self, *args: object, **kwargs: object) -> None: ... - def __getstate__(self) -> tuple[list[object], dict[object, object]]: ... - def __setstate__(self, state: Sequence[tuple[list[object], dict[object, object]]]) -> None: ... - - class CompleteDirs(InitializedState, ZipFile): - def resolve_dir(self, name: str) -> str: ... - - @overload - @classmethod - def make(cls, source: ZipFile) -> CompleteDirs: ... - @overload - @classmethod - def make(cls, source: StrPath | IO[bytes]) -> Self: ... - - if sys.version_info >= (3, 13): - @classmethod - def inject(cls, zf: _ZF) -> _ZF: ... - - class Path: - root: CompleteDirs - at: str - def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = "") -> None: ... - @property - def name(self) -> str: ... - @property - def parent(self) -> PathLike[str]: ... # undocumented - @property - def filename(self) -> PathLike[str]: ... # undocumented - @property - def suffix(self) -> str: ... - @property - def suffixes(self) -> list[str]: ... - @property - def stem(self) -> str: ... - - @overload - def open( - self, - mode: Literal["r", "w"] = "r", - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - *, - pwd: bytes | None = None, - ) -> TextIOWrapper: ... - @overload - def open(self, mode: Literal["rb", "wb"], *, pwd: bytes | None = None) -> IO[bytes]: ... - - def iterdir(self) -> Iterator[Self]: ... - def is_dir(self) -> bool: ... - def is_file(self) -> bool: ... - def exists(self) -> bool: ... - def read_text( - self, - encoding: str | None = None, - errors: str | None = None, - newline: str | None = None, - line_buffering: bool = False, - write_through: bool = False, - ) -> str: ... - def read_bytes(self) -> bytes: ... - def joinpath(self, *other: StrPath) -> Path: ... - def glob(self, pattern: str) -> Iterator[Self]: ... - def rglob(self, pattern: str) -> Iterator[Self]: ... - def is_symlink(self) -> Literal[False]: ... - def relative_to(self, other: Path, *extra: StrPath) -> str: ... - def match(self, path_pattern: str) -> bool: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __truediv__(self, add: StrPath) -> Path: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/glob.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/glob.vpi deleted file mode 100644 index f6a661be..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zipfile/_path/glob.vpi +++ /dev/null @@ -1,26 +0,0 @@ -import sys -from collections.abc import Iterator -from re import Match - -if sys.version_info >= (3, 13): - class Translator: - if sys.platform == "win32": - def __init__(self, seps: str = "\\/") -> None: ... - else: - def __init__(self, seps: str = "/") -> None: ... - - def translate(self, pattern: str) -> str: ... - def extend(self, pattern: str) -> str: ... - def match_dirs(self, pattern: str) -> str: ... - def translate_core(self, pattern: str) -> str: ... - def replace(self, match: Match[str]) -> str: ... - def restrict_rglob(self, pattern: str) -> None: ... - def star_not_empty(self, pattern: str) -> str: ... - -else: - def translate(pattern: str) -> str: ... - def match_dirs(pattern: str) -> str: ... - def translate_core(pattern: str) -> str: ... - def replace(match: Match[str]) -> str: ... - -def separate(pattern: str) -> Iterator[Match[str]]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zipimport.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zipimport.vpi deleted file mode 100644 index 4b34f1f2..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zipimport.vpi +++ /dev/null @@ -1,44 +0,0 @@ -import sys -from _frozen_importlib_external import _LoaderBasics -from _typeshed import StrOrBytesPath -from importlib.machinery import ModuleSpec -from importlib.readers import ZipReader -from types import CodeType, ModuleType -from typing_extensions import deprecated - -__all__ = ["ZipImportError", "zipimporter"] - -class ZipImportError(ImportError): ... - -class zipimporter(_LoaderBasics): - archive: str - prefix: str - if sys.version_info >= (3, 11): - def __init__(self, path: str) -> None: ... - else: - def __init__(self, path: StrOrBytesPath) -> None: ... - - if sys.version_info < (3, 12): - @deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `find_spec()` instead.") - def find_loader(self, fullname: str, path: str | None = None) -> tuple[zipimporter | None, list[str]]: ... - @deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `find_spec()` instead.") - def find_module(self, fullname: str, path: str | None = None) -> zipimporter | None: ... - - def get_code(self, fullname: str) -> CodeType: ... - def get_data(self, pathname: str) -> bytes: ... - def get_filename(self, fullname: str) -> str: ... - if sys.version_info >= (3, 14): - def get_resource_reader(self, fullname: str) -> ZipReader: ... # undocumented - else: - def get_resource_reader(self, fullname: str) -> ZipReader | None: ... # undocumented - - def get_source(self, fullname: str) -> str | None: ... - def is_package(self, fullname: str) -> bool: ... - if sys.version_info < (3, 15): - @deprecated("Deprecated since Python 3.10; removed in Python 3.15. Use `exec_module()` instead.") - def load_module(self, fullname: str) -> ModuleType: ... - - def exec_module(self, module: ModuleType) -> None: ... - def create_module(self, spec: ModuleSpec) -> None: ... - def find_spec(self, fullname: str, target: ModuleType | None = None) -> ModuleSpec | None: ... - def invalidate_caches(self) -> None: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zlib.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zlib.vpi deleted file mode 100644 index 557fa761..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zlib.vpi +++ /dev/null @@ -1,81 +0,0 @@ -import sys -from _typeshed import ReadableBuffer -from typing import Any, Final, final, type_check_only -from typing_extensions import Self - -DEFLATED: Final = 8 -DEF_MEM_LEVEL: Final[int] -DEF_BUF_SIZE: Final = 16384 -MAX_WBITS: Final[int] -ZLIB_VERSION: Final[str] -ZLIB_RUNTIME_VERSION: Final[str] -Z_NO_COMPRESSION: Final = 0 -Z_PARTIAL_FLUSH: Final = 1 -Z_BEST_COMPRESSION: Final = 9 -Z_BEST_SPEED: Final = 1 -Z_BLOCK: Final = 5 -Z_DEFAULT_COMPRESSION: Final = -1 -Z_DEFAULT_STRATEGY: Final = 0 -Z_FILTERED: Final = 1 -Z_FINISH: Final = 4 -Z_FIXED: Final = 4 -Z_FULL_FLUSH: Final = 3 -Z_HUFFMAN_ONLY: Final = 2 -Z_NO_FLUSH: Final = 0 -Z_RLE: Final = 3 -Z_SYNC_FLUSH: Final = 2 -Z_TREES: Final = 6 - -if sys.version_info >= (3, 14): - # Available when zlib was built with zlib-ng - ZLIBNG_VERSION: Final[str] - -class error(Exception): ... - -# This class is not exposed at runtime. It calls itself zlib.Compress. -@final -@type_check_only -class _Compress: - def __copy__(self) -> Self: ... - def __deepcopy__(self, memo: Any, /) -> Self: ... - def compress(self, data: ReadableBuffer, /) -> bytes: ... - def flush(self, mode: int = 4, /) -> bytes: ... - def copy(self) -> _Compress: ... - -# This class is not exposed at runtime. It calls itself zlib.Decompress. -@final -@type_check_only -class _Decompress: - @property - def unused_data(self) -> bytes: ... - @property - def unconsumed_tail(self) -> bytes: ... - @property - def eof(self) -> bool: ... - def __copy__(self) -> Self: ... - def __deepcopy__(self, memo: Any, /) -> Self: ... - def decompress(self, data: ReadableBuffer, /, max_length: int = 0) -> bytes: ... - def flush(self, length: int = 16384, /) -> bytes: ... - def copy(self) -> _Decompress: ... - -def adler32(data: ReadableBuffer, value: int = 1, /) -> int: ... - -if sys.version_info >= (3, 15): - def adler32_combine(adler1: int, adler2: int, len2: int, /) -> int: ... - -if sys.version_info >= (3, 11): - def compress(data: ReadableBuffer, /, level: int = -1, wbits: int = 15) -> bytes: ... - -else: - def compress(data: ReadableBuffer, /, level: int = -1) -> bytes: ... - -def compressobj( - level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None -) -> _Compress: ... -def crc32(data: ReadableBuffer, value: int = 0, /) -> int: ... - -if sys.version_info >= (3, 15): - def crc32_combine(crc1: int, crc2: int, len2: int, /) -> int: ... - -def decompress(data: ReadableBuffer, /, wbits: int = 15, bufsize: int = 16384) -> bytes: ... -def decompressobj(wbits: int = 15, zdict: ReadableBuffer = b"") -> _Decompress: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/__init__.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/__init__.vpi deleted file mode 100644 index def31546..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/__init__.vpi +++ /dev/null @@ -1,36 +0,0 @@ -import sys -from collections.abc import Iterable -from datetime import datetime, timedelta, tzinfo -from typing_extensions import Self, disjoint_base -from zoneinfo._common import ZoneInfoNotFoundError as ZoneInfoNotFoundError, _IOBytes -from zoneinfo._tzpath import ( - TZPATH as TZPATH, - InvalidTZPathWarning as InvalidTZPathWarning, - available_timezones as available_timezones, - reset_tzpath as reset_tzpath, -) - -__all__ = ["ZoneInfo", "reset_tzpath", "available_timezones", "TZPATH", "ZoneInfoNotFoundError", "InvalidTZPathWarning"] - -@disjoint_base -class ZoneInfo(tzinfo): - @property - def key(self) -> str: ... - def __new__(cls, key: str) -> Self: ... - @classmethod - def no_cache(cls, key: str) -> Self: ... - - if sys.version_info >= (3, 12): - @classmethod - def from_file(cls, file_obj: _IOBytes, /, key: str | None = None) -> Self: ... - else: - @classmethod - def from_file(cls, fobj: _IOBytes, /, key: str | None = None) -> Self: ... - - @classmethod - def clear_cache(cls, *, only_keys: Iterable[str] | None = None) -> None: ... - def tzname(self, dt: datetime | None, /) -> str | None: ... - def utcoffset(self, dt: datetime | None, /) -> timedelta | None: ... - def dst(self, dt: datetime | None, /) -> timedelta | None: ... - -def __dir__() -> list[str]: ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_common.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_common.vpi deleted file mode 100644 index e6d2d83c..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_common.vpi +++ /dev/null @@ -1,14 +0,0 @@ -import io -from typing import Any, Protocol, type_check_only - -@type_check_only -class _IOBytes(Protocol): - def read(self, size: int, /) -> bytes: ... - def seek(self, size: int, whence: int = ..., /) -> Any: ... - -def load_tzdata(key: str) -> io.BufferedReader: ... -def load_data( - fobj: _IOBytes, -) -> tuple[tuple[int, ...], tuple[int, ...], tuple[int, ...], tuple[int, ...], tuple[str, ...], bytes | None]: ... - -class ZoneInfoNotFoundError(KeyError): ... diff --git a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_tzpath.vpi b/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_tzpath.vpi deleted file mode 100644 index 0ef78d03..00000000 --- a/packages/vipeye-internal/typeshed-fallback/stdlib/zoneinfo/_tzpath.vpi +++ /dev/null @@ -1,13 +0,0 @@ -from _typeshed import StrPath -from collections.abc import Sequence - -# Note: Both here and in clear_cache, the types allow the use of `str` where -# a sequence of strings is required. This should be remedied if a solution -# to this typing bug is found: https://github.com/python/typing/issues/256 -def reset_tzpath(to: Sequence[StrPath] | None = None) -> None: ... -def find_tzfile(key: str) -> str | None: ... -def available_timezones() -> set[str]: ... - -TZPATH: tuple[str, ...] - -class InvalidTZPathWarning(RuntimeWarning): ... diff --git a/packages/vipeye-internal/vipershed-fallback/stdlib/t.vpi b/packages/vipeye-internal/vipershed-fallback/stdlib/t.vpi index 95e03f6e..c79d9205 100644 --- a/packages/vipeye-internal/vipershed-fallback/stdlib/t.vpi +++ b/packages/vipeye-internal/vipershed-fallback/stdlib/t.vpi @@ -16,7 +16,10 @@ from typing import Any, Generic, Optional, Type, TypeAlias, TypeVar from typing import Callable as CallableT T = TypeVar('T') -N = TypeVar('N') +# N 为数组长度。提供默认值(None 表示不定长数组),使 `t.CArray[T]`(单参数)合法, +# 与真实编译器 CArray.__class_getitem__ 接受任意参数的行为一致。 +# 例如 `result: t.CArray[str]` 表示 char* 数组(不定长,None 结尾)。 +N = TypeVar('N', default=None) # =============================================================================