You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by tu...@apache.org on 2020/12/13 02:11:20 UTC
[kibble] branch main updated: Upgrade black to 20.8b1 (#112)
This is an automated email from the ASF dual-hosted git repository.
turbaszek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/kibble.git
The following commit(s) were added to refs/heads/main by this push:
new 729256f Upgrade black to 20.8b1 (#112)
729256f is described below
commit 729256f0a02136929deac6c52708ccc922149c0b
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Sun Dec 13 02:11:12 2020 +0000
Upgrade black to 20.8b1 (#112)
Upgrade black pre-commit from `19.3b0` to `20.8b1`
---
.pre-commit-config.yaml | 2 +-
kibble/scanners/brokers/kibbleES.py | 4 ++--
kibble/scanners/kibble-scanner.py | 4 ++--
kibble/scanners/scanners/ponymail-kpe.py | 4 ++--
kibble/scanners/scanners/travis.py | 4 +---
kibble/scanners/utils/github.py | 3 +--
kibble/scanners/utils/urlmisc.py | 3 +--
7 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e471779..9ff35d2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -69,7 +69,7 @@ repos:
- license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- repo: https://github.com/psf/black
- rev: 19.3b0
+ rev: 20.8b1
hooks:
- id: black
name: Black
diff --git a/kibble/scanners/brokers/kibbleES.py b/kibble/scanners/brokers/kibbleES.py
index 472afe5..0f3c909 100644
--- a/kibble/scanners/brokers/kibbleES.py
+++ b/kibble/scanners/brokers/kibbleES.py
@@ -73,8 +73,8 @@ class KibbleESWrapper:
class KibbleESWrapperSeven:
"""
- Class for rewriting old-style queries to the new ones,
- where doc_type is an integral part of the DB name and NOT USED (>= 7.x)
+ Class for rewriting old-style queries to the new ones,
+ where doc_type is an integral part of the DB name and NOT USED (>= 7.x)
"""
def __init__(self, ES):
diff --git a/kibble/scanners/kibble-scanner.py b/kibble/scanners/kibble-scanner.py
index 390a263..6a51a41 100644
--- a/kibble/scanners/kibble-scanner.py
+++ b/kibble/scanners/kibble-scanner.py
@@ -85,8 +85,8 @@ def isMine(ID, config):
class scanThread(threading.Thread):
- """ A thread object that grabs an item from the queue and processes
- it, using whatever plugins will come out to play. """
+ """A thread object that grabs an item from the queue and processes
+ it, using whatever plugins will come out to play."""
def __init__(self, broker, org, i, t=None, e=None):
super(scanThread, self).__init__()
diff --git a/kibble/scanners/scanners/ponymail-kpe.py b/kibble/scanners/scanners/ponymail-kpe.py
index 7e93320..478dfba 100644
--- a/kibble/scanners/scanners/ponymail-kpe.py
+++ b/kibble/scanners/scanners/ponymail-kpe.py
@@ -28,8 +28,8 @@ title = "Key Phrase Extraction plugin for Apache Pony Mail"
version = "0.1.0"
ROBITS = r"(git|gerrit|jenkins|hudson|builds|bugzilla)@"
MAX_COUNT = (
- 100
-) # Max number of unparsed emails to handle (so we don't max out API credits!)
+ 100 # Max number of unparsed emails to handle (so we don't max out API credits!)
+)
def accepts(source):
diff --git a/kibble/scanners/scanners/travis.py b/kibble/scanners/scanners/travis.py
index d76ca57..c2157c6 100644
--- a/kibble/scanners/scanners/travis.py
+++ b/kibble/scanners/scanners/travis.py
@@ -327,9 +327,7 @@ def sclan(KibbleBit, source):
KibbleBit.pprint("Job %u is building" % jobID)
elif jobjs["state"] in ["created", "queued", "pending"]:
queued += 1
- blocked += (
- 1
- ) # Queued in Travis generally means a job can't find an executor, and thus is blocked.
+ blocked += 1 # Queued in Travis generally means a job can't find an executor, and thus is blocked.
KibbleBit.pprint("Job %u is pending" % jobID)
KibbleBit.pprint("%u building, %u queued..." % (building, queued))
diff --git a/kibble/scanners/utils/github.py b/kibble/scanners/utils/github.py
index 5284b1b..1731fdb 100644
--- a/kibble/scanners/utils/github.py
+++ b/kibble/scanners/utils/github.py
@@ -29,8 +29,7 @@ rate_limit_api = "https://api.github.com/rate_limit"
def get_limited(url, params=None, auth=None):
- """ Get a GitHub API response, keeping in mind that we may
- be rate-limited by the abuse system """
+ """Get a GitHub API response, keeping in mind that we may be rate-limited by the abuse system"""
number_of_retries = 0
resp = requests.get(url, params=params, auth=auth)
while resp.status_code == 403 and number_of_retries < 20:
diff --git a/kibble/scanners/utils/urlmisc.py b/kibble/scanners/utils/urlmisc.py
index f03c512..e80b9f6 100644
--- a/kibble/scanners/utils/urlmisc.py
+++ b/kibble/scanners/utils/urlmisc.py
@@ -27,8 +27,7 @@ import urllib.request
def unzip(url, creds=None, cookie=None):
- """ Attempts to download an unzip an archive. Returns the
- temporary file path of the unzipped contents """
+ """Attempts to download an unzip an archive. Returns the temporary file path of the unzipped contents"""
headers = {}
if creds:
auth = str(base64.encodestring(bytes(creds)).replace("\n", ""))