From b881f4becdddb15277127c957f121405880e2043 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 6 Apr 2021 12:52:57 -0500 Subject: [PATCH] Improve TypeError message for API initialization --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 4faa558..4ea4d7f 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -96,8 +96,8 @@ class API: if not isinstance(self.parser, Parser): raise TypeError( - '"parser" argument has to be an instance of "Parser". ' - f'It is currently a {type(self.parser)}.' + "parser should be an instance of Parser, not " + + str(type(self.parser)) ) self.session = requests.Session() -- 2.25.1