diff --git a/backend/infrahub/graphql/resolver.py b/backend/infrahub/graphql/resolver.py index 3b1eb92fd7..bbbe639a04 100644 --- a/backend/infrahub/graphql/resolver.py +++ b/backend/infrahub/graphql/resolver.py @@ -17,7 +17,7 @@ from infrahub.graphql import GraphqlContext -async def default_resolver(*args: Any, **kwargs): +async def default_resolver(*args: Any, **kwargs) -> dict | list[dict] | None: """Not sure why but the default resolver returns sometime 4 positional args and sometime 2. When it returns 4, they are organized as follow diff --git a/backend/infrahub/graphql/utils.py b/backend/infrahub/graphql/utils.py index 448d7ace0e..48b15de931 100644 --- a/backend/infrahub/graphql/utils.py +++ b/backend/infrahub/graphql/utils.py @@ -69,7 +69,7 @@ def selected_field_names_fast( return selected_field_names(selection_set, context, runtime_type) -def selected_field_names_naive(selection_set: SelectionSetNode): +def selected_field_names_naive(selection_set: SelectionSetNode) -> list: """Get the list of field names that are selected at the current level. Does not include nested names. Limitations: diff --git a/pyproject.toml b/pyproject.toml index 6e1458e7ef..eff6ef414b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -595,13 +595,6 @@ max-complexity = 33 "ANN401", # Dynamically typed expressions (typing.Any) are disallowed ] -"backend/infrahub/graphql/resolver.py" = [ - ################################################################################################## - # Review and change the below later # - ################################################################################################## - "ANN201", # Missing return type annotation for public function -] - "backend/infrahub/graphql/schema.py" = [ ################################################################################################## # Review and change the below later # @@ -609,13 +602,6 @@ max-complexity = 33 "ANN201", # Missing return type annotation for public function ] -"backend/infrahub/graphql/utils.py" = [ - ################################################################################################## - # Review and change the below later # - ################################################################################################## - "ANN201", # Missing return type annotation for public function -] - "backend/tests/**.py" = [ "S101", # Use of assert detected "S105", # Possible hardcoded password assigned to variable