diff --git a/docs/source/conf.py b/docs/source/conf.py index 508f67d87..6a2b33fd3 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,8 +3,6 @@ Configuration for Sphinx. """ -# pylint: disable=invalid-name - import datetime import importlib.metadata diff --git a/pyproject.toml b/pyproject.toml index a1216ecc8..ee90a3040 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ optional-dependencies.dev = [ "pre-commit==3.8.0", "pydocstyle==6.3", "pyenchant==3.2.2", - "pylint==3.2.7", + "pylint==3.3.0", "pylint-per-file-ignores==1.3.2", "pyproject-fmt==2.2.4", "pyright==1.1.381", @@ -253,26 +253,23 @@ enable = [ disable = [ # Style issues that we can deal with ourselves 'too-few-public-methods', - 'too-many-ancestors', 'too-many-locals', 'too-many-arguments', 'too-many-instance-attributes', - 'too-many-return-statements', 'too-many-lines', - 'too-many-statements', 'locally-disabled', - # Let flake8 handle long lines + # Let ruff handle long lines 'line-too-long', - # Let flake8 handle unused imports + # Let ruff handle unused imports 'unused-import', - # Let isort deal with sorting + # Let ruff deal with sorting 'ungrouped-imports', # We don't need everything to be documented because of mypy 'missing-type-doc', 'missing-return-type-doc', # Too difficult to please 'duplicate-code', - # Let isort handle imports + # Let ruff handle imports 'wrong-import-order', ] diff --git a/src/mock_vws/_requests_mock_server/decorators.py b/src/mock_vws/_requests_mock_server/decorators.py index 8a2a00740..03001f77f 100644 --- a/src/mock_vws/_requests_mock_server/decorators.py +++ b/src/mock_vws/_requests_mock_server/decorators.py @@ -57,13 +57,13 @@ class MockVWS(ContextDecorator): def __init__( self, + *, base_vws_url: str = "https://vws.vuforia.com", base_vwq_url: str = "https://cloudreco.vuforia.com", duplicate_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER, query_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER, processing_time_seconds: float = 2.0, target_tracking_rater: TargetTrackingRater = _BRISQUE_TRACKING_RATER, - *, real_http: bool = False, ) -> None: """ diff --git a/tests/mock_vws/fixtures/vuforia_backends.py b/tests/mock_vws/fixtures/vuforia_backends.py index 60594f837..8b05da637 100644 --- a/tests/mock_vws/fixtures/vuforia_backends.py +++ b/tests/mock_vws/fixtures/vuforia_backends.py @@ -66,7 +66,7 @@ def _enable_use_real_vuforia( working_database: VuforiaDatabase, inactive_database: VuforiaDatabase, monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """Test against the real Vuforia.""" assert monkeypatch assert inactive_database @@ -80,7 +80,7 @@ def _enable_use_mock_vuforia( working_database: VuforiaDatabase, inactive_database: VuforiaDatabase, monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """Test against the in-memory mock Vuforia.""" assert monkeypatch working_database = VuforiaDatabase( @@ -112,7 +112,7 @@ def _enable_use_docker_in_memory( working_database: VuforiaDatabase, inactive_database: VuforiaDatabase, monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """Test against mock Vuforia created to be run in a container.""" # We set ``wsgi.input_terminated`` to ``True`` so that when going through # ``requests`` in our tests, the Flask applications @@ -239,7 +239,7 @@ def fixture_verify_mock_vuforia( vuforia_database: VuforiaDatabase, inactive_database: VuforiaDatabase, monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Test functions which use this fixture are run multiple times. Once with the real Vuforia, and once with each mock. @@ -284,7 +284,7 @@ def mock_only_vuforia( vuforia_database: VuforiaDatabase, inactive_database: VuforiaDatabase, monkeypatch: pytest.MonkeyPatch, -) -> Generator[None, None, None]: +) -> Generator[None]: """ Test functions which use this fixture are run multiple times. Once with the each mock. diff --git a/tests/mock_vws/test_query.py b/tests/mock_vws/test_query.py index 65c2c1d54..05a9ae7bc 100644 --- a/tests/mock_vws/test_query.py +++ b/tests/mock_vws/test_query.py @@ -202,6 +202,7 @@ class TestContentType: ], ) def test_incorrect_no_boundary( + *, high_quality_image: io.BytesIO, vuforia_database: VuforiaDatabase, content_type: str,