Skip to content

Commit c7d8435

Browse files
committed
make lint and type work together
1 parent dd23b21 commit c7d8435

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

guardrails/classes/history/call.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,19 @@ def tree(self) -> Tree:
323323

324324
# Replace the last Validated Output panel if we applied fixes
325325
if self.failed_validations.length > 0 and self.status == pass_status:
326-
previous_panels = tree.children[-1].label.renderable._renderables[:-1] # type: ignore
326+
previous_panels = tree.children[ # type: ignore
327+
-1
328+
].label.renderable._renderables[ # type: ignore
329+
:-1
330+
]
327331
validated_outcome_panel = Panel(
328332
pretty_repr(self.validated_output),
329333
title="Validated Output",
330334
style="on #F0FFF0",
331335
)
332-
tree.children[-1].label.renderable._renderables = previous_panels + ( # type: ignore
336+
tree.children[
337+
-1
338+
].label.renderable._renderables = previous_panels + ( # type: ignore
333339
validated_outcome_panel,
334340
)
335341

tests/unit_tests/validators/test_two_words.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from guardrails.validators import FailResult, PassResult, TwoWords, ValidationResult
3+
from guardrails.validators import FailResult, PassResult, TwoWords
44

55

66
def test_two_words_happy_path():

0 commit comments

Comments
 (0)