diff --git a/typings/kivy/graphics.pyi b/typings/kivy/graphics/__init__.pyi similarity index 54% rename from typings/kivy/graphics.pyi rename to typings/kivy/graphics/__init__.pyi index 19509106..a1a5bc02 100644 --- a/typings/kivy/graphics.pyi +++ b/typings/kivy/graphics/__init__.pyi @@ -1,24 +1,12 @@ -""" FillType_* is not a real kivy type - just something to fill unknown typing. """ - -from typing import Sequence - -FillType_Vec = Sequence[int] - - -class FillType_Drawable: - def __init__(self, *, pos: FillType_Vec = ..., size: FillType_Vec = ...) -> None: ... - - -class FillType_Texture(FillType_Drawable): - pass +from .texture import FillType_Drawable, FillType_Vec, Texture class FillType_Shape(FillType_Drawable): - texture: FillType_Texture + texture: Texture def __init__(self, *, - texture: FillType_Texture = ..., + texture: Texture = ..., pos: FillType_Vec = ..., size: FillType_Vec = ...) -> None: ... @@ -35,6 +23,6 @@ class Rectangle(FillType_Shape): def __init__(self, *, source: str = ..., - texture: FillType_Texture = ..., + texture: Texture = ..., pos: FillType_Vec = ..., size: FillType_Vec = ...) -> None: ... diff --git a/typings/kivy/graphics/texture.pyi b/typings/kivy/graphics/texture.pyi new file mode 100644 index 00000000..19e03aad --- /dev/null +++ b/typings/kivy/graphics/texture.pyi @@ -0,0 +1,13 @@ +""" FillType_* is not a real kivy type - just something to fill unknown typing. """ + +from typing import Sequence + +FillType_Vec = Sequence[int] + + +class FillType_Drawable: + def __init__(self, *, pos: FillType_Vec = ..., size: FillType_Vec = ...) -> None: ... + + +class Texture: + pass diff --git a/typings/kivy/uix/image.pyi b/typings/kivy/uix/image.pyi new file mode 100644 index 00000000..fa014bae --- /dev/null +++ b/typings/kivy/uix/image.pyi @@ -0,0 +1,9 @@ +import io + +from kivy.graphics.texture import Texture + + +class CoreImage: + texture: Texture + + def __init__(self, data: io.BytesIO, ext: str) -> None: ...