@@ -235,7 +235,7 @@ class _PushedRequestSent(_HeadersSent):
235
235
"""
236
236
237
237
238
-
238
+ @ dataclass ( ** kw_only )
239
239
class InformationalResponseReceived (Event ):
240
240
"""
241
241
The InformationalResponseReceived event is fired when an informational
@@ -259,20 +259,20 @@ class InformationalResponseReceived(Event):
259
259
Added ``priority_updated`` property.
260
260
"""
261
261
262
- def __init__ (self ) -> None :
263
- #: The Stream ID for the stream this informational response was made
264
- #: on.
265
- self .stream_id : int | None = None
262
+ stream_id : int
263
+ """The Stream ID for the stream this informational response was made on."""
266
264
267
- #: The headers for this informational response.
268
- self . headers : list [ Header ] | None = None
265
+ headers : list [ Header ] = _LAZY_INIT
266
+ """The headers for this informational response."""
269
267
270
- #: If this response also had associated priority information, the
271
- #: associated :class:`PriorityUpdated <h2.events.PriorityUpdated>`
272
- #: event will be available here.
273
- #:
274
- #: .. versionadded:: 2.4.0
275
- self .priority_updated : PriorityUpdated | None = None
268
+ priority_updated : PriorityUpdated | None = None
269
+ """
270
+ If this response also had associated priority information, the
271
+ associated :class:`PriorityUpdated <h2.events.PriorityUpdated>`
272
+ event will be available here.
273
+
274
+ .. versionadded:: 2.4.0
275
+ """
276
276
277
277
def __repr__ (self ) -> str :
278
278
return f"<InformationalResponseReceived stream_id:{ self .stream_id } , headers:{ self .headers } >"
0 commit comments