Skip to content

Commit 0f60eda

Browse files
authored
docs: fix deprecation warnings due to invalid escape sequences. (#996)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-python-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #995 🦕
1 parent cd4e8f4 commit 0f60eda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: describe.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def add_param(pname, desc):
226226
parameters.append(pname)
227227

228228
for line in args:
229-
m = re.search("^\s+([a-zA-Z0-9_]+): (.*)", line)
229+
m = re.search(r"^\s+([a-zA-Z0-9_]+): (.*)", line)
230230
if m is None:
231231
desc += line
232232
continue
@@ -284,7 +284,7 @@ def breadcrumbs(path, root_discovery):
284284
display = p
285285
if i == 0:
286286
display = root_discovery.get("title", display)
287-
crumbs.append('<a href="%s.html">%s</a>' % (prefix + p, display))
287+
crumbs.append('<a href="{}.html">{}</a>'.format(prefix + p, display))
288288
accumulated.append(p)
289289

290290
return " . ".join(crumbs)
@@ -407,7 +407,7 @@ def document_api(name, version, uri):
407407
version = safe_version(version)
408408

409409
document_collection_recursive(
410-
service, "%s_%s." % (name, version), discovery, discovery
410+
service, "{}_{}.".format(name, version), discovery, discovery
411411
)
412412

413413

@@ -427,7 +427,7 @@ def document_api_from_discovery_document(uri):
427427
version = safe_version(discovery["version"])
428428

429429
document_collection_recursive(
430-
service, "%s_%s." % (name, version), discovery, discovery
430+
service, "{}_{}.".format(name, version), discovery, discovery
431431
)
432432

433433

0 commit comments

Comments
 (0)