Skip to content

Commit 89d4e9f

Browse files
authored
Merge pull request #541 from opsmill/pog-test-return-types
Fix return types
2 parents 1c7922f + 90f7be1 commit 89d4e9f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ max-complexity = 17
271271
##################################################################################################
272272
"ANN001", # Missing type annotation for function argument
273273
"ANN201", # ANN201 Missing return type annotation for public function
274-
"ANN202", # Missing return type annotation for private function
275-
"ANN204", # Missing return type annotation for special method
276274
]
277275

278276
"tests/unit/sdk/test_client.py" = [

tests/unit/sdk/checks/test_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ async def test_validate_sync_async(mock_gql_query_my_query) -> None:
4646
class IFCheckAsync(InfrahubCheck):
4747
query = "my_query"
4848

49-
async def validate(self, data: dict):
49+
async def validate(self, data: dict) -> None:
5050
self.log_error("Not valid")
5151

5252
class IFCheckSync(InfrahubCheck):
5353
query = "my_query"
5454

55-
def validate(self, data: dict):
55+
def validate(self, data: dict) -> None:
5656
self.log_error("Not valid")
5757

5858
check = await IFCheckAsync.init(branch="main")

tests/unit/sdk/test_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_active_branch_returns_correct_branch(temp_dir) -> None:
5050
def test_initialize_repo_raises_error_on_failure(monkeypatch, temp_dir) -> None:
5151
"""Test that an error is raised if the repository cannot be initialized."""
5252

53-
def mock_init(*args, **kwargs): # noqa: ANN002, ANN003
53+
def mock_init(*args, **kwargs) -> None: # noqa: ANN002, ANN003
5454
return None # Simulate failure
5555

5656
monkeypatch.setattr(Repo, "init", mock_init)

0 commit comments

Comments
 (0)