From 29cef40b21e566aaffb836710950c49bccc57166 Mon Sep 17 00:00:00 2001 From: Christopher Gerber Date: Mon, 18 Nov 2024 14:18:27 -0800 Subject: [PATCH] formatting --- twitter-langchain/examples/chatbot/chatbot.py | 1 - twitter-langchain/tests/actions/test_account_details.py | 6 ++---- twitter-langchain/tests/actions/test_account_mentions.py | 7 +++---- twitter-langchain/tests/actions/test_post_tweet.py | 5 ++--- twitter-langchain/tests/actions/test_post_tweet_reply.py | 5 ++--- twitter-langchain/tests/factories/twitter_factory.py | 1 + 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/twitter-langchain/examples/chatbot/chatbot.py b/twitter-langchain/examples/chatbot/chatbot.py index 3220fa351..c2c4fd497 100644 --- a/twitter-langchain/examples/chatbot/chatbot.py +++ b/twitter-langchain/examples/chatbot/chatbot.py @@ -1,4 +1,3 @@ -import os import sys import time diff --git a/twitter-langchain/tests/actions/test_account_details.py b/twitter-langchain/tests/actions/test_account_details.py index d01e69705..d14918218 100644 --- a/twitter-langchain/tests/actions/test_account_details.py +++ b/twitter-langchain/tests/actions/test_account_details.py @@ -1,11 +1,9 @@ -from unittest.mock import patch from json import dumps +from unittest.mock import patch import tweepy - from cdp_agentkit_core.actions.social.twitter.account_details import ( account_details, - AccountDetailsInput, ) MOCK_ID = 1234 @@ -27,7 +25,7 @@ def test_account_details_success(tweepy_factory): mock_client_result = { "data": { "id": MOCK_ID, - "name": MOCK_USERNAME, + "name": MOCK_USERNAME, "username": MOCK_USERNAME, }, } diff --git a/twitter-langchain/tests/actions/test_account_mentions.py b/twitter-langchain/tests/actions/test_account_mentions.py index 9b201d4d5..a07f59244 100644 --- a/twitter-langchain/tests/actions/test_account_mentions.py +++ b/twitter-langchain/tests/actions/test_account_mentions.py @@ -1,12 +1,11 @@ -from unittest.mock import patch from json import dumps +from unittest.mock import patch import pytest import tweepy - from cdp_agentkit_core.actions.social.twitter.account_mentions import ( - account_mentions, AccountMentionsInput, + account_mentions, ) MOCK_ACCOUNT_ID = "1234" @@ -58,4 +57,4 @@ def test_account_mentions_failure(tweepy_factory): with patch.object(mock_client, "get_users_mentions", side_effect=expected_result) as mock_get_users_mentions: response = account_mentions(mock_client, MOCK_ACCOUNT_ID) - assert response == expected_response \ No newline at end of file + assert response == expected_response diff --git a/twitter-langchain/tests/actions/test_post_tweet.py b/twitter-langchain/tests/actions/test_post_tweet.py index 83577d135..25df5c8db 100644 --- a/twitter-langchain/tests/actions/test_post_tweet.py +++ b/twitter-langchain/tests/actions/test_post_tweet.py @@ -1,12 +1,11 @@ -from unittest.mock import patch from json import dumps +from unittest.mock import patch import pytest import tweepy - from cdp_agentkit_core.actions.social.twitter.post_tweet import ( - post_tweet, PostTweetInput, + post_tweet, ) MOCK_TWEET = "hello, world!" diff --git a/twitter-langchain/tests/actions/test_post_tweet_reply.py b/twitter-langchain/tests/actions/test_post_tweet_reply.py index 784f85c9f..59e9d03f5 100644 --- a/twitter-langchain/tests/actions/test_post_tweet_reply.py +++ b/twitter-langchain/tests/actions/test_post_tweet_reply.py @@ -1,12 +1,11 @@ -from unittest.mock import patch from json import dumps +from unittest.mock import patch import pytest import tweepy - from cdp_agentkit_core.actions.social.twitter.post_tweet_reply import ( - post_tweet_reply, PostTweetReplyInput, + post_tweet_reply, ) MOCK_TWEET_ID = "1234" diff --git a/twitter-langchain/tests/factories/twitter_factory.py b/twitter-langchain/tests/factories/twitter_factory.py index 7fce9c630..44aad5504 100644 --- a/twitter-langchain/tests/factories/twitter_factory.py +++ b/twitter-langchain/tests/factories/twitter_factory.py @@ -3,6 +3,7 @@ import pytest import tweepy + @pytest.fixture def tweepy_factory(): """Create and return a factory for tweepy mock fixtures."""