Skip to content

Commit 4356949

Browse files
Suppress pyright default_factory false negative
1 parent 3f655a4 commit 4356949

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/smithy-aws-event-stream/src/smithy_aws_event_stream/events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ class EventMessage:
187187
message.
188188
"""
189189

190-
headers: HEADERS_DICT = field(default_factory=dict)
190+
# Pyright is complaining about the return type of the default_factory here being
191+
# unknown. See https://github.com/microsoft/pyright/issues/10277
192+
headers: HEADERS_DICT = field(default_factory=dict) # pyright: ignore [reportUnknownVariableType]
191193
"""The headers present in the event message.
192194
193195
Sized integer values may be indicated for the purpose of serialization

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies = []
1010
dev = [
1111
"black>=25.1.0",
1212
"docformatter>=1.7.5",
13-
"pyright>=1.1.396",
13+
"pyright>=1.1.398",
1414
"pytest>=8.3.4",
1515
"pytest-asyncio>=0.25.3",
1616
"pytest-cov>=6.0.0",

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)