From 231cea341189976b0b4fe944d9aff400bc2f0959 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Apr 2023 08:25:27 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- jenkinsapi/job.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py index 9d1bffc8..3fc0967e 100644 --- a/jenkinsapi/job.py +++ b/jenkinsapi/job.py @@ -627,7 +627,7 @@ def modify_scm_url(self, new_source_url, old_source_url=None): def get_config_xml_url(self): return "%s/config.xml" % self.baseurl - def update_config(self, config, full_response=False, encoding='utf-8'): + def update_config(self, config, full_response=False, encoding="utf-8"): """ Update the config.xml to the job Also refresh the ElementTree object since the config has changed @@ -637,7 +637,9 @@ def update_config(self, config, full_response=False, encoding='utf-8'): """ url = self.get_config_xml_url() config = str(config) # cast unicode in case of Python 2 - response = self.jenkins.requester.post_url(url, params={}, data=config.encode(encoding)) + response = self.jenkins.requester.post_url( + url, params={}, data=config.encode(encoding) + ) self._element_tree = ET.fromstring(config) if full_response: