mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -5,7 +5,9 @@ import requests
|
||||
|
||||
def send_slack_message(message_body: str, slack_url: str) -> None:
|
||||
headers = {"Content-Type": "application/json"}
|
||||
response = requests.post(slack_url, json={"text": message_body}, headers=headers)
|
||||
response = requests.post(
|
||||
slack_url, json={"text": message_body}, headers=headers, timeout=10
|
||||
)
|
||||
if response.status_code != 200:
|
||||
msg = (
|
||||
"Request to slack returned an error "
|
||||
|
Reference in New Issue
Block a user