Skip to content

Commit

Permalink
salesforce_bot: Ignore outdated my-py linting error.
Browse files Browse the repository at this point in the history
The github action running the tests uses Python 3.8.18.
When running ./tools/run-mypy using this Python version
there will be linting errors related to importing the
'Salesforce' class. However, this is not a problem when
running the mypy linter under Python 3.10.

This commit ignores these linting error just so that
the main PR #826 can pass the github actions tests.
I wouldn't recommend merging this commit to permanently
fix this issue. Instead, it might be better to update
the github actions to use a more recent Python version.
  • Loading branch information
PieterCK committed Jun 26, 2024
1 parent bc44575 commit add6643
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zulip_bots/zulip_bots/bots/salesforce/salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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] = []
Expand Down Expand Up @@ -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"],
Expand Down

0 comments on commit add6643

Please sign in to comment.