From 5f4274541d25ea83c2f015ac29bfdeaa490f0fe5 Mon Sep 17 00:00:00 2001 From: PieterCK Date: Wed, 26 Jun 2024 16:25:03 +0700 Subject: [PATCH] salesforce bot: Suppress mypy rising linting error. This is an optional commit that ignores linting errors in an unrelated file from #826. --- zulip_bots/zulip_bots/bots/salesforce/salesforce.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/salesforce/salesforce.py b/zulip_bots/zulip_bots/bots/salesforce/salesforce.py index 224aee5fa..8ff7cc6b3 100644 --- a/zulip_bots/zulip_bots/bots/salesforce/salesforce.py +++ b/zulip_bots/zulip_bots/bots/salesforce/salesforce.py @@ -5,6 +5,7 @@ from typing import Any, Collection, Dict, List import simple_salesforce +from simple_salesforce import Salesforce # type: ignore[attr-defined] from zulip_bots.bots.salesforce.utils import commands, default_query, link_query, object_types from zulip_bots.lib import BotHandler @@ -73,9 +74,7 @@ def format_result( return output -def query_salesforce( - arg: str, salesforce: simple_salesforce.Salesforce, command: Dict[str, Any] -) -> str: +def query_salesforce(arg: str, salesforce: Salesforce, command: Dict[str, Any]) -> str: arg = arg.strip() qarg = arg.split(" -", 1)[0] split_args: List[str] = [] @@ -164,7 +163,7 @@ def get_salesforce_response(self, content: str) -> str: def initialize(self, bot_handler: BotHandler) -> None: self.config_info = bot_handler.get_config_info("salesforce") try: - self.sf = simple_salesforce.Salesforce( + self.sf = Salesforce( username=self.config_info["username"], password=self.config_info["password"], security_token=self.config_info["security_token"],