mypy: zulip_bots: Fix errors in zulip_bots/provision.py.

This commit is contained in:
Alena Volkova 2017-10-11 19:56:42 -04:00
parent 3a20dee621
commit 47d8ab8f9a
2 changed files with 3 additions and 2 deletions

View file

@ -22,7 +22,6 @@ exclude = """
zulip/integrations/perforce/git_p4.py
zulip_bots/zulip_bots/bots
zulip_bots/zulip_bots/provision.py
zulip_bots/zulip_bots/run.py
zulip_bots/zulip_bots/test_lib.py
zulip_bots/zulip_bots/test_run.py

View file

@ -8,6 +8,7 @@ import os
import sys
import glob
import pip
from typing import Iterator
def provision_bot(path_to_bot, force):
# type: (str, bool) -> None
@ -35,6 +36,7 @@ def provision_bot(path_to_bot, force):
def parse_args(available_bots):
# type: (Iterator[str]) -> argparse.Namespace
usage = """
Installs dependencies of bots in the bots/<bot_name>
directories. Add a requirements.txt file in a bot's folder
@ -72,7 +74,7 @@ def main():
# type: () -> None
current_dir = os.path.dirname(os.path.abspath(__file__))
bots_dir = os.path.join(current_dir, "bots")
bots_subdirs = map(os.path.abspath, glob.glob(bots_dir + '/*'))
bots_subdirs = map(lambda d: os.path.abspath(d), glob.glob(bots_dir + '/*'))
available_bots = filter(lambda d: os.path.isdir(d), bots_subdirs)
options = parse_args(available_bots)