Skip to content

Commit

Permalink
update pre-commit versions (#885)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
clintonsteiner and pre-commit-ci[bot] authored Jan 7, 2025
1 parent cdb3585 commit 7b1a5fd
Show file tree
Hide file tree
Showing 72 changed files with 88 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 24.10.0
hooks:
- id: black
args:
Expand All @@ -19,7 +19,7 @@ repos:
dist"""
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/add_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This example shows how to add new command to "Shell" build step
"""

from __future__ import print_function
import xml.etree.ElementTree as et
from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/create_a_job.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This example shows how to create job from XML file and how to delete job
"""

from __future__ import print_function
from pkg_resources import resource_string
from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/create_credentials.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This example shows how to create credentials
"""

import logging
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.credential import UsernamePasswordCredential, SSHKeyCredential
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/create_nested_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This example requires NestedViews plugin to be installed in Jenkins
You need to have at least one job in your Jenkins to see views
"""

from __future__ import print_function
import logging
from pkg_resources import resource_string
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/create_slave.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
How to create slaves/nodes
"""

import logging
import requests
from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/create_views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
How to create views
"""

import logging
from pkg_resources import resource_string
from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/delete_all_the_nodes_except_master.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
How to delete slaves/nodes
"""

from __future__ import print_function
import logging
from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/get_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
An example of how to use JenkinsAPI to fetch the config XML of a job.
"""

from __future__ import print_function
from jenkinsapi.jenkins import Jenkins

Expand Down
1 change: 1 addition & 0 deletions examples/how_to/get_plugin_information.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Get information about currently installed plugins
"""

from __future__ import print_function
from jenkinsapi.jenkins import Jenkins

Expand Down
1 change: 1 addition & 0 deletions examples/how_to/get_version_info_from_last_good_build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Extract version information from the latest build.
"""

from __future__ import print_function
from jenkinsapi.jenkins import Jenkins

Expand Down
1 change: 1 addition & 0 deletions examples/how_to/query_a_build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
How to get build from job and query that build
"""

from __future__ import print_function
from jenkinsapi.jenkins import Jenkins

Expand Down
1 change: 1 addition & 0 deletions examples/how_to/search_artifact_by_regexp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Search for job artifacts using regexp
"""

from __future__ import print_function
import re
from jenkinsapi.api import search_artifact_by_regexp
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/search_artifacts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Search for job artifacts
"""

from __future__ import print_function
from jenkinsapi.api import search_artifacts

Expand Down
1 change: 1 addition & 0 deletions examples/how_to/start_parameterized_build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Start a Parameterized Build
"""

from __future__ import print_function

from jenkinsapi.jenkins import Jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/how_to/use_crumbs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Example of using CrumbRequester - when CSRF protection is enabled in Jenkins
"""

from jenkinsapi.jenkins import Jenkins

jenkins = Jenkins(
Expand Down
1 change: 1 addition & 0 deletions examples/low_level/copy_a_job.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A lower-level implementation of copying a job in Jenkins
"""

from __future__ import print_function

import requests
Expand Down
1 change: 1 addition & 0 deletions examples/low_level/create_a_view_low_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A low level example:
This is how JenkinsAPI creates views
"""

from __future__ import print_function
import json
import requests
Expand Down
1 change: 1 addition & 0 deletions examples/low_level/login_with_auth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A lower level example of how we login with authentication
"""

from __future__ import print_function

from jenkinsapi import jenkins
Expand Down
1 change: 1 addition & 0 deletions examples/low_level/post_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
pip install six
```
"""

from six.moves import SimpleHTTPServer, socketserver
import logging
import cgi
Expand Down
1 change: 1 addition & 0 deletions jenkinsapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
Current code lives on github: https://github.com/salimfadhley/jenkinsapi
"""

from jenkinsapi import (
# Modules
command_line,
Expand Down
1 change: 1 addition & 0 deletions jenkinsapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Many of these functions were designed to be exposed to the command-line,
hence they have simple string arguments.
"""

import os
import re
import time
Expand Down
2 changes: 1 addition & 1 deletion jenkinsapi/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
This module provides a class called Artifact which allows you to download
objects from the server and also access them as a stream.
"""

from __future__ import annotations

import os
Expand All @@ -22,7 +23,6 @@


class Artifact(object):

"""
Represents a single Jenkins artifact, usually some kind of file
generated as a by-product of executing a Jenkins build.
Expand Down
2 changes: 1 addition & 1 deletion jenkinsapi/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Build objects can be associated with Results and Artifacts.
"""

from __future__ import annotations

import time
Expand Down Expand Up @@ -36,7 +37,6 @@


class Build(JenkinsBase):

"""
Represents a Jenkins build, executed in context of a job.
"""
Expand Down
1 change: 0 additions & 1 deletion jenkinsapi/command_line/jenkins_invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class JenkinsInvoke(object):

"""
JenkinsInvoke object implements class to call from command line
"""
Expand Down
1 change: 1 addition & 0 deletions jenkinsapi/command_line/jenkinsapi_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" jenkinsapi.command_line.jenkinsapi_version
"""

from jenkinsapi import __version__ as version
import sys

Expand Down
1 change: 0 additions & 1 deletion jenkinsapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Jenkins configuration
"""


JENKINS_API = r"api/python"

LOAD_TIMEOUT = 30
1 change: 1 addition & 0 deletions jenkinsapi/credential.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for jenkinsapi Credential class
"""

import logging
import xml.etree.cElementTree as ET

Expand Down
1 change: 1 addition & 0 deletions jenkinsapi/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
container-like interface for all of the Global credentials defined on a single
Jenkins node.
"""

from __future__ import annotations

from typing import Iterator
Expand Down
Loading

0 comments on commit 7b1a5fd

Please sign in to comment.