coopergillan commented on a change in pull request #9947:
URL: https://github.com/apache/airflow/pull/9947#discussion_r463731564



##########
File path: airflow/providers/jenkins/operators/jenkins_job_trigger.py
##########
@@ -19,19 +19,22 @@
 import json
 import socket
 import time
+from typing import Any, Mapping, Optional, Type, Union
 from urllib.error import HTTPError, URLError
 
 import jenkins
-from jenkins import JenkinsException
+from jenkins import Jenkins, JenkinsException
 from requests import Request
 
 from airflow.exceptions import AirflowException
 from airflow.models import BaseOperator
 from airflow.providers.jenkins.hooks.jenkins import JenkinsHook
 from airflow.utils.decorators import apply_defaults
 
+JReqType = Mapping[str, Union[str, Mapping[str, str]]]
 
-def jenkins_request_with_headers(jenkins_server, req):
+
+def jenkins_request_with_headers(jenkins_server: Type[Jenkins], req: Request) 
-> JReqType:

Review comment:
       The headers have been a little difficult to pin down, so I went with a 
simpler approach.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to