From 5681b6e9e2372b3bc4b92093fc74adcf496c62c8 Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Sat, 16 Sep 2017 17:10:12 -0230 Subject: [PATCH] zulip_bots: Remove get_bot_doc_path and get_bot_logo_path. These functions were rendered redundant by changes in our approach on how the main repo renders docs and logos contained in the zulip_bots package (see #6103). So, these should now be removed. --- zulip_bots/zulip_bots/lib.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/zulip_bots/zulip_bots/lib.py b/zulip_bots/zulip_bots/lib.py index 21d81fe..edc816f 100644 --- a/zulip_bots/zulip_bots/lib.py +++ b/zulip_bots/zulip_bots/lib.py @@ -22,30 +22,11 @@ def exit_gracefully(signum, frame): # type: (int, Optional[Any]) -> None sys.exit(0) -def get_bot_logo_path(name): - # type: str -> Optional[str] - current_dir = os.path.dirname(os.path.abspath(__file__)) - logo_path_png = os.path.join( - current_dir, 'bots/{bot_name}/logo.png'.format(bot_name=name)) - logo_path_svg = os.path.join( - current_dir, 'bots/{bot_name}/logo.svg'.format(bot_name=name)) - - if os.path.isfile(logo_path_png): - return logo_path_png - elif os.path.isfile(logo_path_svg): - return logo_path_svg - - return None - def get_bots_directory_path(): # type: () -> str current_dir = os.path.dirname(os.path.abspath(__file__)) return os.path.join(current_dir, 'bots') -def get_bot_doc_path(name): - # type: (str) -> str - return os.path.join(get_bots_directory_path(), '{}/doc.md'.format(name)) - class RateLimit(object): def __init__(self, message_limit, interval_limit): # type: (int, int) -> None