@@ -220,10 +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 (
223+ attachment_type = cast ( # type: ignore[redundant-cast]
224224 Literal [AttachmentTypes .IMAGE ],
225225 attachment_type ,
226- ) # type: ignore[redundant-cast]
226+ )
227227 api_attachment = cast (BotAPIAttachmentImage , api_attachment )
228228 content = decode_rfc2397 (api_attachment .data .content )
229229
@@ -236,10 +236,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
236236 )
237237
238238 if attachment_type == AttachmentTypes .VIDEO :
239- attachment_type = cast (
239+ attachment_type = cast ( # type: ignore[redundant-cast]
240240 Literal [AttachmentTypes .VIDEO ],
241241 attachment_type ,
242- ) # type: ignore[redundant-cast]
242+ )
243243 api_attachment = cast (BotAPIAttachmentVideo , api_attachment )
244244 content = decode_rfc2397 (api_attachment .data .content )
245245
@@ -253,10 +253,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
253253 )
254254
255255 if attachment_type == AttachmentTypes .DOCUMENT :
256- attachment_type = cast (
256+ attachment_type = cast ( # type: ignore[redundant-cast]
257257 Literal [AttachmentTypes .DOCUMENT ],
258258 attachment_type ,
259- ) # type: ignore[redundant-cast]
259+ )
260260 api_attachment = cast (BotAPIAttachmentDocument , api_attachment )
261261 content = decode_rfc2397 (api_attachment .data .content )
262262
@@ -269,10 +269,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
269269 )
270270
271271 if attachment_type == AttachmentTypes .VOICE :
272- attachment_type = cast (
272+ attachment_type = cast ( # type: ignore[redundant-cast]
273273 Literal [AttachmentTypes .VOICE ],
274274 attachment_type ,
275- ) # type: ignore[redundant-cast]
275+ )
276276 api_attachment = cast (BotAPIAttachmentVoice , api_attachment )
277277 content = decode_rfc2397 (api_attachment .data .content )
278278 attachment_extension = get_attachment_extension_from_encoded_content (
@@ -289,10 +289,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
289289 )
290290
291291 if attachment_type == AttachmentTypes .LOCATION :
292- attachment_type = cast (
292+ attachment_type = cast ( # type: ignore[redundant-cast]
293293 Literal [AttachmentTypes .LOCATION ],
294294 attachment_type ,
295- ) # type: ignore[redundant-cast]
295+ )
296296 api_attachment = cast (BotAPIAttachmentLocation , api_attachment )
297297
298298 return Location (
@@ -303,10 +303,10 @@ def convert_api_attachment_to_domain( # noqa: WPS212
303303 )
304304
305305 if attachment_type == AttachmentTypes .CONTACT :
306- attachment_type = cast (
306+ attachment_type = cast ( # type: ignore[redundant-cast]
307307 Literal [AttachmentTypes .CONTACT ],
308308 attachment_type ,
309- ) # type: ignore[redundant-cast]
309+ )
310310 api_attachment = cast (BotAPIAttachmentContact , api_attachment )
311311
312312 return Contact (
0 commit comments