Skip to content

Commit c4e9bb1

Browse files
CopilotSigureMo
andauthored
🏷️ types: move to ty
Agent-Logs-Url: https://github.com/ShigureLab/expr-simplifier/sessions/bbbf3ae0-179b-40ad-9694-e6a3a440f32a Co-authored-by: SigureMo <38436475+SigureMo@users.noreply.github.com>
1 parent d9e1fed commit c4e9bb1

6 files changed

Lines changed: 31 additions & 36 deletions

File tree

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"recommendations": [
33
"ms-python.python",
4-
"ms-python.vscode-pylance",
4+
"astral-sh.ty",
55
"charliermarsh.ruff",
66
"esbenp.prettier-vscode",
77
"EditorConfig.EditorConfig",

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
3-
"python.analysis.typeCheckingMode": "strict",
43
"python.analysis.inlayHints.functionReturnTypes": true,
54
"python.analysis.inlayHints.variableTypes": true,
65
"[python]": {

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fmt:
1111
uv run ruff format .
1212

1313
lint:
14-
uv run pyright src/expr_simplifier tests
14+
uv run ty check --error-on-warning src/expr_simplifier tests
1515
uv run ruff check .
1616

1717
fmt-docs:

pyproject.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ expr_simplifier = "expr_simplifier.__main__:main"
3232

3333
[dependency-groups]
3434
dev = [
35-
"pyright>=1.1.406",
35+
"ty>=0.0.32",
3636
"ruff>=0.14.0",
3737
"pytest>=8.4.2",
3838
"pytest-rerunfailures>=16.0.1",
3939
]
4040

41-
[tool.pyright]
42-
include = ["src/expr_simplifier", "tests"]
43-
pythonVersion = "3.10"
44-
typeCheckingMode = "strict"
45-
4641
[tool.ruff]
4742
line-length = 120
4843
target-version = "py310"
@@ -67,8 +62,6 @@ select = [
6762
]
6863
ignore = [
6964
"E501", # line too long, duplicate with ruff fmt
70-
"F401", # imported but unused, duplicate with pyright
71-
"F841", # local variable is assigned to but never used, duplicate with pyright
7265
]
7366

7467
[tool.ruff.lint.isort]

src/expr_simplifier/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
import ast
55
from collections.abc import Callable
6+
from typing import Any
67

78
from expr_simplifier import __version__
89
from expr_simplifier.transforms import apply_constant_folding, apply_cse, apply_logical_simplification
@@ -24,7 +25,7 @@ def create_pass_parser(
2425
name: str,
2526
passes: list[Pass],
2627
description: str,
27-
subparser: argparse._SubParsersAction[argparse.ArgumentParser], # pyright: ignore [reportPrivateUsage]
28+
subparser: Any,
2829
) -> None:
2930
parser = subparser.add_parser(name, help=description)
3031
parser.add_argument("input", help="The expression to simplify")

uv.lock

Lines changed: 26 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)