Skip to content

Commit b4ea045

Browse files
authored
Merge pull request #87 from opsmill/pog-activate-b018
Activate rule for B018 for useless attribute access
2 parents 2bb8bec + da7cd5d commit b4ea045

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ ignore = [
245245
"B007", # Loop control variable `result` not used within loop body
246246
"B008", # Do not perform function call `typer.Option` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
247247
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
248-
"B018", # Found useless attribute access. Either assign it to a variable or remove it.
249248
"C408", # Unnecessary `dict` call (rewrite as a literal)
250249
"C414", # Unnecessary `list` call within `sorted()`
251250
"FURB110", # Replace ternary `if` expression with `or` operator

tests/unit/sdk/test_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,10 +1309,10 @@ async def test_node_get_relationship_not_in_store(client, location_schema, locat
13091309
node = InfrahubNodeSync(client=client, schema=location_schema, data=location_data01)
13101310

13111311
with pytest.raises(NodeNotFoundError):
1312-
node.primary_tag.peer # pylint: disable=pointless-statement
1312+
_ = node.primary_tag.peer
13131313

13141314
with pytest.raises(NodeNotFoundError):
1315-
node.tags[0].peer # pylint: disable=pointless-statement
1315+
_ = node.tags[0].peer
13161316

13171317

13181318
@pytest.mark.parametrize("client_type", client_types)

0 commit comments

Comments
 (0)