refactor: Compiled ignored ruff rules in pyproject
This commit is contained in:
@@ -43,8 +43,28 @@ exclude = ["alembic"]
|
||||
select = ["ALL"]
|
||||
ignore = ["D100", "D103", "TRY301"]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"tests/**/*.py" = ["S101", "S105"]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**/*.py" = [
|
||||
"S101", # Use of assert detected
|
||||
"S105", # Possible hardcoded password
|
||||
"S106", # Possible hardcoded password
|
||||
"ANN001", # Missing type annotation for function argument
|
||||
"ANN003", # Missing type annotation for **kwargs
|
||||
"ANN201", # Missing return type annotation for public function
|
||||
"ANN202", # Missing return type annotation for private function
|
||||
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
|
||||
"ARG001", # Unused function argument
|
||||
"ARG002", # Unused method argument
|
||||
"ARG005", # Unused lambda argument
|
||||
"BLE001", # Do not catch blind exception
|
||||
"E501", # Line too long
|
||||
"PLR2004", # Magic value used in comparison
|
||||
"PLC0415", # `import` should be at top-level
|
||||
"SLF001", # Private member accessed
|
||||
"SIM117", # Use a single `if` statement
|
||||
"PT011", # `pytest.raises()` is too broad
|
||||
"PT012", # `pytest.raises()` block should contain a single simple statement
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
filterwarnings = [
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for API token endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, PLC0415, BLE001, E501
|
||||
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for authentication endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, E501, PLC0415, ANN401
|
||||
|
||||
from typing import Any
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for extraction API endpoints."""
|
||||
# ruff: noqa: PLR2004, E501
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for player API endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, ANN001, ANN201
|
||||
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for playlist API endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, E501, PLC0415
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for socket API endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, ANN001, ANN201
|
||||
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for sound API endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, E501, PLC0415, ANN001, ANN202
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for VLC player API endpoints."""
|
||||
# ruff: noqa: ARG002, PLR2004, E501
|
||||
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Test configuration and fixtures."""
|
||||
# ruff: noqa: ANN401, ANN001
|
||||
|
||||
import asyncio
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for API token authentication dependencies."""
|
||||
# ruff: noqa: S106
|
||||
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for credit transaction repository."""
|
||||
# ruff: noqa: ARG002, E501
|
||||
|
||||
import json
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for extraction repository."""
|
||||
# ruff: noqa: ANN001, ANN201
|
||||
|
||||
from unittest.mock import AsyncMock, Mock
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for playlist repository."""
|
||||
# ruff: noqa: PLR2004, ANN401
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
from typing import Any
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for sound repository."""
|
||||
# ruff: noqa: ARG002, PLR2004
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for user repository."""
|
||||
# ruff: noqa: ARG002
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for user OAuth repository."""
|
||||
# ruff: noqa: ARG002
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for authentication service."""
|
||||
# ruff: noqa: S106, SLF001, PLC0415
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for credit service."""
|
||||
# ruff: noqa: ANN001, ANN201, PLR2004, E501
|
||||
|
||||
import json
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for extraction service."""
|
||||
# ruff: noqa: ANN001, ANN201, PLR2004, SLF001, E501
|
||||
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for extraction background processor."""
|
||||
# ruff: noqa: ANN001, ANN201, PLR2004, SLF001
|
||||
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for OAuth service."""
|
||||
# ruff: noqa: ANN001, PLR2004, ANN401, PT011, ANN202, ANN003, ARG001
|
||||
|
||||
from typing import Any
|
||||
from unittest.mock import AsyncMock, Mock, patch
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for player service."""
|
||||
# ruff: noqa: ANN001, ANN201, ARG002, PLR2004, SLF001, E501, SIM117, ARG005
|
||||
|
||||
import asyncio
|
||||
import threading
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for playlist service."""
|
||||
# ruff: noqa: ANN001, ARG002, PLR2004, E501, PLC0415
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for socket service."""
|
||||
# ruff: noqa: ANN001, ANN201, ARG002, PLR2004, SLF001, E501, ANN202
|
||||
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for sound normalizer service."""
|
||||
# ruff: noqa: ANN001, ANN201, ARG002, PLR2004, SLF001, E501, PLC0415
|
||||
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for sound scanner service."""
|
||||
# ruff: noqa: ANN001, ANN201, ARG002, PLR2004, SLF001, PLC0415, SIM117
|
||||
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for VLC player service."""
|
||||
# ruff: noqa: ANN001, ANN201, PLR2004, SLF001, SIM117, E501, ANN202, PLC0415
|
||||
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for cookie utilities."""
|
||||
# ruff: noqa: ANN201, E501
|
||||
|
||||
from app.utils.cookies import extract_access_token_from_cookies, parse_cookies
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""Tests for credit decorators."""
|
||||
# ruff: noqa: ARG001, ANN001, E501, PT012
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Never
|
||||
|
||||
Reference in New Issue
Block a user