From 0f60eda81ea524dcd1358d87b06da701412bb414 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Mon, 3 Aug 2020 22:12:03 +0530 Subject: [PATCH] docs: fix deprecation warnings due to invalid escape sequences. (#996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 🦕 --- describe.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/describe.py b/describe.py index f60d72dc68b..107fa9d5948 100755 --- a/describe.py +++ b/describe.py @@ -226,7 +226,7 @@ def add_param(pname, desc): 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 @@ def breadcrumbs(path, root_discovery): display = p if i == 0: display = root_discovery.get("title", display) - crumbs.append('%s' % (prefix + p, display)) + crumbs.append('{}'.format(prefix + p, display)) accumulated.append(p) return " . ".join(crumbs) @@ -407,7 +407,7 @@ def document_api(name, version, uri): version = safe_version(version) document_collection_recursive( - service, "%s_%s." % (name, version), discovery, discovery + service, "{}_{}.".format(name, version), discovery, discovery ) @@ -427,7 +427,7 @@ def document_api_from_discovery_document(uri): version = safe_version(discovery["version"]) document_collection_recursive( - service, "%s_%s." % (name, version), discovery, discovery + service, "{}_{}.".format(name, version), discovery, discovery )