diff --git a/pyproject.toml b/pyproject.toml index cb185950..61747987 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -271,8 +271,6 @@ max-complexity = 17 ################################################################################################## "ANN001", # Missing type annotation for function argument "ANN201", # ANN201 Missing return type annotation for public function - "ANN202", # Missing return type annotation for private function - "ANN204", # Missing return type annotation for special method ] "tests/unit/sdk/test_client.py" = [ diff --git a/tests/unit/sdk/checks/test_checks.py b/tests/unit/sdk/checks/test_checks.py index 4b7ba97d..8b4cd82a 100644 --- a/tests/unit/sdk/checks/test_checks.py +++ b/tests/unit/sdk/checks/test_checks.py @@ -46,13 +46,13 @@ async def test_validate_sync_async(mock_gql_query_my_query) -> None: class IFCheckAsync(InfrahubCheck): query = "my_query" - async def validate(self, data: dict): + async def validate(self, data: dict) -> None: self.log_error("Not valid") class IFCheckSync(InfrahubCheck): query = "my_query" - def validate(self, data: dict): + def validate(self, data: dict) -> None: self.log_error("Not valid") check = await IFCheckAsync.init(branch="main") diff --git a/tests/unit/sdk/test_repository.py b/tests/unit/sdk/test_repository.py index 2a9df5c6..69f34e19 100644 --- a/tests/unit/sdk/test_repository.py +++ b/tests/unit/sdk/test_repository.py @@ -50,7 +50,7 @@ def test_active_branch_returns_correct_branch(temp_dir) -> None: def test_initialize_repo_raises_error_on_failure(monkeypatch, temp_dir) -> None: """Test that an error is raised if the repository cannot be initialized.""" - def mock_init(*args, **kwargs): # noqa: ANN002, ANN003 + def mock_init(*args, **kwargs) -> None: # noqa: ANN002, ANN003 return None # Simulate failure monkeypatch.setattr(Repo, "init", mock_init)