Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" = [
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/sdk/checks/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sdk/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down