8000 chore: correct type-hint for `job.trace()` · mschoettle/python-gitlab@840572e · GitHub
[go: up one dir, main page]

Skip to content

Commit 840572e

Browse files
JohnVillalovosnejch
authored andcommitted
chore: correct type-hint for job.trace()
Closes: python-gitlab#2808
1 parent 62fa271 commit 840572e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

gitlab/v4/objects/jobs.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def trace(
209209
*,
210210
iterator: bool = False,
211211
**kwargs: Any,
212-
) -> Dict[str, Any]:
212+
) -> Optional[Union[bytes, Iterator[Any]]]:
213213
"""Get the job trace.
214214
215215
Args:
@@ -236,12 +236,9 @@ def trace(
236236
)
237237
if TYPE_CHECKING:
238238
assert isinstance(result, requests.Response)
239-
return_value = utils.response_content(
239+
return utils.response_content(
240240
result, streamed, action, chunk_size, iterator=iterator
241241
)
242-
if TYPE_CHECKING:
243-
assert isinstance(return_value, dict)
244-
return return_value
245242

246243

247244
class ProjectJobManager(RetrieveMixin, RESTManager):

0 commit comments

Comments
 (0)
0