forked from thinkle/gourmet
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Replace paths with resources #281
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cac3252
Replace doc_base with resources
gnarlyquack 7f26805
Replace icondir/icon_base with resources
gnarlyquack fe997b7
Remove obsolete html_plugin_dir
gnarlyquack 499d18e
Replace style_dir with resources
gnarlyquack 0c56611
Replace imagedir with resources
gnarlyquack 01c48f2
Replace data_dir with resources
gnarlyquack ea68849
Replace uibase with resources
gnarlyquack 79cee79
Remove obsolete plugin search paths
gnarlyquack 005d4a8
Cleanup setting and use of gourmetdir
gnarlyquack c194e92
Remove lib_dir global variable
gnarlyquack 0923959
Remove obsolete settings file
gnarlyquack e64112f
Use '.opus' as the audio file extension
gnarlyquack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please do
I remember your point of hiding the imports on import, yet it's not quite idiomatic Python.
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.
I would disagree. It may not be common, but in addition to being specifically mentioned in PEP 8, it's used in Python's own standard library:
https://stackoverflow.com/questions/47138594/why-are-python-imports-renamed-with-leading-underscores
https://stackoverflow.com/questions/20757763/why-are-modules-imported-as-name-in-another-module
But besides just stylistic issues, there's an important pragmatic reason as underscored in PEP 8:
Note that imported names become part of a module's symbol table just like any other name, so
from foo import *
orfrom foo import get_data
will work identically as ifget_data
was defined in the module itself. The best way to enforce this is by prefixing them with an underscore. While__all__
provides partial mitigation in cases ofimport *
, it doesn't guard against explicit imports:And as noted in the PEP: