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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ As of build 305, installation .exe files have been deprecated; see
Coming in build 312, as yet unreleased
--------------------------------------

* Added missing quotes and closing parenthesis to `win32com.client.build.MapEntry`'s `repr` (mhammond#2572, [@Avasam][Avasam])

Build 311, released 2025/07/14
------------------------------

Expand Down
15 changes: 7 additions & 8 deletions com/win32com/client/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class NotSupportedException(Exception):


class MapEntry:
"Simple holder for named attibutes - items in a map."
"""Simple holder for named attributes - items in a map."""

def __init__(
self,
Expand All @@ -92,17 +92,16 @@ def __init__(
self.doc = doc
self.resultCLSID = resultCLSID
self.resultDocumentation = resultDoc
self.wasProperty = (
0 # Have I been transformed into a function so I can pass args?
)
self.wasProperty = 0
"""Has this MapEntry been transformed into a function so it can pass args?"""
self.hidden = hidden

def __repr__(self):
return (
"MapEntry(dispid={s.dispid}, desc={s.desc}, names={s.names}, doc={s.doc!r}, "
"resultCLSID={s.resultCLSID}, resultDocumentation={s.resultDocumentation}, "
"wasProperty={s.wasProperty}, hidden={s.hidden}"
).format(s=self)
"MapEntry("
+ ", ".join([f"{key}={value!r}" for key, value in self.__dict__.items()])
+ ")"
)

def GetResultCLSID(self):
rc = self.resultCLSID
Expand Down