Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

chore: relax typing constraints for response action#3106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
max-wittig merged 2 commits intomainfromchore/typing-bytes-any
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionsgitlab/mixins.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -640,7 +640,7 @@ def download(
def download(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -652,7 +652,7 @@ def download(
def download(
self,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand Down
2 changes: 1 addition & 1 deletiongitlab/utils.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -77,7 +77,7 @@ def format(self, record: logging.LogRecord) -> str:
def response_content(
response: requests.Response,
streamed: bool,
action: Optional[Callable[[bytes],None]],
action: Optional[Callable[[bytes],Any]],
chunk_size: int,
*,
iterator: bool,
Expand Down
8 changes: 4 additions & 4 deletionsgitlab/v4/objects/artifacts.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,7 +84,7 @@ def download(
ref_name: str,
job: str,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -102,7 +102,7 @@ def download(
ref_name: str,
job: str,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand DownExpand Up@@ -177,7 +177,7 @@ def raw(
artifact_path: str,
job: str,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -195,7 +195,7 @@ def raw(
artifact_path: str,
job: str,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand Down
2 changes: 1 addition & 1 deletiongitlab/v4/objects/files.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -308,7 +308,7 @@ def raw(
file_path: str,
ref: Optional[str] = None,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand Down
6 changes: 3 additions & 3 deletionsgitlab/v4/objects/jobs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -152,7 +152,7 @@ def artifacts(
def artifacts(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand DownExpand Up@@ -229,7 +229,7 @@ def artifact(
self,
path: str,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand DownExpand Up@@ -305,7 +305,7 @@ def trace(
def trace(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/packages.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -159,7 +159,7 @@ def download(
package_version: str,
file_name: str,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -177,7 +177,7 @@ def download(
package_version: str,
file_name: str,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/projects.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -523,7 +523,7 @@ def snapshot(
self,
wiki: bool = False,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -536,7 +536,7 @@ def snapshot(
self,
wiki: bool = False,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/repositories.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -146,7 +146,7 @@ def repository_raw_blob(
self,
sha: str,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand DownExpand Up@@ -273,7 +273,7 @@ def repository_archive(
self,
sha: Optional[str] = None,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/secure_files.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ def download(
def download(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand All@@ -66,7 +66,7 @@ def download(
def download(
self,
streamed: bool = False,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: bool = False,
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/snippets.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,7 +61,7 @@ def content(
def content(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand DownExpand Up@@ -237,7 +237,7 @@ def content(
def content(
self,
streamed: Literal[True] = True,
action: Optional[Callable[[bytes],None]] = None,
action: Optional[Callable[[bytes],Any]] = None,
chunk_size: int = 1024,
*,
iterator: Literal[False] = False,
Expand Down
2 changes: 1 addition & 1 deletiontests/functional/api/test_import_export.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ def test_project_import_export(gl, project, temp_dir):
raise Exception("Project export taking too much time")

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

output = gl.projects.import_project(
open(temp_dir / "gitlab-export.tgz", "rb"),
Expand Down
6 changes: 4 additions & 2 deletionstests/unit/objects/test_projects.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -768,11 +768,13 @@ def test_transfer_project(project, resp_transfer_project):


def test_project_pull_mirror(project, resp_start_pull_mirroring_project):
project.mirror_pull()
with pytest.warns(DeprecationWarning, match="is deprecated"):
project.mirror_pull()


def test_project_pull_mirror_details(project, resp_pull_mirror_details_project):
details = project.mirror_pull_details()
with pytest.warns(DeprecationWarning, match="is deprecated"):
details = project.mirror_pull_details()
assert details["last_error"] is None
assert details["update_status"] == "finished"

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp