Skip to content

Commit b997e3a

Browse files
committed
remove typing ignore statements
1 parent 32db310 commit b997e3a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

infrahub_sdk/ctl/branch.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from ..utils import calculate_time_diff, decode_json
1212
from .client import initialize_client
1313
from .parameters import CONFIG_PARAM
14+
from ..protocols import CoreProposedChange
1415
from .utils import catch_exception
1516

1617
if TYPE_CHECKING:
@@ -277,7 +278,10 @@ async def report( # noqa: PLR0915
277278

278279
# Fetch proposed changes for the branch
279280
proposed_changes = await client.filters(
280-
kind="CoreProposedChange", source_branch__value=branch_name, include=["created_by"], prefetch_relationships=True
281+
kind=CoreProposedChange, # type: ignore[type-abstract]
282+
source_branch__value=branch_name,
283+
include=["created_by"],
284+
prefetch_relationships=True
281285
)
282286

283287
# Print proposed changes section
@@ -289,15 +293,15 @@ async def report( # noqa: PLR0915
289293
proposal_table.add_column(justify="right")
290294

291295
# Extract data from node
292-
proposal_table.add_row("Name", pc.name.value) # type: ignore[union-attr]
293-
proposal_table.add_row("State", str(pc.state.value)) # type: ignore[union-attr]
294-
proposal_table.add_row("Is draft", "Yes" if pc.is_draft.value else "No") # type: ignore[union-attr]
296+
proposal_table.add_row("Name", pc.name.value)
297+
proposal_table.add_row("State", str(pc.state.value))
298+
proposal_table.add_row("Is draft", "Yes" if pc.is_draft.value else "No")
295299
proposal_table.add_row("Created by", pc.created_by.peer.name.value) # type: ignore[union-attr]
296-
proposal_table.add_row("Created at", format_timestamp(str(pc.created_by.updated_at))) # type: ignore[union-attr]
297-
proposal_table.add_row("Approvals", str(len(pc.approved_by.peers))) # type: ignore[union-attr]
298-
proposal_table.add_row("Rejections", str(len(pc.rejected_by.peers))) # type: ignore[union-attr]
300+
proposal_table.add_row("Created at", format_timestamp(str(pc.created_by.updated_at)))
301+
proposal_table.add_row("Approvals", str(len(pc.approved_by.peers)))
302+
proposal_table.add_row("Rejections", str(len(pc.rejected_by.peers)))
299303

300-
console.print(f"Proposed change: {pc.name.value}") # type: ignore[union-attr]
304+
console.print(f"Proposed change: {pc.name.value}")
301305
console.print(proposal_table)
302306
console.print()
303307
else:

0 commit comments

Comments
 (0)