Skip to content

Commit

Permalink
Fix typing compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
likianta committed Dec 17, 2022
1 parent ab88f07 commit 8726f0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qmlease"
version = "3.0.0b0"
version = "3.0.0b1"
homepage = "https://github.com/likianta/qmlease"
description = "A flexible toolkit for Python programmer to efficiently develop QML graphical user interface."
readme = "README.md"
Expand All @@ -19,13 +19,14 @@ lambda-ex = "^1.1.0"
lk-logger = "^5.4.7"
lk-utils = "^2.5.2"
qtpy = "^2.3.0"
typing-extensions = "*"
pyside6 = { version = "*", optional = true }
pyside2 = { version = "*", optional = true }
# https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies
typing-extensions = { version = "*", python = "<3.10" }

[tool.poetry.extras]
qt6 = ["pyside6"] # pip install lk-qtquick-scaffold[qt6]
qt5 = ["pyside2"] # pip install lk-qtquick-scaffold[qt5]
qt6 = ["pyside6"] # pip install qmlease[qt6]
qt5 = ["pyside2"] # pip install qmlease[qt5]

[build-system]
requires = ["poetry"]
Expand Down
4 changes: 2 additions & 2 deletions qmlease/qmlside/layout_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def auto_size_children(

children = container.children()

elastic_items: dict[int, float] = {} # dict[int index, float ratio]
stretch_items: dict[int, int] = {} # dict[int index, int _]
elastic_items = {} # dict[int index, float ratio]
stretch_items = {} # dict[int index, int _]
# note: stretch_items.values() are useless (they are all zeros). it
# is made just for keeping the same type struct with elastic_items.

Expand Down
2 changes: 1 addition & 1 deletion qmlease/qmlside/widgets_backend/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class T:
KID = t.Tuple[int, tuple[bool, bool, bool]] # key id
KID = t.Tuple[int, t.Tuple[bool, bool, bool]] # key id
FID = str # function id
# (int key_code, (ctrl, shift, alt))

Expand Down

0 comments on commit 8726f0e

Please sign in to comment.