Skip to content

Add / fix __all__ problems discovered by mypy and pyright #1708

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion arcade/gl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
__all__ = [
"Buffer",
"BufferDescription",
"ComputeShader",
"Context",
"Framebuffer",
"Geometry",
"Program",
"Query",
"ShaderException",
"VertexArray",
"Texture",
"Texture2D",
"geometry",
]
4 changes: 2 additions & 2 deletions arcade/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
from arcade.gui.surface import Surface
from arcade.gui.nine_patch import NinePatchTexture
from arcade.gui.ui_manager import UIManager
from arcade.gui.widgets import UILayout
from arcade.gui.widgets.layout import (
UIBoxLayout,
UIAnchorLayout,
UIGridLayout,
UILayout,
UIGridLayout
)
from arcade.gui.widgets import UIDummy, Rect
from arcade.gui.widgets import UIInteractiveWidget
Expand Down
2 changes: 2 additions & 0 deletions arcade/gui/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
if TYPE_CHECKING:
from arcade.gui.ui_manager import UIManager

__all__ = ["Surface"]


class Rect(NamedTuple):
"""
Expand Down
3 changes: 2 additions & 1 deletion arcade/gui/widgets/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from arcade.gui.nine_patch import NinePatchTexture
from arcade.gui.property import bind, DictProperty
from arcade.gui.style import UIStyleBase, UIStyledWidget
from arcade.gui.widgets import UIInteractiveWidget, Surface
from arcade.gui.surface import Surface
from arcade.gui.widgets import UIInteractiveWidget
from arcade.gui.widgets.text import UITextWidget
from arcade.text import FontNameOrNames

Expand Down
7 changes: 7 additions & 0 deletions arcade/gui/widgets/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
from arcade.gui.property import bind
from arcade.gui.widgets import UIWidget, UILayout

__all__ = [
"UILayout",
"UIAnchorLayout",
"UIBoxLayout",
"UIGridLayout"
]

W = TypeVar("W", bound="UIWidget")


Expand Down
3 changes: 2 additions & 1 deletion arcade/gui/widgets/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
UIMouseScrollEvent,
)
from arcade.gui.property import bind
from arcade.gui.widgets import UIWidget, Surface, Rect
from arcade.gui.surface import Surface
from arcade.gui.widgets import UIWidget, Rect
from arcade.gui.widgets.layout import UIAnchorLayout
from arcade.types import RGBA255, Color

Expand Down
5 changes: 1 addition & 4 deletions arcade/sprite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from arcade.texture import Texture
from arcade.resources import resolve
from .base import BasicSprite, SpriteType
# from .simple import SimpleSprite
from .sprite import Sprite
from .mixins import PymunkMixin, PyMunk
from .animated import (
Expand Down Expand Up @@ -53,7 +52,6 @@ def load_animated_gif(resource_name) -> AnimatedTimeBasedSprite:
__all__ = [
"SpriteType",
"BasicSprite",
# "SimpleSprite",
"Sprite",
"PyMunk",
"AnimatedTimeBasedSprite",
Expand All @@ -66,6 +64,5 @@ def load_animated_gif(resource_name) -> AnimatedTimeBasedSprite:
"FACE_RIGHT",
"FACE_UP",
"FACE_DOWN",
"PymunkMixin",
"Pymunk",
"PymunkMixin"
]
1 change: 1 addition & 0 deletions arcade/tilemap/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .tilemap import TileMap, load_tilemap, read_tmx # noqa
__all__ = ["TileMap", "load_tilemap", "read_tmx"]