mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-19 23:09:55 +08:00
pywin32: Improve some types (#9089)
This commit is contained in:
@@ -2,7 +2,7 @@ from _typeshed import Incomplete
|
||||
|
||||
from win32com.client import dynamic as dynamic
|
||||
|
||||
def GetObject(Pathname: Incomplete | None = ..., Class: Incomplete | None = ..., clsctx: Incomplete | None = ...): ...
|
||||
def GetObject(Pathname: str | None = ..., Class: Incomplete | None = ..., clsctx: Incomplete | None = ...) -> CDispatch: ...
|
||||
def GetActiveObject(Class, clsctx=...): ...
|
||||
def Moniker(Pathname, clsctx=...): ...
|
||||
def Dispatch(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
# Necessary for mypy to not throw AssertionError with win32com.client
|
||||
class CDispatch:
|
||||
@@ -22,5 +23,6 @@ class CDispatch:
|
||||
def __LazyMap__(self, attr): ...
|
||||
def __AttrToID__(self, attr): ...
|
||||
ob: Incomplete
|
||||
def __getattr__(self, attr): ...
|
||||
def __setattr__(self, attr, value) -> None: ...
|
||||
# CDispatch objects are dynamically generated and too complex to type
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
def __setattr__(self, attr: str, value: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user