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 🦕
diff --git a/describe.py b/describe.py
index f60d72d..107fa9d 100755
--- a/describe.py
+++ b/describe.py
@@ -226,7 +226,7 @@
parameters.append(pname)
for line in args:
- m = re.search("^\s+([a-zA-Z0-9_]+): (.*)", line)
+ m = re.search(r"^\s+([a-zA-Z0-9_]+): (.*)", line)
if m is None:
desc += line
continue
@@ -284,7 +284,7 @@
display = p
if i == 0:
display = root_discovery.get("title", display)
- crumbs.append('<a href="%s.html">%s</a>' % (prefix + p, display))
+ crumbs.append('<a href="{}.html">{}</a>'.format(prefix + p, display))
accumulated.append(p)
return " . ".join(crumbs)
@@ -407,7 +407,7 @@
version = safe_version(version)
document_collection_recursive(
- service, "%s_%s." % (name, version), discovery, discovery
+ service, "{}_{}.".format(name, version), discovery, discovery
)
@@ -427,7 +427,7 @@
version = safe_version(discovery["version"])
document_collection_recursive(
- service, "%s_%s." % (name, version), discovery, discovery
+ service, "{}_{}.".format(name, version), discovery, discovery
)