Skip to content

Commit

Permalink
using fstring
Browse files Browse the repository at this point in the history
  • Loading branch information
newwingbird committed Dec 14, 2024
1 parent 68f809e commit 83161ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions comtypes/tools/typedesc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ def __init__(
self.doc = doc

def __repr__(self):
return "<TypeLib(%s: %s, %s, %s)>" % (
self.name,
self.guid,
self.major,
self.minor,
)
return f"<TypeLib({self.name}: {self.guid}, {self.major}, {self.minor})>"


class Constant(object):
Expand Down
6 changes: 1 addition & 5 deletions comtypes/viewobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ def __init__(self, *args, **kw):

def __repr__(self):
size = (self.sizelProposed.cx, self.sizelProposed.cy)
return "<ExtentInfo(mode=%s, size=%s) at %x>" % (
self.dwExtentMode,
size,
id(self),
)
return f"<ExtentInfo(mode={self.dwExtentMode}, size={size}) at {id(self):x}>"


assert sizeof(tagExtentInfo) == 16, sizeof(tagExtentInfo)
Expand Down

0 comments on commit 83161ef

Please sign in to comment.