Skip to content

Conversation

@Avasam
Copy link
Collaborator

@Avasam Avasam commented Apr 8, 2025

The following from the change entry:

  • Added missing quotes and closing parenthesis to win32com.client.build.MapEntry's repr
  • The following classes will now use the correct subclass name in repr:
    • win32rcparser.StringDef
    • win32pdhquery.QueryError
    • pywin.tools.browser.HLIPythonObject
    • win32comext.axscript.client.pyscript.NamedScriptAttribute
    • win32comext.axscript.client.error.AXScriptException
    • win32comext.axdebug.debugger.ModuleTreeNode
    • win32com.server.exception.COMException
    • win32com.client.VARIANT
  • The following classes now produce a valid eval string representation when calling repr:
    • pywin.tools.browser.HLIPythonObject
    • win32comext.axscript.client.pyscript.NamedScriptAttribute
    • win32comext.axscript.client.error.AXScriptException
    • win32com.server.exception.COMException

As well as using f-string in repr

@Avasam Avasam force-pushed the Improve-and-fix-repr-methods branch from 433abb6 to 4ae5fba Compare April 8, 2025 03:12
Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this into 2 so it's clear what is being fixed vs what is being improved. The changelog should only list things which would be observable (ie, where the repr output changes). Type annotations for repr also seem pointless to me.

@Avasam
Copy link
Collaborator Author

Avasam commented Apr 19, 2025

@Avasam Avasam closed this Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants