@@ -220,7 +220,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
220220 attachment_type = convert_attachment_type_to_domain (api_attachment .type )
221221
222222 if attachment_type == AttachmentTypes .IMAGE :
223- attachment_type = cast (Literal [AttachmentTypes .IMAGE ], attachment_type ) # type: ignore[redundant-cast]
223+ attachment_type = cast (
224+ Literal [AttachmentTypes .IMAGE ],
225+ attachment_type ,
226+ ) # type: ignore[redundant-cast]
224227 api_attachment = cast (BotAPIAttachmentImage , api_attachment )
225228 content = decode_rfc2397 (api_attachment .data .content )
226229
@@ -233,7 +236,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
233236 )
234237
235238 if attachment_type == AttachmentTypes .VIDEO :
236- attachment_type = cast (Literal [AttachmentTypes .VIDEO ], attachment_type ) # type: ignore[redundant-cast]
239+ attachment_type = cast (
240+ Literal [AttachmentTypes .VIDEO ],
241+ attachment_type ,
242+ ) # type: ignore[redundant-cast]
237243 api_attachment = cast (BotAPIAttachmentVideo , api_attachment )
238244 content = decode_rfc2397 (api_attachment .data .content )
239245
@@ -247,7 +253,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
247253 )
248254
249255 if attachment_type == AttachmentTypes .DOCUMENT :
250- attachment_type = cast (Literal [AttachmentTypes .DOCUMENT ], attachment_type ) # type: ignore[redundant-cast]
256+ attachment_type = cast (
257+ Literal [AttachmentTypes .DOCUMENT ],
258+ attachment_type ,
259+ ) # type: ignore[redundant-cast]
251260 api_attachment = cast (BotAPIAttachmentDocument , api_attachment )
252261 content = decode_rfc2397 (api_attachment .data .content )
253262
@@ -260,7 +269,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
260269 )
261270
262271 if attachment_type == AttachmentTypes .VOICE :
263- attachment_type = cast (Literal [AttachmentTypes .VOICE ], attachment_type ) # type: ignore[redundant-cast]
272+ attachment_type = cast (
273+ Literal [AttachmentTypes .VOICE ],
274+ attachment_type ,
275+ ) # type: ignore[redundant-cast]
264276 api_attachment = cast (BotAPIAttachmentVoice , api_attachment )
265277 content = decode_rfc2397 (api_attachment .data .content )
266278 attachment_extension = get_attachment_extension_from_encoded_content (
@@ -277,7 +289,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
277289 )
278290
279291 if attachment_type == AttachmentTypes .LOCATION :
280- attachment_type = cast (Literal [AttachmentTypes .LOCATION ], attachment_type ) # type: ignore[redundant-cast]
292+ attachment_type = cast (
293+ Literal [AttachmentTypes .LOCATION ],
294+ attachment_type ,
295+ ) # type: ignore[redundant-cast]
281296 api_attachment = cast (BotAPIAttachmentLocation , api_attachment )
282297
283298 return Location (
@@ -288,7 +303,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
288303 )
289304
290305 if attachment_type == AttachmentTypes .CONTACT :
291- attachment_type = cast (Literal [AttachmentTypes .CONTACT ], attachment_type ) # type: ignore[redundant-cast]
306+ attachment_type = cast (
307+ Literal [AttachmentTypes .CONTACT ],
308+ attachment_type ,
309+ ) # type: ignore[redundant-cast]
292310 api_attachment = cast (BotAPIAttachmentContact , api_attachment )
293311
294312 return Contact (
0 commit comments