Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f9c390a

Browse files
authored
Use Ty for Python type checking (#676)
* Use Ty for Python type checking * Use lock file for CLI tool installation * Fix a step name
1 parent 36cdb06 commit f9c390a

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/quality_control.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ jobs:
106106
with:
107107
enable-cache: false
108108

109-
- name: Run Pyright
110-
run: uv run pyright
109+
- name: Run Ty
110+
run: uv run ty check
111111

112112
- name: Run Ruff
113113
run: uv run ruff check .

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"rust-lang.rust-analyzer",
4+
"charliermarsh.ruff",
5+
"astral-sh.ty",
6+
"tamasfe.even-better-toml",
7+
"dart-code.flutter"
8+
]
9+
}

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
# `uv run automate [command_type]`.
55

66
[dependency-groups]
7-
dev = ["ruff", "pyright"]
7+
dev = ["ruff", "ty"]
88

99
[tool.uv.workspace]
1010
members = ["automate", "documentation"]
1111

12+
[tool.ty.rules]
13+
all = "error"
14+
1215
[tool.ruff.lint]
1316
select = ["ALL"]
1417
ignore = ["TC", "BLE", "S602"]
1518

16-
[tool.pyright]
17-
typeCheckingMode = "strict"
18-
1919
[tool.ruff.lint.per-file-ignores]
2020
"documentation/**/*.py" = ["A001"]

rust_crate_cli/src/tool/webassembly.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ fn install_wasm_toolchain() -> Result<(), SetupError> {
6363
.output()?
6464
.capture_err()?;
6565
Command::new("cargo")
66-
.args(["install", "wasm-pack"])
66+
.args(["install", "--locked", "wasm-pack"])
6767
.output()?
6868
.capture_err()?;
6969
Command::new("cargo")
70-
.args(["install", "wasm-bindgen-cli"])
70+
.args(["install", "--locked", "wasm-bindgen-cli"])
7171
.output()?
7272
.capture_err()?;
7373
Ok(())

0 commit comments

Comments
 (0)