Skip to content

Commit 2ad38f2

Browse files
authored
Linting: RUF100 Unused noqa directive (#6571)
1 parent afd944a commit 2ad38f2

File tree

25 files changed

+27
-37
lines changed

25 files changed

+27
-37
lines changed

backend/infrahub/cli/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ async def selected_export_cmd(
449449
ctx: typer.Context,
450450
kinds: list[str] = typer.Option([], help="Node kinds to export"), # noqa: B008
451451
uuids: list[str] = typer.Option([], help="UUIDs of nodes to export"), # noqa: B008
452-
query_limit: int = typer.Option(1000, help="Maximum batch size of export query"), # noqa: B008
452+
query_limit: int = typer.Option(1000, help="Maximum batch size of export query"),
453453
export_dir: Path = typer.Option(Path("infrahub-exports"), help="Path of directory to save exports"), # noqa: B008
454454
config_file: str = typer.Argument("infrahub.toml", envvar="INFRAHUB_CONFIG"),
455455
) -> None:

backend/infrahub/core/convert_object_type/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def convert_object_type(
9797
if not isinstance(node_schema, NodeSchema):
9898
raise ValueError(f"Only a node with a NodeSchema can be converted, got {type(node_schema)}")
9999

100-
async with db.start_transaction() as dbt: # noqa: PLR1702
100+
async with db.start_transaction() as dbt:
101101
deleted_node_out_rels_peer_ids = await get_out_rels_peers_ids(node=node, db=dbt)
102102
deleted_node_unidir_rels_peer_ids = await get_unidirectional_rels_peers_ids(node=node, db=dbt, branch=branch)
103103

backend/infrahub/core/diff/query/time_range_query.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: # noqa
3737
"from_time": self.from_time.to_string(),
3838
"to_time": self.to_time.to_string(),
3939
}
40-
# ruff: noqa: E501
4140
query = """
4241
// get the roots of all diffs in the query
4342
MATCH (diff_root:DiffRoot)

backend/infrahub/core/migrations/graph/m013_convert_git_password_credential.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: dict[str, Any]) -> No
7777

7878
self.params["rel_identifier"] = "gitrepository__credential"
7979

80-
# ruff: noqa: E501
8180
query = """
8281
// --------------------------------
8382
// Identify the git repositories to convert
@@ -194,7 +193,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: dict[str, Any]) -> No
194193

195194
self.params["current_time"] = self.at.to_string()
196195

197-
# ruff: noqa: E501
198196
query = """
199197
// --------------------------------
200198
// Identify the git repositories to convert

backend/infrahub/core/migrations/query/relationship_duplicate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: dict[str, Any]) -> No
117117

118118
self.add_to_query(self.render_match())
119119

120-
# ruff: noqa: E501
121120
query = """
122121
CALL (source, rel, destination) {
123122
MATCH path = (source)-[r1:IS_RELATED]-(rel)-[r2:IS_RELATED]-(destination)

backend/infrahub/core/migrations/schema/node_remove.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: dict[str, Any]) -> No
5858

5959
node_remove_query = self.render_node_remove_query(branch_filter=branch_filter)
6060

61-
# ruff: noqa: E501
6261
query = """
6362
// Find all the active nodes
6463
MATCH (node:%(node_kind)s)

backend/infrahub/core/node/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class BaseNodeOptions(BaseOptions):
5252

5353

5454
class ObjectNodeMeta(BaseNodeMeta):
55-
def __new__(mcs, name_, bases, namespace, **options): # noqa: N804
55+
def __new__(mcs, name_, bases, namespace, **options):
5656
# Note: it's safe to pass options as keyword arguments as they are still type-checked by NodeOptions.
5757

5858
# We create this type, to then overload it with the dataclass attrs

backend/infrahub/core/query/relationship.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ def __init__(self, node_id: str, **kwargs):
10351035
self.node_id = node_id
10361036
super().__init__(**kwargs)
10371037

1038-
async def query_init(self, db: InfrahubDatabase, **kwargs) -> None: # noqa: ARG002
1038+
async def query_init(self, db: InfrahubDatabase, **kwargs) -> None:
10391039
self.params["source_id"] = kwargs["node_id"]
10401040
self.params["branch"] = self.branch.name
10411041

backend/infrahub/core/schema/generated/attribute_schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
from infrahub.core.constants import AllowOverrideType, BranchSupportType, HashableModelState
1010
from infrahub.core.models import HashableModel
1111
from infrahub.core.schema.attribute_parameters import (
12-
AttributeParameters, # noqa: TC001
13-
NumberAttributeParameters, # noqa: TC001
14-
NumberPoolParameters, # noqa: TC001
15-
TextAttributeParameters, # noqa: TC001
12+
AttributeParameters,
13+
NumberAttributeParameters,
14+
NumberPoolParameters,
15+
TextAttributeParameters,
1616
)
1717
from infrahub.core.schema.computed_attribute import ComputedAttribute # noqa: TC001
1818
from infrahub.core.schema.dropdown import DropdownChoice # noqa: TC001

backend/infrahub/core/schema/generated/relationship_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RelationshipDeleteBehavior,
1313
RelationshipDirection,
1414
RelationshipKind,
15-
) # noqa: TC001
15+
)
1616
from infrahub.core.models import HashableModel
1717

1818

0 commit comments

Comments
 (0)