-
-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add repr for plugins #14463
Add repr for plugins #14463
Conversation
See test results for failed build of commit 2edae701da |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM
@@ -563,7 +563,10 @@ def _get_productVersion(self): | |||
return self.productVersion | |||
|
|||
def __repr__(self): | |||
return "<%r (appName %r, process ID %s) at address %x>"%(self.appModuleName,self.appName,self.processID,id(self)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is removing the address information intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I've never seen a case where having the address in repr made any sense. I can easily restore it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me
Link to issue number:
None
Summary of the issue:
Several plugin types, such as addon objects and drivers, have a default repr that makes it impossible to identify the addon from the python console without further inspection.
Description of user facing changes
When inspecting addons, drivers and appModules from the python console, the repr will be different.
Description of development approach
Added
__repr__
method to several classesTesting strategy:
Tested inspection of the objects using the python console.
Known issues with pull request:
None known
Change log entries:
For Developers
Code Review Checklist: