api4jenkins icon indicating copy to clipboard operation
api4jenkins copied to clipboard

add return type to methods like get_job

Open ksh-b opened this issue 8 months ago • 1 comments

This could help with autocompletion in editors.

Current: Here I (/editor) do not know what the return type of get_job would be

client = Jenkins('jen_url', auth=('user', 'pass'))
project: WorkflowMultiBranchProject = client.get_job(full_name="project")
job: WorkflowJob = project.get(name="branch")
job.build()

After adding types:

client = Jenkins('jen_url', auth=('user', 'pass'))
project= client.get_job(full_name="project")
job = project.get(name="branch")
job.build()

ksh-b avatar May 31 '24 08:05 ksh-b