Skip to content

Added Generic Type Hinting to Singleton Decorator! - #816

Open
BrebbBroobles wants to merge 3 commits into
pokepetter:masterfrom
BrebbBroobles:singleton_decorator_type_hints
Open

Added Generic Type Hinting to Singleton Decorator!#816
BrebbBroobles wants to merge 3 commits into
pokepetter:masterfrom
BrebbBroobles:singleton_decorator_type_hints

Conversation

@BrebbBroobles

Copy link
Copy Markdown

A fix for the problem mentioned in #815 🙂

Comment thread ursina/main.py
from ursina.camera import instance as camera
from ursina.mouse import instance as mouse
from ursina import entity
from ursina import shader

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure it really needed to be removed from the imports?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I'm sorry! I think I accidentally let my code formatter loose in main.py and wasn't paying enough attention when I made the PR. It must've alphabetically sorted the imports and removed ones it thought weren't necessary.

The formatter picked it up as unused but I don't know if there's some nuance it might be missing.

I'll re-add the missing imports. Sorry, I didn't mean to mess with main.py.

Comment thread ursina/main.py Outdated

try:
from ursina import gamepad
pass

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the pass specified here if the basic design does nothing?

@ShivamKR12

Copy link
Copy Markdown
Contributor

@pokepetter Too many unnecessary commits for such a simple change. Maybe worthwile accepting if cleaned up. Otherwise, just close it.

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.

3 participants