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
12 changes: 5 additions & 7 deletions infrahub_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
from types import TracebackType


# pylint: disable=redefined-builtin disable=too-many-lines

SchemaType = TypeVar("SchemaType", bound=CoreNode)
SchemaTypeSync = TypeVar("SchemaTypeSync", bound=CoreNodeSync)

Expand Down Expand Up @@ -711,7 +709,7 @@ async def filters(
fragment=fragment,
prefetch_relationships=prefetch_relationships,
partial_match=partial_match,
# property=property,
property=property,
)
query = Query(query=query_data)
response = await self.execute_graphql(
Expand Down Expand Up @@ -1147,7 +1145,7 @@ async def allocate_next_ip_address(
async def allocate_next_ip_address(
self,
resource_pool: CoreNode,
kind: type[SchemaType] | None = None, # pylint: disable=unused-argument
kind: type[SchemaType] | None = None, # noqa: ARG002
identifier: str | None = None,
prefix_length: int | None = None,
address_type: str | None = None,
Expand Down Expand Up @@ -1297,7 +1295,7 @@ async def allocate_next_ip_prefix(
async def allocate_next_ip_prefix(
self,
resource_pool: CoreNode,
kind: type[SchemaType] | None = None, # pylint: disable=unused-argument
kind: type[SchemaType] | None = None, # noqa: ARG002
identifier: str | None = None,
prefix_length: int | None = None,
member_type: str | None = None,
Expand Down Expand Up @@ -2181,7 +2179,7 @@ def allocate_next_ip_address(
def allocate_next_ip_address(
self,
resource_pool: CoreNodeSync,
kind: type[SchemaTypeSync] | None = None, # pylint: disable=unused-argument
kind: type[SchemaTypeSync] | None = None, # noqa: ARG002
identifier: str | None = None,
prefix_length: int | None = None,
address_type: str | None = None,
Expand Down Expand Up @@ -2327,7 +2325,7 @@ def allocate_next_ip_prefix(
def allocate_next_ip_prefix(
self,
resource_pool: CoreNodeSync,
kind: type[SchemaTypeSync] | None = None, # pylint: disable=unused-argument
kind: type[SchemaTypeSync] | None = None, # noqa: ARG002
identifier: str | None = None,
prefix_length: int | None = None,
member_type: str | None = None,
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/ctl/branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def create(
sync_with_git: bool = typer.Option(
False, help="Extend the branch to Git and have Infrahub create the branch in connected repositories."
),
isolated: bool = typer.Option(True, hidden=True, help="Set the branch to isolated mode (deprecated)"), # pylint: disable=unused-argument
isolated: bool = typer.Option(True, hidden=True, help="Set the branch to isolated mode (deprecated)"), # noqa: ARG001
_: str = CONFIG_PARAM,
) -> None:
"""Create a new branch."""
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/ctl/cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def transform(
None, help="Variables to pass along with the query. Format key=value key=value."
),
branch: str = typer.Option(None, help="Branch on which to run the transformation"),
debug: bool = False,
debug: bool = False, # noqa: ARG001
_: str = CONFIG_PARAM,
list_available: bool = typer.Option(False, "--list", help="Show available transforms"),
out: str = typer.Option(None, help="Path to a file to save the result."),
Expand Down
6 changes: 3 additions & 3 deletions infrahub_sdk/ctl/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

async def run(
generator_name: str,
path: str,
debug: bool,
path: str, # noqa: ARG001
debug: bool, # noqa: ARG001
list_available: bool,
branch: str | None = None,
variables: list[str] | None = None,
) -> None: # pylint: disable=unused-argument
) -> None:
repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE))

if list_available or not generator_name:
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _read_request(
url: str,
method: HTTPMethod,
headers: dict[str, Any],
timeout: int, # pylint: disable=unused-argument
timeout: int, # noqa: ARG002
payload: dict | None = None,
) -> httpx.Response:
content: bytes | None = None
Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/pytest_plugin/items/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_result_differences(self, computed: Any) -> str | None:
def runtest(self) -> None:
"""Run the test logic."""

def repr_failure(self, excinfo: pytest.ExceptionInfo, style: str | None = None) -> str:
def repr_failure(self, excinfo: pytest.ExceptionInfo, style: str | None = None) -> str: # noqa: ARG002
if isinstance(excinfo.value, InvalidGitRepositoryError):
return f"Invalid Git repository at {excinfo.value}"

Expand Down
2 changes: 1 addition & 1 deletion infrahub_sdk/spec/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class InfrahubObjectFileData(BaseModel):
data: list[dict[str, Any]] = Field(default_factory=list)

@classmethod
def enrich_node(cls, data: dict, context: dict) -> dict:
def enrich_node(cls, data: dict, context: dict) -> dict: # noqa: ARG003
return data

@classmethod
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ no-docstring-rgx = "^(_|test_)"
# Pylint and Black disagree about how to format multi-line arrays; Black wins.
# Rules already covered by RUFF
# - too-many-statements
# - unused-argument
disable = """,
line-too-long,
missing-module-docstring,
Expand All @@ -135,6 +136,7 @@ disable = """,
import-self,
wrong-import-order,
multiple-statements,
unused-argument,
"""

[tool.pylint.miscellaneous]
Expand Down Expand Up @@ -223,7 +225,6 @@ ignore = [
##################################################################################################
# Rules below needs to be Investigated #
##################################################################################################
"ARG", # flake8-unused-arguments
"PT", # flake8-pytest-style
"PGH", # pygrep-hooks
"ERA", # eradicate commented-out code
Expand Down Expand Up @@ -332,6 +333,8 @@ max-complexity = 17
"S101", # Use of assert detected
"S105", # Possible hardcoded password assigned to variable
"S106", # Possible hardcoded password assigned to argument
"ARG001", # Unused function argument
"ARG002", # Unused method argument

##################################################################################################
# Review and change the below later #
Expand Down
Loading