mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Improved pywin32 error and exception classes (#11613)
This commit is contained in:
@@ -2409,7 +2409,6 @@ class SERVICE_STATUS:
|
||||
|
||||
class TRACKMOUSEEVENT: ...
|
||||
class WIN32_FIND_DATA: ...
|
||||
class com_error: ...
|
||||
|
||||
class connection:
|
||||
def setautocommit(self, c, /) -> None: ...
|
||||
@@ -2427,8 +2426,6 @@ class cursor:
|
||||
def setinputsizes(self) -> None: ...
|
||||
def setoutputsize(self) -> None: ...
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
class COMPONENT:
|
||||
@property
|
||||
def ID(self): ...
|
||||
|
||||
@@ -2,8 +2,8 @@ from _typeshed import Incomplete
|
||||
from collections.abc import Iterable
|
||||
|
||||
import _win32typing
|
||||
from win32.lib.pywintypes import error as error
|
||||
|
||||
error: Incomplete
|
||||
langid: Incomplete
|
||||
|
||||
def AddSourceToRegistry(
|
||||
|
||||
@@ -40,6 +40,6 @@ class Query(BaseQuery):
|
||||
def collectdatawhile_slave(self, period) -> None: ...
|
||||
def __getinitargs__(self): ...
|
||||
|
||||
class QueryError(Exception):
|
||||
class QueryError:
|
||||
query: Incomplete
|
||||
def __init__(self, query) -> None: ...
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Literal
|
||||
from typing_extensions import TypeAlias
|
||||
from typing import ClassVar, Literal
|
||||
|
||||
import _win32typing
|
||||
|
||||
def odbc(connectionString: str, /) -> _win32typing.connection: ...
|
||||
def SQLDataSources(direction, /) -> tuple[Incomplete, Incomplete]: ...
|
||||
|
||||
_odbcError: TypeAlias = type # noqa: Y042 # Does not exist at runtime, but odbc.odbcError is a valid type.
|
||||
DATE: str
|
||||
NUMBER: str
|
||||
RAW: str
|
||||
@@ -21,10 +19,14 @@ SQL_FETCH_PRIOR: int
|
||||
SQL_FETCH_RELATIVE: int
|
||||
STRING: str
|
||||
TYPES: tuple[Literal["STRING"], Literal["RAW"], Literal["NUMBER"], Literal["DATE"]]
|
||||
dataError: Incomplete
|
||||
error: _odbcError
|
||||
integrityError: Incomplete
|
||||
internalError: Incomplete
|
||||
noError: Incomplete
|
||||
opError: Incomplete
|
||||
progError: Incomplete
|
||||
|
||||
class error(Exception):
|
||||
__name__: ClassVar[str] = "odbcError"
|
||||
|
||||
# These all pretend to come from a module called "dbi", but that module doesn't exist
|
||||
class dataError(Exception): ...
|
||||
class integrityError(Exception): ...
|
||||
class internalError(Exception): ...
|
||||
class noError(Exception): ...
|
||||
class opError(Exception): ...
|
||||
class progError(Exception): ...
|
||||
|
||||
@@ -13,7 +13,7 @@ from win32com.server.exception import COMException as COMException
|
||||
S_OK: int
|
||||
IDispatchType: Incomplete
|
||||
IUnknownType: Incomplete
|
||||
error: Incomplete
|
||||
error: str
|
||||
regSpec: str
|
||||
regPolicy: str
|
||||
regDispatcher: str
|
||||
|
||||
Reference in New Issue
Block a user