From 3c1c65eaf88eae0c4e8e845de7dfe8de6f6eb053 Mon Sep 17 00:00:00 2001 From: lonerz Date: Thu, 29 Dec 2016 08:13:10 +0000 Subject: [PATCH] mypy: Annotate api/integrations/twitter/twitter-bot --- api/integrations/twitter/twitter-bot | 4 +++- tools/run-mypy | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/integrations/twitter/twitter-bot b/api/integrations/twitter/twitter-bot index a5dfc12497..129471d15e 100755 --- a/api/integrations/twitter/twitter-bot +++ b/api/integrations/twitter/twitter-bot @@ -28,12 +28,14 @@ import os import sys import optparse import six.moves.configparser +from six.moves.configparser import ConfigParser import zulip VERSION = "0.9" CONFIGFILE = os.path.expanduser("~/.zulip_twitterrc") def write_config(config, since_id, user): + # type: (ConfigParser, int, int) -> None config.set('twitter', 'since_id', since_id) config.set('twitter', 'user_id', user) with open(CONFIGFILE, 'wb') as configfile: @@ -90,7 +92,7 @@ if not options.twitter_id: parser.error('You must specify --twitter-id') try: - config = six.moves.configparser.ConfigParser() + config = ConfigParser() config.read(CONFIGFILE) consumer_key = config.get('twitter', 'consumer_key') diff --git a/tools/run-mypy b/tools/run-mypy index 90cb86556c..bd4cc81226 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -32,7 +32,6 @@ api/integrations/basecamp/zulip_basecamp_mirror api/integrations/codebase/zulip_codebase_mirror api/integrations/git/post-receive api/integrations/rss/rss-bot -api/integrations/twitter/twitter-bot api/integrations/twitter/twitter-search-bot tools/deprecated/iframe-bot/show-last-messages tools/deprecated/inject-messages/inject-messages