Skip to content

Commit b337cd3

Browse files
committed
Typing for Welcome demo
1 parent fcc9d5b commit b337cd3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include workbench/py.typed
2-
recursive-include workbench *.pyi
2+
recursive-include workbench *.pyi

python-aux/workbench-typestubs/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools"] # REQUIRED if [build-system] table is used
3-
build-backend = "setuptools.build_meta" # If not defined, then legacy behavior can happen.
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "workbench-typestubs"

src/Welcome/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import cast
2+
13
import gi
24

35
gi.require_version("Gtk", "4.0")
@@ -19,7 +21,7 @@ def dialog_response(dialog, response):
1921
dialog.close()
2022

2123

22-
subtitle_box: Gtk.Box = workbench.builder.get_object("subtitle")
24+
subtitle_box = cast(Gtk.Box, workbench.builder.get_object("subtitle"))
2325

2426
button = Gtk.Button(label="Press me", margin_top=6, css_classes=["suggested-action"])
2527
button.connect("clicked", greet)

0 commit comments

Comments
 (0)