Skip to content
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

Python janitorial work #26

Closed

Conversation

PeterShinners
Copy link
Contributor

This trivial stream of fixes attempts to do the following:

  • Replace tab indents with spaces
  • Remove trailing semicolons
  • Fix a few undefined variables and missing imports
  • Remove redundant or unused imports
  • Derive all classes from object

I've attempted to break the changes into logical commits. None of these really improve the software, but a couple unlikely warning messages will now show up properly.

These do not change are alter the code in any way, but likely come from
fingers of habit from C developers.
A handful of Python files in usdviewq have stray tab indentions.
This is technically an error, but Python2 tries to guess at the
intention of the code. All tabs are removed.
Several files were importing modules never used. There were also
several cases of modules being imported at the top module scope
and then again later inside functions.
This is what configures Python to use new style classes.
Several of these classes are meant as lightweight placeholders
for enumerations, but it still seems consistent to derive
everything from object.
In an unlikely warning the incorrect variable was being
used to format the message.
The View class derived from QTextEdit was not calling the init method from the base.
When viewing through something that is not a camera, an error message was
missing the import for PrintWarning.
@sunyab sunyab self-assigned this Aug 26, 2016
@sunyab
Copy link
Contributor

sunyab commented Aug 30, 2016

This pull request was merged in 30a04e1. Thanks @PeterShinners!

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