mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Typing: improve kivy type stubs (#2681)
This commit is contained in:
28
typings/kivy/graphics/__init__.pyi
Normal file
28
typings/kivy/graphics/__init__.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from .texture import FillType_Drawable, FillType_Vec, Texture
|
||||
|
||||
|
||||
class FillType_Shape(FillType_Drawable):
|
||||
texture: Texture
|
||||
|
||||
def __init__(self,
|
||||
*,
|
||||
texture: Texture = ...,
|
||||
pos: FillType_Vec = ...,
|
||||
size: FillType_Vec = ...) -> None: ...
|
||||
|
||||
|
||||
class Ellipse(FillType_Shape):
|
||||
pass
|
||||
|
||||
|
||||
class Color:
|
||||
def __init__(self, r: float, g: float, b: float, a: float) -> None: ...
|
||||
|
||||
|
||||
class Rectangle(FillType_Shape):
|
||||
def __init__(self,
|
||||
*,
|
||||
source: str = ...,
|
||||
texture: Texture = ...,
|
||||
pos: FillType_Vec = ...,
|
||||
size: FillType_Vec = ...) -> None: ...
|
13
typings/kivy/graphics/texture.pyi
Normal file
13
typings/kivy/graphics/texture.pyi
Normal file
@@ -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
|
Reference in New Issue
Block a user