8000 chore: relax typing constraints for response action · python-gitlab/python-gitlab@f430078 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit f430078

Browse files
nejchmax-wittig
authored andcommitted
chore: relax typing constraints for response action
1 parent 7f6fd5c commit f430078

File tree

11 files changed

+22
-22
lines changed

11 files changed

+22
-22
lines changed

gitlab/mixins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def download(
640640
def download(
641641
self,
642642
streamed: Literal[True] = True,
643-
action: Optional[Callable[[bytes], None]] = None,
643+
action: Optional[Callable[[bytes], Any]] = None,
644644
chunk_size: int = 1024,
645645
*,
646646
iterator: Literal[False] = False,
@@ -652,7 +652,7 @@ def download(
652652
def download(
653653
self,
654654
streamed: bool = False,
655-
action: Optional[Callable[[bytes], None]] = None,
655+
action: Optional[Callable[[bytes], Any]] = None,
656656
chunk_size: int = 1024,
657657
*,
658658
iterator: bool = False,

gitlab/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def format(self, record: logging.LogRecord) -> str:
7777
def response_content(
7878
response: requests.Response,
7979
streamed: bool,
80-
action: Optional[Callable[[bytes], None]],
80+
action: Optional[Callable[[bytes], Any]],
8181
chunk_size: int,
8282
*,
8383
iterator: bool,

gitlab/v4/objects/artifacts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def download(
8484
ref_name: str,
8585
job: str,
8686
streamed: Literal[True] = True,
87-
action: Optional[Callable[[bytes], None]] = None,
87+
action: Optional[Callable[[bytes], Any]] = None,
8888
chunk_size: int = 1024,
8989
*,
9090
iterator: Literal[False] = False,
@@ -102,7 +102,7 @@ def download(
102102
ref_name: str,
103103
job: str,
104104
streamed: bool = False,
105-
action: Optional[Callable[[bytes], None]] = None,
105+
action: Optional[Callable[[bytes], Any]] = None,
106106
chunk_size: int = 1024,
107107
*,
108108
iterator: bool = False,
@@ -177,7 +177,7 @@ def raw(
177177
artifact_path: str,
178178
job: str,
179179
streamed: Literal[True] = True,
180-
action: Optional[Callable[[bytes], None]] = None,
180+
action: Optional[Callable[[bytes], Any]] = None,
181181
chunk_size: int = 1024,
182182
*,
183183
iterator: Literal[False] = False,
@@ -195,7 +195,7 @@ def raw(
195195
artifact_path: str,
196196
job: str,
197197
streamed: bool = False,
198-
action: Optional[Callable[[bytes], None]] = None,
198+
action: Optional[Callable[[bytes], Any]] = None,
199199
chunk_size: int = 1024,
200200
*,
201201
iterator: bool = False,

gitlab/v4/objects/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def raw(
308308
file_path: str,
309309
ref: Optional[str] = None,
310310
streamed: Literal[True] = True,
311-
action: Optional[Callable[[bytes], None]] = None,
311+
action: Optional[Callable[[bytes], Any]] = None,
312312
chunk_size: int = 1024,
313313
*,
314314
iterator: Literal[False] = False,

gitlab/v4/objects/jobs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def artifacts(
152152
def artifacts(
153153
self,
154154
streamed: Literal[True] = True,
155-
action: Optional[Callable[[bytes], None]] = None,
155+
action: Optional[Callable[[bytes], Any]] = None,
156156
chunk_size: int = 1024,
157157
*,
158158
iterator: Literal[False] = False,
@@ -229,7 +229,7 @@ def artifact(
229229
self,
230230
path: str,
231231
streamed: Literal[True] = True,
232-
action: Optional[Callable[[bytes], None]] = None,
232+
action: Optional[Callable[[bytes], Any]] = None,
233233
chunk_size: int = 1024,
234234
*,
235235
iterator: Literal[False] = False,
@@ -305,7 +305,7 @@ def trace(
305305
def trace(
306306
self,
307307
streamed: Literal[True] = True,
308-
action: Optional[Callable[[bytes], None]] = None,
308+
action: Optional[Callable[[bytes], Any]] = None,
309309
chunk_size: int = 1024,
310310
*,
311311
iterator: Literal[False] = False,

gitlab/v4/objects/packages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def download(
159159
package_version: str,
160160
file_name: str,
161161
streamed: Literal[True] = True,
162-
action: Optional[Callable[[bytes], None]] = None,
162+
action: Optional[Callable[[bytes], Any]] = None,
163163
chunk_size: int = 1024,
164164
*,
165165
iterator: Literal[False] = False,
@@ -177,7 +177,7 @@ def download(
177177
package_version: str,
178178
file_name: str,
179179
streamed: bool = False,
180-
action: Optional[Callable[[bytes], None]] = None,
180+
action: Optional[Callable[[bytes], Any]] = None,
181181
chunk_size: int = 1024,
182182
*,
183183
iterator: bool = False,

gitlab/v4/objects/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def snapshot(
523523
self,
524524
wiki: bool = False,
525525
streamed: Literal[True] = True,
526-
action: Optional[Callable[[bytes], None]] = None,
526+
action: Optional[Callable[[bytes], Any]] = None,
527527
chunk_size: int = 1024,
528528
*,
529529
iterator: Literal[False] = False,
@@ -536,7 +536,7 @@ def snapshot(
536536
self,
537537
wiki: bool = False,
538538
streamed: bool = False,
539-
action: Optional[Callable[[bytes], None]] = None,
539+
action: Optional[Callable[[bytes], Any]] = None,
540540
chunk_size: int = 1024,
541541
*,
542542
iterator: bool = False,

gitlab/v4/objects/repositories.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def repository_raw_blob(
146146
self,
147147
sha: str,
148148
streamed: Literal[True] = True,
149-
action: Optional[Callable[[bytes], None]] = None,
149+
action: Optional[Callable[[bytes], Any]] = None,
150150
chunk_size: int = 1024,
151151
*,
152152
iterator: Literal[False] = False,
@@ -273,7 +273,7 @@ def repository_archive(
273273
self,
274274
sha: Optional[str] = None,
275275
streamed: Literal[True] = True,
276-
action: Optional[Callable[[bytes], None]] = None,
276+
action: Optional[Callable[[bytes], Any]] = None,
277277
chunk_size: int = 1024,
278278
*,
279279
iterator: Literal[False] = False,

gitlab/v4/objects/secure_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def download(
5454
def download(
5555
self,
5656
streamed: Literal[True] = True,
57-
action: Optional[Callable[[bytes], None]] = None,
57+
action: Optional[Callable[[bytes], Any]] = None,
5858
chunk_size: int = 1024,
5959
*,
6060
iterator: Literal[False] = False,
@@ -66,7 +66,7 @@ def download(
6666
def download(
6767
self,
6868
streamed: bool = False,
69-
action: Optional[Callable[[bytes], None]] = None,
69+
action: Optional[Callable[[bytes], Any]] = None,
7070
chunk_size: int = 1024,
7171
*,
7272
iterator: bool = False,

gitlab/v4/objects/snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def content(
6161
def content(
6262
self,
6363
streamed: Literal[True] = True,
64-
action: Optional[Callable[[bytes], None]] = None,
64+
action: Optional[Callable[[bytes], Any]] = None,
6565
chunk_size: int = 1024,
6666
*,
6767
iterator: Literal[False] = False,
@@ -237,7 +237,7 @@ def content(
237237
def content(
238238
self,
239239
streamed: Literal[True] = True,
240-
action: Optional[Callable[[bytes], None]] = None,
240+
action: Optional[Callable[[bytes], Any]] = None,
241241
chunk_size: int = 1024,
242242
*,
243243
iterator: Literal[False] = False,

tests/functional/api/test_import_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_project_import_export(gl, project, temp_dir):
5050
raise Exception("Project export taking too much time")
5151

5252
with open(temp_dir / "gitlab-export.tgz", "wb") as f:
53 4FCC -
export.download(streamed=True, action=f.write) # type: ignore[call-overload]
53+
export.download(streamed=True, action=f.write)
5454

5555
output = gl.projects.import_project(
5656
open(temp_dir / "gitlab-export.tgz", "rb"),

0 commit comments

Comments
 (0)
0