mirror of
https://github.com/trycua/computer.git
synced 2025-12-30 18:09:55 -06:00
chore: disable MyPy, add target version py312, update documentation
This commit is contained in:
committed by
James Murdza
parent
da031a3fa5
commit
b3a65c373e
5
.github/workflows/lint.yml
vendored
5
.github/workflows/lint.yml
vendored
@@ -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
|
||||
|
||||
@@ -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)$
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user