-
-
Notifications
You must be signed in to change notification settings - Fork 13
Various touchups #39
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
Various touchups #39
Conversation
|
@Aermoss What's the point on importing the core libraries through a file import? from .__init__ import sys, arrayIt's confusing for linters/type checkers and I do not believe you get any benefit from it, since .pyc caches module imports? https://docs.python.org/3/faq/programming.html#how-do-i-create-a-pyc-file |
It ensures that |
|
It looks like it needs a few small adjustments but I'll merge it anyway, thanks a lot for the pull request! |
|
Wouldn't that be better achieved by directly checking if it is loaded, and loading it if necessary? if "sdl3.__init__" not in sys.modules:
# Load __init__The way it is done now makes it impossible to get rid of the star imports, as not doing a star import will result in doing circular imports. |
Convert
__init__.pyto use dynamic indents to allow setting preferred indent-width.Remove unnecessary decorators, f-strings.
Remove unnecessary importlib import (I don't see it used anywhere) and annotate the ones that are sneakily re-used in other files.
SDL_DOWNLOAD_BINARIES can return None, annotate it as such.
Touchup .gitignore for build module directories.
Remove one instance of an SDL star import in
__init__.py- hopefully this is done correctly.Add LSP/linter definitions to allow them being used properly.