Skip to content

Commit

Permalink
address E721, type comparison w/o isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
mattf committed May 14, 2024
1 parent e0c3188 commit 482bb0b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_messages(
) -> None:
if not system and not exchange:
pytest.skip("No messages to test")
if len(exchange) == 2 and type(exchange[0]) == type(exchange[1]):
if len(exchange) == 2 and isinstance(exchange[0], type(exchange[1])):
pytest.skip("Known issue, messages types must alternate")
chat = ChatNVIDIA(model=chat_model, max_tokens=36).mode(**mode)
response = chat.invoke(system + exchange)
Expand Down

0 comments on commit 482bb0b

Please sign in to comment.