many pep8 violations fixed
authorsalimfadhley <sal@stodge.org>
Sat, 12 Oct 2013 16:55:29 +0000 (17:55 +0100)
committersalimfadhley <sal@stodge.org>
Sat, 12 Oct 2013 16:55:29 +0000 (17:55 +0100)
jenkinsapi/build.py
jenkinsapi/jenkins.py
jenkinsapi/jobs.py
jenkinsapi/utils/requester.py

index f8592244ce92433437a9f78aa3df15c9bfed87b5..343b4ac9a30f4c1f05c028087b74e42e139ce245 100644 (file)
@@ -192,7 +192,8 @@ class Build(JenkinsBase):
         """
 # <<<<<<< HEAD
 #         downstream_jobs_names = self.job.get_downstream_job_names()
-#         fingerprint_data = self.get_data("%s?depth=2&tree=fingerprint[usage[name]]" % self.python_api_url(self.baseurl))
+#         fingerprint_data = self.get_data("%s?depth=2&tree=fingerprint[usage[name]]" \
+#                                            % self.python_api_url(self.baseurl))
 #         try:
 #             fingerprints = fingerprint_data['fingerprint'][0]
 #             return [
@@ -205,7 +206,7 @@ class Build(JenkinsBase):
         downstream_names = []
         try:
             fingerprints = self._data["fingerprint"]
-            for fingerprint in fingerprints :
+            for fingerprint in fingerprints:
                 for job_usage in fingerprint['usage']:
                     if job_usage['name'] in downstream_job_names:
                         downstream_names.append(job_usage['name'])
@@ -235,7 +236,7 @@ class Build(JenkinsBase):
         downstream_builds = []
         try:
             fingerprints = self._data["fingerprint"]
-            for fingerprint in fingerprints :
+            for fingerprint in fingerprints:
                 for job_usage in fingerprint['usage']:
                     if job_usage['name'] in downstream_job_names:
                         job = self.get_jenkins_obj().get_job(job_usage['name'])
index 3b6503aa99424bca15867419834f1c29e7f27f8a..13c4e20b4dfc81e04dad396981e3bc4fe0a83b9b 100644 (file)
@@ -92,8 +92,8 @@ class Jenkins(JenkinsBase):
         Fetch all the build-names on this Jenkins server.
         """
         for info in self._data["jobs"]:
-            yield info["name"],\
-                  Job(info["url"], info["name"], jenkins_obj=self)
+            yield info["name"], \
+                Job(info["url"], info["name"], jenkins_obj=self)
 
     def get_jobs_info(self):
         """
index fbef338ec8edf398714b5032751bf21f16942583..0801450901099c908cf2d925f4b8ec0da6f56e43 100644 (file)
@@ -79,9 +79,11 @@ class Jobs(object):
         params = {'name': job_name}
         if isinstance(config, unicode):
             config = str(config)
-        self.jenkins.requester.\
-                post_xml_and_confirm_status(self.jenkins.get_create_url(),
-                                            data=config, params=params)
+        self.jenkins.requester.post_xml_and_confirm_status(
+            self.jenkins.get_create_url(),
+            data=config,
+            params=params
+        )
         self.jenkins.poll()
         if job_name not in self:
             raise JenkinsAPIException('Cannot create job %s' % job_name)
index 36a071902c77a12e63c66dfac0d4c83843dc7077..0460b9947af0b989811aa6bdcd694f8d34d7fd20 100644 (file)
@@ -40,7 +40,6 @@ class Requester(object):
         self.password = password
         self.ssl_verify = ssl_verify
 
-
     def get_request_dict(self, params=None, data=None, files=None, headers=None):
         requestKwargs = {}
         if self.username:
@@ -76,11 +75,11 @@ class Requester(object):
             url_split = urlparse.urlsplit(url)
             url = urlparse.urlunsplit(
                 [
-                self.base_scheme,
-                url_split.netloc,
-                url_split.path,
-                url_split.query,
-                url_split.fragment
+                    self.base_scheme,
+                    url_split.netloc,
+                    url_split.path,
+                    url_split.query,
+                    url_split.fragment
                 ]
             )
         return url