mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 01:53:24 +08:00
Bump pywin32 to 307 (#12742)
This commit is contained in:
@@ -2,6 +2,9 @@ from _typeshed import Incomplete
|
||||
|
||||
import _win32typing
|
||||
import win32com.client
|
||||
|
||||
# Re-export everything from win32comext/adsi/adsi.pyd
|
||||
# Not using a star export because the redefinitions below mess up mypy, pyright and stubtest
|
||||
from win32comext.adsi.adsi import (
|
||||
DBPROPSET_ADSISEARCH as DBPROPSET_ADSISEARCH,
|
||||
ADsBuildEnumerator as ADsBuildEnumerator,
|
||||
@@ -50,6 +53,7 @@ from win32comext.adsi.adsi import (
|
||||
IID_IDsObjectPicker as IID_IDsObjectPicker,
|
||||
LIBID_ADs as LIBID_ADs,
|
||||
StringAsDS_SELECTION_LIST as StringAsDS_SELECTION_LIST,
|
||||
error as error,
|
||||
)
|
||||
|
||||
LCID: int
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import bdb
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32com.axdebug.util import trace
|
||||
from win32com.server.util import unwrap as unwrap
|
||||
from win32comext.axdebug import gateways as gateways
|
||||
from win32comext.axdebug import gateways
|
||||
from win32comext.axdebug.util import trace
|
||||
|
||||
def fnull(*args) -> None: ...
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32comext.axdebug import contexts as contexts
|
||||
from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl
|
||||
|
||||
name: str
|
||||
|
||||
class SourceCodeContainer:
|
||||
@@ -13,7 +10,7 @@ class SourceCodeContainer:
|
||||
codeContexts: Incomplete
|
||||
site: Incomplete
|
||||
startLineNumber: Incomplete
|
||||
debugDocument: Incomplete
|
||||
debugDocument: Incomplete | None
|
||||
def __init__(
|
||||
self,
|
||||
text,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32comext.axdebug import adb as adb, gateways
|
||||
from win32comext.axdebug.util import trace as trace
|
||||
from win32comext.axdebug import gateways
|
||||
|
||||
class DebugCodeContext(gateways.DebugCodeContext, gateways.DebugDocumentContext):
|
||||
debugSite: Incomplete
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32com.axdebug import contexts as contexts, documents, gateways as gateways
|
||||
from win32com.axdebug.util import trace as trace
|
||||
from win32com.axscript import axscript as axscript
|
||||
from win32comext.axdebug import documents
|
||||
|
||||
currentDebugger: Incomplete
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32com.server.exception import Exception as Exception
|
||||
from win32comext.axdebug import codecontainer as codecontainer, contexts as contexts, gateways
|
||||
from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl, trace as trace
|
||||
from win32comext.axdebug import gateways
|
||||
|
||||
def GetGoodFileName(fname): ...
|
||||
|
||||
@@ -13,9 +11,7 @@ class DebugDocumentProvider(gateways.DebugDocumentProvider):
|
||||
def GetDocumentClassId(self): ...
|
||||
def GetDocument(self): ...
|
||||
|
||||
# error: Cannot determine consistent method resolution order (MRO) for "DebugDocumentText"
|
||||
# pyright doesn't have a specific error code for MRO error!
|
||||
class DebugDocumentText(gateways.DebugDocumentInfo, gateways.DebugDocumentText, gateways.DebugDocument): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
||||
class DebugDocumentText(gateways.DebugDocumentText):
|
||||
codeContainer: Incomplete
|
||||
def __init__(self, codeContainer) -> None: ...
|
||||
def GetName(self, dnt): ...
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32com.server.exception import COMException as COMException
|
||||
from win32com.server.util import ListEnumeratorGateway
|
||||
from win32comext.axdebug import gateways
|
||||
from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl
|
||||
|
||||
def MakeNiceString(ob): ...
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32com.server.exception import COMException as COMException
|
||||
from win32comext.axdebug import gateways
|
||||
from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl, trace as trace
|
||||
|
||||
class EnumDebugStackFrames(gateways.EnumDebugStackFrames):
|
||||
def __init__(self, debugger) -> None: ...
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
import win32com.server.policy
|
||||
import win32com.server.dispatcher
|
||||
|
||||
debugging: int
|
||||
|
||||
def trace(*args) -> None: ...
|
||||
|
||||
all_wrapped: Incomplete
|
||||
|
||||
def RaiseNotImpl(who: Incomplete | None = ...) -> None: ...
|
||||
|
||||
class Dispatcher(win32com.server.policy.DispatcherWin32trace):
|
||||
class Dispatcher(win32com.server.dispatcher.DispatcherWin32trace):
|
||||
def __init__(self, policyClass, object) -> None: ...
|
||||
|
||||
42
stubs/pywin32/win32comext/axscript/client/debug.pyi
Normal file
42
stubs/pywin32/win32comext/axscript/client/debug.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32comext.axdebug import gateways
|
||||
from win32comext.axdebug.codecontainer import SourceCodeContainer
|
||||
|
||||
debuggingTrace: int
|
||||
|
||||
def trace(*args) -> None: ...
|
||||
|
||||
class DebugManager:
|
||||
scriptEngine: Incomplete
|
||||
adb: Incomplete
|
||||
rootNode: Incomplete
|
||||
debugApplication: Incomplete
|
||||
ccProvider: Incomplete
|
||||
scriptSiteDebug: Incomplete
|
||||
activeScriptDebug: Incomplete
|
||||
codeContainers: Incomplete
|
||||
def __init__(self, scriptEngine) -> None: ...
|
||||
def Close(self) -> None: ...
|
||||
def IsAnyHost(self): ...
|
||||
def IsSimpleHost(self): ...
|
||||
def HandleRuntimeError(self): ...
|
||||
def OnEnterScript(self) -> None: ...
|
||||
def OnLeaveScript(self) -> None: ...
|
||||
def AddScriptBlock(self, codeBlock) -> None: ...
|
||||
|
||||
class DebugCodeBlockContainer(SourceCodeContainer):
|
||||
codeBlock: Incomplete
|
||||
def __init__(self, codeBlock, site) -> None: ...
|
||||
def GetName(self, dnt): ...
|
||||
|
||||
class EnumDebugCodeContexts(gateways.EnumDebugCodeContexts): ...
|
||||
|
||||
class ActiveScriptDebug:
|
||||
debugMgr: Incomplete
|
||||
scriptSiteDebug: Incomplete
|
||||
codeContainers: Incomplete
|
||||
def __init__(self, debugMgr, codeContainers) -> None: ...
|
||||
def GetScriptTextAttributes(self, code, delim, flags): ...
|
||||
def GetScriptletTextAttributes(self, code, delim, flags): ...
|
||||
def EnumCodeContextsOfPosition(self, context, charOffset, numChars): ...
|
||||
@@ -1,21 +1,35 @@
|
||||
from types import TracebackType
|
||||
|
||||
from win32com.server.exception import COMException
|
||||
from win32comext.axscript.client.debug import DebugManager
|
||||
from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript
|
||||
from win32comext.axscript.server.axsite import AXSite
|
||||
|
||||
debugging: int
|
||||
|
||||
def FormatForAX(text): ...
|
||||
def ExpandTabs(text): ...
|
||||
def AddCR(text): ...
|
||||
def FormatForAX(text: str) -> str: ...
|
||||
def ExpandTabs(text: str) -> str: ...
|
||||
def AddCR(text: str) -> str: ...
|
||||
|
||||
class IActiveScriptError:
|
||||
def GetSourceLineText(self): ...
|
||||
def GetSourcePosition(self): ...
|
||||
def GetExceptionInfo(self): ...
|
||||
def GetSourceLineText(self) -> str | None: ...
|
||||
def GetSourcePosition(self) -> tuple[int, int, int]: ...
|
||||
def GetExceptionInfo(self) -> AXScriptException: ...
|
||||
|
||||
class AXScriptException(COMException):
|
||||
sourceContext: int
|
||||
startLineNo: int
|
||||
linetext: str
|
||||
def __init__(self, site, codeBlock, exc_type, exc_value, exc_traceback) -> None: ...
|
||||
def ExtractTracebackInfo(self, tb, site): ...
|
||||
def __init__(
|
||||
self,
|
||||
site: COMScript,
|
||||
codeBlock: AXScriptCodeBlock | None,
|
||||
exc_type: None = None,
|
||||
exc_value: BaseException | None = None,
|
||||
exc_traceback: None = None,
|
||||
) -> None: ...
|
||||
def ExtractTracebackInfo(self, tb: TracebackType, site: COMScript) -> tuple[str, int, str, str | None]: ...
|
||||
|
||||
def ProcessAXScriptException(scriptingSite, debugManager, exceptionInstance): ...
|
||||
def ProcessAXScriptException(
|
||||
scriptingSite: AXSite, debugManager: DebugManager, exceptionInstance: AXScriptException
|
||||
) -> None | COMException | AXScriptException: ...
|
||||
|
||||
154
stubs/pywin32/win32comext/axscript/client/framework.pyi
Normal file
154
stubs/pywin32/win32comext/axscript/client/framework.pyi
Normal file
@@ -0,0 +1,154 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import NoReturn
|
||||
|
||||
def RemoveCR(text): ...
|
||||
|
||||
SCRIPTTEXT_FORCEEXECUTION: int
|
||||
SCRIPTTEXT_ISEXPRESSION: int
|
||||
SCRIPTTEXT_ISPERSISTENT: int
|
||||
state_map: Incomplete
|
||||
|
||||
def profile(fn, *args): ...
|
||||
|
||||
class SafeOutput:
|
||||
softspace: int
|
||||
redir: Incomplete
|
||||
def __init__(self, redir: Incomplete | None = None) -> None: ...
|
||||
def write(self, message) -> None: ...
|
||||
def flush(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
def MakeValidSysOuts() -> None: ...
|
||||
def trace(*args) -> None: ...
|
||||
def RaiseAssert(scode, desc) -> NoReturn: ...
|
||||
|
||||
class AXScriptCodeBlock:
|
||||
name: Incomplete
|
||||
codeText: Incomplete
|
||||
codeObject: Incomplete
|
||||
sourceContextCookie: Incomplete
|
||||
startLineNumber: Incomplete
|
||||
flags: Incomplete
|
||||
beenExecuted: int
|
||||
def __init__(self, name: str, codeText: str, sourceContextCookie: int, startLineNumber: int, flags) -> None: ...
|
||||
def GetFileName(self): ...
|
||||
def GetDisplayName(self): ...
|
||||
def GetLineNo(self, no: int): ...
|
||||
|
||||
class Event:
|
||||
name: str
|
||||
def __init__(self) -> None: ...
|
||||
def Reset(self) -> None: ...
|
||||
def Close(self) -> None: ...
|
||||
dispid: Incomplete
|
||||
def Build(self, typeinfo, funcdesc) -> None: ...
|
||||
|
||||
class EventSink:
|
||||
events: Incomplete
|
||||
connection: Incomplete
|
||||
coDispatch: Incomplete
|
||||
myScriptItem: Incomplete
|
||||
myInvokeMethod: Incomplete
|
||||
iid: Incomplete
|
||||
def __init__(self, myItem, coDispatch) -> None: ...
|
||||
def Reset(self) -> None: ...
|
||||
def Close(self) -> None: ...
|
||||
def GetSourceTypeInfo(self, typeinfo): ...
|
||||
def BuildEvents(self) -> None: ...
|
||||
def Connect(self) -> None: ...
|
||||
def Disconnect(self) -> None: ...
|
||||
|
||||
class ScriptItem:
|
||||
parentItem: Incomplete
|
||||
dispatch: Incomplete
|
||||
name: Incomplete
|
||||
flags: Incomplete
|
||||
eventSink: Incomplete
|
||||
subItems: Incomplete
|
||||
createdConnections: int
|
||||
isRegistered: int
|
||||
def __init__(self, parentItem, name, dispatch, flags) -> None: ...
|
||||
def Reset(self) -> None: ...
|
||||
def Close(self) -> None: ...
|
||||
def Register(self) -> None: ...
|
||||
def IsGlobal(self): ...
|
||||
def IsVisible(self): ...
|
||||
def GetEngine(self): ...
|
||||
def GetSubItemClass(self): ...
|
||||
def GetSubItem(self, name): ...
|
||||
def GetCreateSubItem(self, parentItem, name, dispatch, flags): ...
|
||||
def CreateConnections(self) -> None: ...
|
||||
def Connect(self) -> None: ...
|
||||
def Disconnect(self) -> None: ...
|
||||
def BuildEvents(self) -> None: ...
|
||||
def FindBuildSubItemEvents(self) -> None: ...
|
||||
def GetDefaultSourceTypeInfo(self, typeinfo): ...
|
||||
|
||||
IActiveScriptMethods: Incomplete
|
||||
IActiveScriptParseMethods: Incomplete
|
||||
IObjectSafetyMethods: Incomplete
|
||||
IActiveScriptParseProcedureMethods: Incomplete
|
||||
|
||||
class COMScript:
|
||||
baseThreadId: int
|
||||
debugManager: Incomplete
|
||||
threadState: Incomplete
|
||||
scriptState: Incomplete
|
||||
scriptSite: Incomplete
|
||||
safetyOptions: int
|
||||
lcid: int
|
||||
subItems: Incomplete
|
||||
scriptCodeBlocks: Incomplete
|
||||
def __init__(self) -> None: ...
|
||||
def InitNew(self) -> None: ...
|
||||
def AddScriptlet(
|
||||
self, defaultName, code, itemName, subItemName, eventName, delimiter, sourceContextCookie, startLineNumber
|
||||
) -> None: ...
|
||||
def ParseScriptText(self, code, itemName, context, delimiter, sourceContextCookie, startLineNumber, flags, bWantResult): ...
|
||||
def ParseProcedureText(
|
||||
self, code, formalParams, procName, itemName, unkContext, delimiter, contextCookie, startingLineNumber, flags
|
||||
) -> None: ...
|
||||
def SetScriptSite(self, site) -> None: ...
|
||||
def GetScriptSite(self, iid): ...
|
||||
def SetScriptState(self, state) -> None: ...
|
||||
def GetScriptState(self): ...
|
||||
persistLoaded: int
|
||||
def Close(self) -> None: ...
|
||||
def AddNamedItem(self, name, flags) -> None: ...
|
||||
def GetScriptDispatch(self, name) -> None: ...
|
||||
def GetCurrentScriptThreadID(self): ...
|
||||
def GetScriptThreadID(self, win32ThreadId): ...
|
||||
def GetScriptThreadState(self, scriptThreadId): ...
|
||||
def AddTypeLib(self, uuid, major, minor, flags) -> None: ...
|
||||
def Clone(self) -> None: ...
|
||||
def SetInterfaceSafetyOptions(self, iid, optionsMask, enabledOptions) -> None: ...
|
||||
def GetInterfaceSafetyOptions(self, iid): ...
|
||||
def ExecutePendingScripts(self) -> None: ...
|
||||
def ProcessScriptItemEvent(self, item, event, lcid, wFlags, args): ...
|
||||
def ResetNamedItems(self) -> None: ...
|
||||
def GetCurrentSafetyOptions(self): ...
|
||||
def ProcessNewNamedItemsConnections(self) -> None: ...
|
||||
def RegisterNewNamedItems(self) -> None: ...
|
||||
def RegisterNamedItem(self, item) -> None: ...
|
||||
def CheckConnectedOrDisconnected(self) -> None: ...
|
||||
def Connect(self) -> None: ...
|
||||
def Run(self) -> None: ...
|
||||
def Stop(self) -> None: ...
|
||||
def Disconnect(self) -> None: ...
|
||||
def ConnectEventHandlers(self) -> None: ...
|
||||
def DisconnectEventHandlers(self) -> None: ...
|
||||
def Reset(self) -> None: ...
|
||||
def ChangeScriptState(self, state) -> None: ...
|
||||
def ApplyInScriptedSection(self, codeBlock: AXScriptCodeBlock | None, fn, args): ...
|
||||
def CompileInScriptedSection(self, codeBlock: AXScriptCodeBlock, type, realCode: Incomplete | None = None): ...
|
||||
def ExecInScriptedSection(self, codeBlock: AXScriptCodeBlock, globals, locals: Incomplete | None = None): ...
|
||||
def EvalInScriptedSection(self, codeBlock, globals, locals: Incomplete | None = None): ...
|
||||
def HandleException(self, codeBlock: AXScriptCodeBlock | None) -> NoReturn: ...
|
||||
def BeginScriptedSection(self) -> None: ...
|
||||
def EndScriptedSection(self) -> None: ...
|
||||
def DisableInterrupts(self) -> None: ...
|
||||
def EnableInterrupts(self) -> None: ...
|
||||
def GetNamedItem(self, name): ...
|
||||
def GetNamedItemClass(self): ...
|
||||
|
||||
def dumptypeinfo(typeinfo) -> None: ...
|
||||
@@ -1,3 +0,0 @@
|
||||
# Necessary for mypy to not fail with:
|
||||
# 'error: Cannot find implementation or library stub for module named "win32comext.axscript.client.pyscript"'
|
||||
# in: .gateways, .stackframe, .expressions, .adb, .contexts, .codecontainer, .documents, .debugger
|
||||
@@ -1,6 +0,0 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class Exception:
|
||||
activeScriptError: Incomplete
|
||||
def __init__(self, activeScriptError) -> None: ...
|
||||
def __getattr__(self, attr: str): ...
|
||||
@@ -100,6 +100,15 @@ FORCE_SAVE: int
|
||||
GENERATE_RECEIPT_ONLY: int
|
||||
KEEP_OPEN_READONLY: int
|
||||
KEEP_OPEN_READWRITE: int
|
||||
LOGOFF_ABORT: int
|
||||
LOGOFF_COMPLETE: int
|
||||
LOGOFF_INBOUND: int
|
||||
LOGOFF_NO_WAIT: int
|
||||
LOGOFF_ORDERLY: int
|
||||
LOGOFF_OUTBOUND: int
|
||||
LOGOFF_OUTBOUND_QUEUE: int
|
||||
LOGOFF_PURGE: int
|
||||
LOGOFF_QUIET: int
|
||||
MAIL_E_NAMENOTFOUND: int
|
||||
MAPI_ABCONT: int
|
||||
MAPI_ADDRBOOK: int
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from win32comext.mapi import mapi as mapi, mapitags as mapitags
|
||||
|
||||
TupleType = tuple
|
||||
ListType = list
|
||||
IntType = int
|
||||
prTable: Incomplete
|
||||
prTable: dict[int, str]
|
||||
|
||||
def GetPropTagName(pt): ...
|
||||
|
||||
mapiErrorTable: Incomplete
|
||||
mapiErrorTable: dict[int, str]
|
||||
|
||||
def GetScodeString(hr): ...
|
||||
|
||||
ptTable: Incomplete
|
||||
ptTable: dict[int, str]
|
||||
|
||||
def GetMapiTypeName(propType, rawType: bool = ...): ...
|
||||
def GetProperties(obj, propList): ...
|
||||
|
||||
@@ -354,6 +354,7 @@ IID_IExtractIconW: _win32typing.PyIID
|
||||
IID_IExtractImage: _win32typing.PyIID
|
||||
IID_IFileOperation: _win32typing.PyIID
|
||||
IID_IFileOperationProgressSink: _win32typing.PyIID
|
||||
IID_IFolderView: _win32typing.PyIID
|
||||
IID_IIdentityName: _win32typing.PyIID
|
||||
IID_IKnownFolder: _win32typing.PyIID
|
||||
IID_IKnownFolderManager: _win32typing.PyIID
|
||||
|
||||
@@ -221,6 +221,12 @@ SVSI_DESELECTOTHERS: int
|
||||
SVSI_ENSUREVISIBLE: int
|
||||
SVSI_FOCUSED: int
|
||||
SVSI_TRANSLATEPT: int
|
||||
SVSI_SELECTIONMARK: int
|
||||
SVSI_POSITIONITEM: int
|
||||
SVSI_CHECK: int
|
||||
SVSI_CHECK2: int
|
||||
SVSI_KEYBOARDSELECT: int
|
||||
SVSI_NOTAKEFOCUS: int
|
||||
SVGIO_BACKGROUND: int
|
||||
SVGIO_SELECTION: int
|
||||
SVGIO_ALLVIEW: int
|
||||
@@ -449,6 +455,14 @@ SHCNF_PATH: int
|
||||
SHCNF_PRINTER: int
|
||||
QIF_CACHED: int
|
||||
QIF_DONTEXPANDFOLDER: int
|
||||
SWFO_NEEDDISPATCH: int
|
||||
SWFO_INCLUDEPENDING: int
|
||||
SWFO_COOKIEPASSED: int
|
||||
SWC_EXPLORER: int
|
||||
SWC_BROWSER: int
|
||||
SWC_3RDPARTY: int
|
||||
SWC_CALLBACK: int
|
||||
SWC_DESKTOP: int
|
||||
SHARD_PIDL: int
|
||||
SHARD_PATHA: int
|
||||
SHARD_PATHW: int
|
||||
|
||||
Reference in New Issue
Block a user