Skip to content

Commit 69ae839

Browse files
chore: update .pre-commit-config.yaml (#240)
1 parent 81935d3 commit 69ae839

File tree

4 files changed

+20
-22
lines changed

4 files changed

+20
-22
lines changed

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: '^.*\.(md|MD)$'
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.0.1
4+
rev: v4.5.0
55
hooks:
66
- id: trailing-whitespace
77
- id: check-added-large-files
@@ -10,7 +10,7 @@ repos:
1010
args: ["--fix=lf"]
1111

1212
- repo: https://github.com/pycqa/isort
13-
rev: 5.12.0
13+
rev: 5.13.2
1414
hooks:
1515
- id: isort
1616
args:
@@ -25,7 +25,7 @@ repos:
2525
]
2626

2727
- repo: https://github.com/myint/autoflake.git
28-
rev: v2.3.0
28+
rev: v2.3.1
2929
hooks:
3030
- id: autoflake
3131
args:
@@ -36,18 +36,18 @@ repos:
3636
]
3737

3838
- repo: https://github.com/psf/black
39-
rev: "23.3.0"
39+
rev: "24.4.0"
4040
hooks:
4141
- id: black
4242

4343
- repo: https://github.com/asottile/pyupgrade
44-
rev: v2.29.1
44+
rev: v3.15.1
4545
hooks:
4646
- id: pyupgrade
4747
args: ["--py37-plus", "--keep-runtime-typing"]
4848

4949
- repo: https://github.com/commitizen-tools/commitizen
50-
rev: v2.20.0
50+
rev: v3.22.0
5151
hooks:
5252
- id: commitizen
5353
stages: [commit-msg]

storage3/__init__.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
@overload
1616
def create_client(
1717
url: str, headers: dict[str, str], *, is_async: Literal[True]
18-
) -> AsyncStorageClient:
19-
...
18+
) -> AsyncStorageClient: ...
2019

2120

2221
@overload
2322
def create_client(
2423
url: str, headers: dict[str, str], *, is_async: Literal[False]
25-
) -> SyncStorageClient:
26-
...
24+
) -> SyncStorageClient: ...
2725

2826

2927
def create_client(

storage3/_async/file_api.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ async def create_signed_url(
167167
json=json,
168168
)
169169
data = response.json()
170-
data[
171-
"signedURL"
172-
] = f"{self._client.base_url}{cast(str, data['signedURL']).lstrip('/')}"
170+
data["signedURL"] = (
171+
f"{self._client.base_url}{cast(str, data['signedURL']).lstrip('/')}"
172+
)
173173
return data
174174

175175
async def create_signed_urls(
@@ -196,9 +196,9 @@ async def create_signed_urls(
196196
)
197197
data = response.json()
198198
for item in data:
199-
item[
200-
"signedURL"
201-
] = f"{self._client.base_url}{cast(str, item['signedURL']).lstrip('/')}"
199+
item["signedURL"] = (
200+
f"{self._client.base_url}{cast(str, item['signedURL']).lstrip('/')}"
201+
)
202202
return data
203203

204204
async def get_public_url(self, path: str, options: URLOptions = {}) -> str:

storage3/_sync/file_api.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ def create_signed_url(
165165
json=json,
166166
)
167167
data = response.json()
168-
data[
169-
"signedURL"
170-
] = f"{self._client.base_url}{cast(str, data['signedURL']).lstrip('/')}"
168+
data["signedURL"] = (
169+
f"{self._client.base_url}{cast(str, data['signedURL']).lstrip('/')}"
170+
)
171171
return data
172172

173173
def create_signed_urls(
@@ -194,9 +194,9 @@ def create_signed_urls(
194194
)
195195
data = response.json()
196196
for item in data:
197-
item[
198-
"signedURL"
199-
] = f"{self._client.base_url}{cast(str, item['signedURL']).lstrip('/')}"
197+
item["signedURL"] = (
198+
f"{self._client.base_url}{cast(str, item['signedURL']).lstrip('/')}"
199+
)
200200
return data
201201

202202
def get_public_url(self, path: str, options: URLOptions = {}) -> str:

0 commit comments

Comments
 (0)