From a1d70afb5974125a1a65f590418c7c371bbdb3e6 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Mon, 13 Sep 2021 23:09:06 +0200 Subject: Modernize code - remove python 2 support - add github workflows - remove disable unicode - cleanup compat file - modernize setup - use pep517 Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c --- mako/cache.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mako/cache.py') diff --git a/mako/cache.py b/mako/cache.py index 26aa93e..c382aea 100644 --- a/mako/cache.py +++ b/mako/cache.py @@ -4,7 +4,6 @@ # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -from mako import compat from mako import util _cache_plugins = util.PluginLoader("mako.cache") @@ -13,7 +12,7 @@ register_plugin = _cache_plugins.register register_plugin("beaker", "mako.ext.beaker_cache", "BeakerCacheImpl") -class Cache(object): +class Cache: """Represents a data content cache made available to the module space of a specific :class:`.Template` object. @@ -66,7 +65,7 @@ class Cache(object): def __init__(self, template, *args): # check for a stale template calling the # constructor - if isinstance(template, compat.string_types) and args: + if isinstance(template, str) and args: return self.template = template self.id = template.module.__name__ @@ -181,7 +180,7 @@ class Cache(object): return tmpl_kw -class CacheImpl(object): +class CacheImpl: """Provide a cache implementation for use by :class:`.Cache`.""" -- cgit v1.2.1