mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Modernize code base to Python 3+ syntax
Replaces syntax that was relevant in earlier Python versions but that now has modernized equivalents.
This commit is contained in:
parent
2cd1d44576
commit
d43b786b30
37 changed files with 104 additions and 171 deletions
|
|
@ -1,6 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
|
||||
|
|
@ -84,9 +81,9 @@ class PluginTest(unittest.TestCase):
|
|||
|
||||
def test_load_plugins(self):
|
||||
def get_plugin_names(plugins):
|
||||
return set(
|
||||
return {
|
||||
plugin.NAME if hasattr(plugin, 'NAME') else plugin.__name__
|
||||
for plugin in plugins)
|
||||
for plugin in plugins}
|
||||
|
||||
# existing namespace plugins
|
||||
existing_ns_plugins = load_plugins({})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue