Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 21, 2025
1 parent 3a3c3e4 commit f330e0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jenkinsapi/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def get_plugins_url(self, depth):
# This only ever needs to work on the base object
return f"{self.baseurl}/pluginManager/api/python?depth={depth}"

def get_update_center_url(self, depth = 1):
def get_update_center_url(self, depth=1):
return f"{self.baseurl}/manage/updateCenter/api/json?depth={depth}"

def install_plugin(
Expand Down
8 changes: 5 additions & 3 deletions jenkinsapi/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ def update_center_dict(self):
@property
def update_center_dict_server(self):
if not hasattr(self, "_update_center_dict_server"):
self._update_center_dict_server = self.jenkins_obj.requester.get_url(
self.jenkins_obj.get_update_center_url(2)
).json()
self._update_center_dict_server = (
self.jenkins_obj.requester.get_url(
self.jenkins_obj.get_update_center_url(2)
).json()
)
return self._update_center_dict_server

def _poll(self, tree=None):
Expand Down
4 changes: 3 additions & 1 deletion jenkinsapi_tests/unittests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ def test_plugin_repr(self):
"shortName": "subversion",
}
)
self.assertEqual(repr(p), "<jenkinsapi.plugin.Plugin subversion@Unknown>")
self.assertEqual(
repr(p), "<jenkinsapi.plugin.Plugin subversion@Unknown>"
)


if __name__ == "__main__":
Expand Down

0 comments on commit f330e0d

Please sign in to comment.