From 40eaf76fc14bc4efbac4393468c347da8be8e4b8 Mon Sep 17 00:00:00 2001 From: Cooper Ry Lees Date: Fri, 2 Jun 2017 19:57:59 -0700 Subject: [PATCH] Escape Sequences with r'' - Add raw strings to files that have the need so correct escaping occurs --- click/_compat.py | 2 +- click/core.py | 2 +- click/decorators.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/click/_compat.py b/click/_compat.py index 312e7297c0..d072224c10 100644 --- a/click/_compat.py +++ b/click/_compat.py @@ -12,7 +12,7 @@ DEFAULT_COLUMNS = 80 -_ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') +_ansi_re = re.compile(r'\033\[((?:\d|;)*)([a-zA-Z])') def get_filesystem_encoding(): diff --git a/click/core.py b/click/core.py index b307407d67..8358172323 100644 --- a/click/core.py +++ b/click/core.py @@ -1230,7 +1230,7 @@ def list_commands(self, ctx): class Parameter(object): - """A parameter to a command comes in two versions: they are either + r"""A parameter to a command comes in two versions: they are either :class:`Option`\s or :class:`Argument`\s. Other subclasses are currently not supported by design as some of the internals for parsing are intentionally not finalized. diff --git a/click/decorators.py b/click/decorators.py index 64af01553d..c0b9e85a39 100644 --- a/click/decorators.py +++ b/click/decorators.py @@ -90,7 +90,7 @@ def _make_command(f, name, attrs, cls): def command(name=None, cls=None, **attrs): - """Creates a new :class:`Command` and uses the decorated function as + r"""Creates a new :class:`Command` and uses the decorated function as callback. This will also automatically attach all decorated :func:`option`\s and :func:`argument`\s as parameters to the command.