mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 10:23:32 +00:00
Python: Run mypy type checker on the slint compiler
Some checks failed
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / wasm_demo (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / tree-sitter (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
autofix.ci / format_fix (push) Has been cancelled
autofix.ci / lint_typecheck (push) Has been cancelled
CI / files-changed (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Has been cancelled
CI / build_and_test (ubuntu-22.04, nightly) (push) Has been cancelled
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / python_test (macos-14) (push) Has been cancelled
CI / python_test (ubuntu-22.04) (push) Has been cancelled
CI / python_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (macos-13) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
Some checks failed
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / wasm_demo (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / tree-sitter (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
autofix.ci / format_fix (push) Has been cancelled
autofix.ci / lint_typecheck (push) Has been cancelled
CI / files-changed (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Has been cancelled
CI / build_and_test (ubuntu-22.04, nightly) (push) Has been cancelled
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / python_test (macos-14) (push) Has been cancelled
CI / python_test (ubuntu-22.04) (push) Has been cancelled
CI / python_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (macos-13) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
This commit is contained in:
parent
89c1497880
commit
917c9a8c6a
3 changed files with 16 additions and 2 deletions
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
|
@ -209,6 +209,9 @@ jobs:
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
working-directory: api/python/slint
|
working-directory: api/python/slint
|
||||||
run: uv run mypy -p tests -p slint
|
run: uv run mypy -p tests -p slint
|
||||||
|
- name: Run mypy on slint-compiler
|
||||||
|
working-directory: api/python/compiler
|
||||||
|
run: uv run mypy slint_compiler
|
||||||
- name: Run ruff linter
|
- name: Run ruff linter
|
||||||
working-directory: api/python/slint
|
working-directory: api/python/slint
|
||||||
run: uv tool run ruff check
|
run: uv tool run ruff check
|
||||||
|
|
|
@ -19,3 +19,14 @@ Tracker = "https://github.com/slint-ui/slint/issues"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
slint-compiler = "slint_compiler:main"
|
slint-compiler = "slint_compiler:main"
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = ["mypy>=1.15.0"]
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
strict = true
|
||||||
|
disallow_subclassing_any = false
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = ["cached_path.*"]
|
||||||
|
follow_untyped_imports = true
|
||||||
|
|
|
@ -10,7 +10,7 @@ import os
|
||||||
from importlib.metadata import version, PackageNotFoundError
|
from importlib.metadata import version, PackageNotFoundError
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main() -> None:
|
||||||
try:
|
try:
|
||||||
package_version = version("slint-compiler")
|
package_version = version("slint-compiler")
|
||||||
# Strip alpha/beta from for example "1.13.0b1"
|
# Strip alpha/beta from for example "1.13.0b1"
|
||||||
|
@ -58,7 +58,7 @@ def main():
|
||||||
local_path = cached_path.cached_path(
|
local_path = cached_path.cached_path(
|
||||||
url_and_path_within_archive, extract_archive=True
|
url_and_path_within_archive, extract_archive=True
|
||||||
)
|
)
|
||||||
args = [local_path]
|
args = [str(local_path)]
|
||||||
args.extend(sys.argv[1:])
|
args.extend(sys.argv[1:])
|
||||||
subprocess.run(args)
|
subprocess.run(args)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue