-
Notifications
You must be signed in to change notification settings - Fork 110
Conversation
TODO: Make sure database.py is changed from DOS to UNIX line endings. It's out of this PR's scope, so I won't do it here. |
I also caught a syntax error here. If only there were tests to cover this code. This will be caught by flake8 from now on. |
Another syntax error here. |
Please explain why all those |
My removal of the seemingly "unused" |
It's not unused. It's how Qt gets things like images and media. It seems unused because the way Qt works is that you only import it and have access to the binary data inside of it via strings like ":/freeseer/blah.png". It's not like a traditional import where you have to instantiate / call a variable method. |
I think we should explicitly call the resource setup stuff instead of doing it on import. Maybe either in the main app constructors or in the launching scripts? |
You mean resource.py? Unfortunately we can't have it be done as a single import. Every single file that needs access to it needs to import it separately. That's just how PyQt bindings are setup. |
Isn't it already being done in a single import? AFAIK Python should only be importing def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources() |
Closed in favour of using a gerrit review, and to avoid merge conflict hell. |
Instead of using
pep8
, I've opted to useflake8
as it does both PEP8 validation and linting. In addition, anyone else using flake8 in some form during development (like via syntastic in vim) will automatically use our config.