Skip to content

Commit a4e00a0

Browse files
shchekleinclaude
andcommitted
fix: guard None client_kwargs when unpacking for s3 client
mypy 2.1.0 flags `**client_kwargs` where client_kwargs is dict | None (factory.py:203). It's also a latent runtime crash: version_aware=True with client_kwargs=None would raise TypeError. Default to an empty dict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3943d3f commit a4e00a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pytest_servers/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def s3(
200200
from botocore.session import Session
201201

202202
session = Session()
203-
client = session.create_client("s3", **client_kwargs)
203+
client = session.create_client("s3", **(client_kwargs or {}))
204204
client.create_bucket(
205205
Bucket=bucket_name,
206206
ACL="public-read",

0 commit comments

Comments
 (0)