Skip to content

Commit 8b0f348

Browse files
committed
fix linters
1 parent 8ef391a commit 8b0f348

File tree

1 file changed

+4
-3
lines changed
  • pydantic_extra_types

1 file changed

+4
-3
lines changed

pydantic_extra_types/s3.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from __future__ import annotations
99

1010
import re
11-
from typing import Any, cast, ClassVar
11+
from typing import Any, ClassVar
1212

1313
from pydantic import GetCoreSchemaHandler
1414
from pydantic_core import core_schema
@@ -47,8 +47,9 @@ def __init__(self, value: str) -> None:
4747
match = self.patt.match(self.value)
4848
if match is None:
4949
raise ValueError(f'Invalid S3 path: {value!r}')
50-
groups = cast(tuple[str, str, str], match.groups())
51-
self.bucket, self.key, self.last_key = groups
50+
self.bucket: str = match.group(1)
51+
self._key: str = match.group(2)
52+
self.last_key: str = match.group(3)
5253

5354
def __str__(self) -> str: # pragma: no cover
5455
return self.value

0 commit comments

Comments
 (0)