From da0d19cca8a9eca82ad8ed7acc88cf234dbe2f60 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Wed, 10 May 2017 12:10:42 -0700 Subject: Marked some docstrings as raw strings to address the invalid escape warning on Python 3.6+ --- mako/cache.py | 14 +++++++------- mako/parsetree.py | 2 +- mako/template.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mako/cache.py b/mako/cache.py index 94f3870..1af17dd 100644 --- a/mako/cache.py +++ b/mako/cache.py @@ -95,7 +95,7 @@ class Cache(object): **self._get_cache_kw(kw, context)) def set(self, key, value, **kw): - """Place a value in the cache. + r"""Place a value in the cache. :param key: the value's key. :param value: the value. @@ -113,7 +113,7 @@ class Cache(object): """ def get(self, key, **kw): - """Retrieve a value from the cache. + r"""Retrieve a value from the cache. :param key: the value's key. :param \**kw: cache configuration arguments. The @@ -125,7 +125,7 @@ class Cache(object): return self.impl.get(key, **self._get_cache_kw(kw, None)) def invalidate(self, key, **kw): - """Invalidate a value in the cache. + r"""Invalidate a value in the cache. :param key: the value's key. :param \**kw: cache configuration arguments. The @@ -194,7 +194,7 @@ class CacheImpl(object): """ def get_or_create(self, key, creation_function, **kw): - """Retrieve a value from the cache, using the given creation function + r"""Retrieve a value from the cache, using the given creation function to generate a new value. This function *must* return a value, either from @@ -212,7 +212,7 @@ class CacheImpl(object): raise NotImplementedError() def set(self, key, value, **kw): - """Place a value in the cache. + r"""Place a value in the cache. :param key: the value's key. :param value: the value. @@ -222,7 +222,7 @@ class CacheImpl(object): raise NotImplementedError() def get(self, key, **kw): - """Retrieve a value from the cache. + r"""Retrieve a value from the cache. :param key: the value's key. :param \**kw: cache configuration arguments. @@ -231,7 +231,7 @@ class CacheImpl(object): raise NotImplementedError() def invalidate(self, key, **kw): - """Invalidate a value in the cache. + r"""Invalidate a value in the cache. :param key: the value's key. :param \**kw: cache configuration arguments. diff --git a/mako/parsetree.py b/mako/parsetree.py index 879882e..e129916 100644 --- a/mako/parsetree.py +++ b/mako/parsetree.py @@ -258,7 +258,7 @@ class Tag(compat.with_metaclass(_TagMeta, Node)): def __init__(self, keyword, attributes, expressions, nonexpressions, required, **kwargs): - """construct a new Tag instance. + r"""construct a new Tag instance. this constructor not called directly, and is only called by subclasses. diff --git a/mako/template.py b/mako/template.py index c3e0c25..329632c 100644 --- a/mako/template.py +++ b/mako/template.py @@ -21,7 +21,7 @@ import weakref class Template(object): - """Represents a compiled template. + r"""Represents a compiled template. :class:`.Template` includes a reference to the original template source (via the :attr:`.source` attribute) -- cgit v1.2.1