Skip to content

Commit

Permalink
blackize
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwiggers committed May 2, 2022
1 parent cb9b844 commit 9b04fa0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
master_doc = "index"

# General information about the project.
project = u"OneBot"
copyright = u"2014, Thom Wiggers"
project = "OneBot"
copyright = "2014, Thom Wiggers"

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -206,7 +206,7 @@
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
("index", "onebot.tex", u"OneBot Documentation", u"Thom Wiggers", "manual"),
("index", "onebot.tex", "OneBot Documentation", "Thom Wiggers", "manual"),
]

# The name of an image file (relative to this directory) to place at
Expand Down Expand Up @@ -234,7 +234,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "onebot", u"OneBot Documentation", [u"Thom Wiggers"], 1)]
man_pages = [("index", "onebot", "OneBot Documentation", ["Thom Wiggers"], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -249,8 +249,8 @@
(
"index",
"onebot",
u"OneBot Documentation",
u"Thom Wiggers",
"OneBot Documentation",
"Thom Wiggers",
"onebot",
"One line description of project.",
"Miscellaneous",
Expand Down
6 changes: 5 additions & 1 deletion onebot/plugins/urlinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ def formatter(response):
attempts += 1
data = response.json()
self.log.error("Response: %r", data)
if response.status_code == 429 or not isinstance(data, dict) or data.get("error", 0) == 429:
if (
response.status_code == 429
or not isinstance(data, dict)
or data.get("error", 0) == 429
):
time.sleep(0.5 * attempts)
self.log.debug("Retrying reddit request")
continue
Expand Down

0 comments on commit 9b04fa0

Please sign in to comment.