@@ -99,10 +99,10 @@ def __init__(
9999
100100 def __repr__ (self ):
101101 return (
102- "MapEntry(dispid={s .dispid}, desc={s .desc}, names={s .names}, doc={s .doc!r}, "
103- "resultCLSID={s .resultCLSID}, resultDocumentation={s .resultDocumentation}, "
104- "wasProperty={s .wasProperty}, hidden={s .hidden}"
105- ). format ( s = self )
102+ f "MapEntry(dispid={ self .dispid } , desc={ self .desc } , names={ self .names } , doc={ self .doc !r} , "
103+ f "resultCLSID={ self .resultCLSID } , resultDocumentation={ self .resultDocumentation } , "
104+ f "wasProperty={ self .wasProperty } , hidden={ self .hidden } "
105+ )
106106
107107 def GetResultCLSID (self ):
108108 rc = self .resultCLSID
@@ -424,18 +424,12 @@ def MakeDispatchFuncMethod(self, entry, name, bMakeClass=1):
424424 )
425425 s += f"{ linePrefix } \t if ret is not None:\n "
426426 if rd == pythoncom .VT_UNKNOWN :
427- s += "{}\t \t # See if this IUnknown is really an IDispatch\n " .format (
428- linePrefix
429- )
427+ s += f"{ linePrefix } \t \t # See if this IUnknown is really an IDispatch\n "
430428 s += f"{ linePrefix } \t \t try:\n "
431- s += "{}\t \t \t ret = ret.QueryInterface(pythoncom.IID_IDispatch)\n " .format (
432- linePrefix
433- )
429+ s += f"{ linePrefix } \t \t \t ret = ret.QueryInterface(pythoncom.IID_IDispatch)\n "
434430 s += f"{ linePrefix } \t \t except pythoncom.error:\n "
435431 s += f"{ linePrefix } \t \t \t return ret\n "
436- s += "{}\t \t ret = Dispatch(ret, {}, {})\n " .format (
437- linePrefix , repr (name ), resclsid
438- )
432+ s += f"{ linePrefix } \t \t ret = Dispatch(ret, { repr (name )} , { resclsid } )\n "
439433 s += "%s\t return ret" % linePrefix
440434 elif rd == pythoncom .VT_BSTR :
441435 s = f"{ linePrefix } \t # Result is a Unicode object\n "
0 commit comments