-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
stubs: false negativeType checkers do not report an error, but shouldType checkers do not report an error, but shouldstubs: false positiveType checkers report false errorsType checkers report false errors
Description
Type annotation for methods get_jobs()
and get_all_jobs()
is list[dict[str, str]]
. However, the dictionaries of the returned list contain not only str
typed values but also the nested jobs. For example:
[
{
"_class": "com.cloudbees.hudson.plugins.folder.Folder",
"name": "job1",
"url": "https://example.com/job/job1/",
"jobs": [
{
"_class": "com.cloudbees.hudson.plugins.folder.Folder",
"name": "job2",
"url": "https://example.com/job/job1/job/job2/",
"jobs": [
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
"name": "job3",
"url": "https://example.com/job/job1/job/job2/job/job3/"
"color": "red"
}
]
}
]
}
]
So, I propose that those methods are annotated with list[_JSON]
.
Metadata
Metadata
Assignees
Labels
stubs: false negativeType checkers do not report an error, but shouldType checkers do not report an error, but shouldstubs: false positiveType checkers report false errorsType checkers report false errors