Skip to content

Commit a8cc706

Browse files
committed
style(slack): collapse ms-detect to ternary (ruff SIM108)
1 parent e6e337f commit a8cc706

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/chat_sdk/adapters/slack/adapter.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,10 +827,7 @@ async def handle_webhook(self, request: Any, options: WebhookOptions | None = No
827827
ts_int = int(ts_raw) if ts_raw is not None else None
828828
except (TypeError, ValueError):
829829
ts_int = None
830-
if ts_int is not None and ts_int > 10**11:
831-
ts_seconds = ts_int // 1000
832-
else:
833-
ts_seconds = ts_int
830+
ts_seconds = ts_int // 1000 if ts_int is not None and ts_int > 10**11 else ts_int
834831
if ts_seconds is None or abs(int(time.time()) - ts_seconds) > 300:
835832
self._logger.warn(
836833
"Forwarded socket event outside freshness window",

0 commit comments

Comments
 (0)