Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 5
ignore:
- dependency-name: "black"
update-types:
- version-update:semver-patch
- version-update:semver-minor
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def setUp(self):
if self.channel_id is None:
millis = int(round(time.time() * 1000))
channel_name = f"private-test-channel-{millis}"
self.channel_id = client.conversations_create(name=channel_name, is_private=True,)[
self.channel_id = client.conversations_create(
name=channel_name,
is_private=True,
)[
"channel"
]["id"]

Expand Down
7 changes: 6 additions & 1 deletion integration_tests/web/test_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ def tearDown(self):

def test_sync(self):
client = self.sync_client
user_id = list(filter(lambda u: not u["deleted"] and "bot_id" not in u, client.users_list(limit=50)["members"],))[
user_id = list(
filter(
lambda u: not u["deleted"] and "bot_id" not in u,
client.users_list(limit=50)["members"],
)
)[
0
]["id"]

Expand Down
2 changes: 1 addition & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pytest-cov>=2,<8
flake8>=5.0.4,<8
# Don't change this version without running CI builds;
# The latest version may not be available for older Python runtime
black==22.10.0;
black==23.3.0;
click==8.0.4 # black is affected by https://github.com/pallets/click/issues/2225
psutil>=6.0.0,<8
# used only under slack_sdk/*_store
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* `slack_sdk.scim.v1.async_client`

"""

import logging
from logging import NullHandler

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/aiohttp_version_checker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Internal module for checking aiohttp compatibility of async modules"""

import logging
from typing import Callable

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/audit_logs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Refer to https://docs.slack.dev/tools/python-slack-sdk/audit-logs for details.
"""

from .v1.client import AuditLogsClient
from .v1.response import AuditLogsResponse

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/oauth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

https://docs.slack.dev/tools/python-slack-sdk/oauth
"""

from .authorize_url_generator import AuthorizeUrlGenerator
from .authorize_url_generator import OpenIDConnectAuthorizeUrlGenerator
from .installation_store import InstallationStore
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/oauth/installation_store/installation_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Refer to https://docs.slack.dev/tools/python-slack-sdk/oauth for details.
"""

from logging import Logger
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/oauth/state_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Refer to https://docs.slack.dev/tools/python-slack-sdk/oauth for details.
"""

# from .amazon_s3_state_store import AmazonS3OAuthStateStore
from .file import FileOAuthStateStore
from .state_store import OAuthStateStore
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/proxy_env_variable_loader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Internal module for loading proxy-related env variables"""

import logging
import os
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/rtm_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A Python module for interacting with Slack's RTM API."""

import inspect
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/scim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Refer to https://docs.slack.dev/tools/python-slack-sdk/scim for details.
"""

from .v1.client import SCIMClient
from .v1.response import SCIMResponse
from .v1.response import SearchUsersResponse, ReadUserResponse
Expand Down
14 changes: 8 additions & 6 deletions slack_sdk/scim/v1/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ async def patch_user(self, id: str, partial_user: Union[Dict[str, Any], User]) -
await self.api_call(
http_verb="PATCH",
path=f"Users/{quote(id)}",
body_params=partial_user.to_dict()
if isinstance(partial_user, User)
else _to_dict_without_not_given(partial_user),
body_params=(
partial_user.to_dict() if isinstance(partial_user, User) else _to_dict_without_not_given(partial_user)
),
)
)

Expand Down Expand Up @@ -214,9 +214,11 @@ async def patch_group(self, id: str, partial_group: Union[Dict[str, Any], Group]
await self.api_call(
http_verb="PATCH",
path=f"Groups/{quote(id)}",
body_params=partial_group.to_dict()
if isinstance(partial_group, Group)
else _to_dict_without_not_given(partial_group),
body_params=(
partial_group.to_dict()
if isinstance(partial_group, Group)
else _to_dict_without_not_given(partial_group)
),
)
)

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/socket_mode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

https://docs.slack.dev/apis/events-api/using-socket-mode/
"""

from .builtin import SocketModeClient

__all__ = [
Expand Down
1 change: 1 addition & 0 deletions slack_sdk/web/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""The Slack Web API allows you to build applications that interact with Slack
in more complex ways than the integrations we provide out of the box."""

from .client import WebClient
from .slack_response import SlackResponse

Expand Down
1 change: 1 addition & 0 deletions slack_sdk/webhook/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""You can use slack_sdk.webhook.WebhookClient for Incoming Webhooks
and message responses using response_url in payloads.
"""

# from .async_client import AsyncWebhookClient
from .client import WebhookClient
from .webhook_response import WebhookResponse
Expand Down