- Notifications
You must be signed in to change notification settings - Fork673
Closed
Description
Description of the problem, including code/CLI snippet
After update to 5.4.0 I have noticed that overloaded methods break my file download raw method type checking for both: tempfile and regular file stream.
Is this something I am doing something wrong, or36d9b24 commit break this and needs to be addressed?
Expected Behavior
Passing mypy
Actual Behavior
withtempfile.NamedTemporaryFile(delete=False,suffix=suffix)asf:self._tmp_file=fproject=self._api.projects.get(file_info.prj_id,lazy=True)project.files.raw(file_path=file_info.path,ref=file_info.ref,streamed=True,action=f.write, )error:Nooverloadvariantof"raw"of"ProjectFileManager"matchesargumenttypes"str","str","bool",overloadedfunction [call-overload]
withopen("test.file","wb")asf:self._tmp_file=fproject=self._api.projects.get(file_info.prj_id,lazy=True)project.files.raw(file_path=file_info.path,ref=file_info.ref,streamed=True,action=f.write, )error:Nooverloadvariantof"raw"of"ProjectFileManager"matchesargumenttypes"str","str","bool","Callable[[Buffer], int]" [call-overload]
Specifications
- python-gitlab version: 5.4.0
- Gitlab server version (or gitlab.com): v17.4.2
Metadata
Metadata
Assignees
Labels
No labels