Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions adodbapi/apibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,8 @@ def __getitem__(self, key): # used for row[key] type of value access
return self._getValue(
self.rows.columnNames[key.lower()]
) # extension row[columnName] designation
except (KeyError, TypeError):
er, st, tr = sys.exc_info()
raise er(f'No such key as "{key!r}" in {self!r}').with_traceback(tr)
except (KeyError, TypeError) as er:
raise type(er)(f'No such key as "{key!r}" in {self!r}') from er

def __iter__(self):
return iter(self.__next__())
Expand Down
9 changes: 6 additions & 3 deletions com/win32comext/axscript/client/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

import re
import sys
from typing import NoReturn
from collections.abc import Callable
from typing import Any, NoReturn

import pythoncom # Need simple connection point support
import win32api
Expand Down Expand Up @@ -192,7 +193,9 @@ def __init__(self, myItem, coDispatch):
self.connection = None
self.coDispatch = coDispatch
self.myScriptItem = myItem
self.myInvokeMethod = myItem.GetEngine().ProcessScriptItemEvent
self.myInvokeMethod: Callable[[Any, Any, Any, Any, Any], Any] = (
myItem.GetEngine().ProcessScriptItemEvent
) # Incomplete type
self.iid = None

def Reset(self):
Expand All @@ -218,7 +221,7 @@ def _invoke_(self, dispid, lcid, wFlags, args):
event = self.events[dispid]
except:
raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND)
# print("Invoke for ", event, "on", self.myScriptItem, " - calling", self.myInvokeMethod)
# print("Invoke for", event, "on", self.myScriptItem, "- calling", self.myInvokeMethod)
return self.myInvokeMethod(self.myScriptItem, event, lcid, wFlags, args)

def GetSourceTypeInfo(self, typeinfo):
Expand Down
2 changes: 0 additions & 2 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
"reportArgumentType": "none",
"reportAttributeAccessIssue": "none",
// FIXE: These all need to be fixed first and turned back to error
// some of the fixes need to be done in types-pywin32 from typeshed
"reportCallIssue": "warning",
"reportOperatorIssue": "warning",
"reportOptionalCall": "warning",
"reportOptionalIterable": "warning",
"reportOptionalMemberAccess": "warning",
"reportOptionalSubscript": "warning",
Expand Down