Replace black and flake8 with ruff for linting and formatting
- Remove .flake8; add [tool.ruff] and [tool.ruff.format] config in pyproject.toml (line-length 120, excludes, ignore list, per-file-ignores, mccabe complexity) - Update GitHub workflow lint job to run `ruff check .` and `ruff format --check .` - Swap black and flake8 for ruff in requirements.txt and Pipfile - Change capnp/__init__.py to ruff-style noqa comment - Move max-complexity into [tool.ruff.lint.mccabe], lint options into [tool.ruff.lint] - Add per-file-ignores for capnp/__init__.py (F401, F403, F405), remove inline noqa - Run ruff format across codebase (24 files) for consistent style
This commit is contained in:
@@ -63,9 +63,7 @@ async def test_large_response_sequential():
|
||||
response = await cap.foo(i=size, j=False)
|
||||
|
||||
# Verify the response has the correct length
|
||||
assert (
|
||||
len(response.x) == size
|
||||
), f"Size mismatch for {size}: expected {size}, got {len(response.x)}"
|
||||
assert len(response.x) == size, f"Size mismatch for {size}: expected {size}, got {len(response.x)}"
|
||||
|
||||
# Verify the pattern is correct (not corrupted)
|
||||
expected = "".join(chr(65 + (k % 26)) for k in range(size))
|
||||
@@ -107,6 +105,4 @@ async def test_large_response_pipelined():
|
||||
assert len(response.x) == size, f"Size mismatch for {size}"
|
||||
|
||||
expected = "".join(chr(65 + (k % 26)) for k in range(size))
|
||||
assert (
|
||||
response.x == expected
|
||||
), f"Data corruption detected for {size} bytes payload!"
|
||||
assert response.x == expected, f"Data corruption detected for {size} bytes payload!"
|
||||
|
||||
Reference in New Issue
Block a user