From b3a65c373efe6d5a7c132a88120996e5cc2e0f65 Mon Sep 17 00:00:00 2001 From: Aditya Bavadekar Date: Wed, 22 Oct 2025 12:48:00 +0530 Subject: [PATCH] chore: disable MyPy, add target version py312, update documentation --- .github/workflows/lint.yml | 5 +++-- .pre-commit-config.yaml | 19 ++++++++----------- CONTRIBUTING.md | 2 +- Development.md | 4 ++-- pyproject.toml | 7 ++++--- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d8863546..f7653cd7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,8 +37,9 @@ jobs: run: | uv run isort --check-only . uv run black --check . - uv run ruff check --ignore E501,E402,I001,I002 . - uv run mypy . + uv run ruff check . + # Temporarily disabled due to untyped codebase + # uv run mypy . # TypeScript type check - name: TypeScript typecheck diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea0c2e5a..bbc42d48 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,6 @@ repos: hooks: - id: isort name: isort code formatter - language_version: python3.11 args: ['--profile', 'black'] files: \.(py)$ @@ -29,7 +28,6 @@ repos: hooks: - id: black name: Black code formatter - language_version: python3.11 files: \.(py)$ - repo: https://github.com/charliermarsh/ruff-pre-commit @@ -37,14 +35,13 @@ repos: hooks: - id: ruff name: ruff linter - language_version: python3.11 - args: ['--fix', '--ignore', 'E501,E402,I001,I002'] # Ignore line length, module level import not at top of file, and import sorting issues + args: ['--fix'] files: \.(py)$ - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 - hooks: - - id: mypy - name: mypy type checker - language_version: python3.11 - files: \.(py)$ + # Temporarily disabled due to untyped codebase + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v1.5.1 + # hooks: + # - id: mypy + # name: mypy type checker + # files: \.(py)$ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e38aa3ed..69819ef6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ We follow strict code formatting guidelines to ensure consistency across the cod # For Python code uv run black . uv run isort . - uv run ruff check --ignore E501,E402,I001,I002 --fix . + uv run ruff check --fix . ``` 4. **Validate Your Code**: Ensure your code passes all checks: ```bash diff --git a/Development.md b/Development.md index e51bc500..cfe21f6b 100644 --- a/Development.md +++ b/Development.md @@ -258,7 +258,7 @@ uv run black . uv run isort . # Run Ruff linter with auto-fix -uv run ruff check --ignore E501,E402,I001,I002 . +uv run ruff check . # Run type checking with MyPy uv run mypy . @@ -283,7 +283,7 @@ uv run pre-commit run # Python checks uv run black --check . uv run isort --check . -uv run ruff check --ignore E501,E402,I001,I002 . +uv run ruff check . uv run mypy . # JavaScript/TypeScript checks diff --git a/pyproject.toml b/pyproject.toml index d6b70d5a..fb7b1d09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,12 +70,12 @@ cua-mcp-server = { workspace = true } [tool.black] line-length = 100 -target-version = ["py311"] +target-version = ["py312"] [tool.ruff] fix = true line-length = 100 -target-version = "py311" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "B", "I"] @@ -92,7 +92,7 @@ docstring-code-format = true check_untyped_defs = true disallow_untyped_defs = true ignore_missing_imports = true -python_version = "3.11" +python_version = "3.12" show_error_codes = true strict = true warn_return_any = true @@ -100,6 +100,7 @@ warn_unused_ignores = false [tool.isort] profile = "black" +py_version = 312 [tool.pytest.ini_options] asyncio_mode = "auto"