From ab192fe937a88c5c33b6348b5ba64c69b0ea2662 Mon Sep 17 00:00:00 2001 From: Alena Volkova Date: Tue, 10 Oct 2017 00:46:31 -0400 Subject: [PATCH] mypy: zulip: Annotate integrations/perforce/zulip_perforce_config.py. --- tools/run-mypy | 1 - zulip/integrations/perforce/zulip_perforce_config.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run-mypy b/tools/run-mypy index cb8249f..b5308a9 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -19,7 +19,6 @@ os.chdir(os.path.dirname(TOOLS_DIR)) sys.path.append(os.path.dirname(TOOLS_DIR)) exclude = """ -zulip/integrations/perforce/zulip_perforce_config.py zulip/integrations/perforce/git_p4.py zulip/integrations/svn/zulip_svn_config.py zulip/integrations/zephyr/process_ccache diff --git a/zulip/integrations/perforce/zulip_perforce_config.py b/zulip/integrations/perforce/zulip_perforce_config.py index 6827cc9..7c5c63e 100644 --- a/zulip/integrations/perforce/zulip_perforce_config.py +++ b/zulip/integrations/perforce/zulip_perforce_config.py @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +from typing import Dict, Optional, Text # Change these values to configure authentication for the plugin ZULIP_USER = "p4-bot@example.com" @@ -50,6 +51,7 @@ P4_WEB = None # * stream "depot_subdirectory-commits" # * subject "change_root" def commit_notice_destination(path, changelist): + # type: (Text, int) -> Optional[Dict[Text, Text]] dirs = path.split('/') if len(dirs) >= 4 and dirs[3] not in ("*", "..."): directory = dirs[3]