From c86c5910f1e5fafab9a0445aff71c3a425814b07 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 24 Mar 2012 21:30:19 -0400 Subject: [PATCH] Remove unnecessary imports in plugins. --- hyde/ext/plugins/combine.py | 3 +-- hyde/ext/plugins/depends.py | 3 +-- hyde/ext/plugins/grouper.py | 2 +- hyde/ext/plugins/meta.py | 1 + hyde/ext/plugins/paginator.py | 1 + hyde/ext/plugins/sphinx.py | 1 - hyde/ext/plugins/tagger.py | 1 - hyde/ext/plugins/urls.py | 1 - 8 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hyde/ext/plugins/combine.py b/hyde/ext/plugins/combine.py index fc8b75c..27e05b3 100644 --- a/hyde/ext/plugins/combine.py +++ b/hyde/ext/plugins/combine.py @@ -5,7 +5,6 @@ Contains classes to combine files into one from fnmatch import fnmatch -from hyde.model import Expando from hyde.plugin import Plugin import operator @@ -131,4 +130,4 @@ class CombinePlugin(Plugin): if where == "top": return "".join([r.source.read_all() for r in resources] + [text]) else: - return "".join([text] + [r.source.read_all() for r in resources]) \ No newline at end of file + return "".join([text] + [r.source.read_all() for r in resources]) diff --git a/hyde/ext/plugins/depends.py b/hyde/ext/plugins/depends.py index b8c7316..3234a3e 100644 --- a/hyde/ext/plugins/depends.py +++ b/hyde/ext/plugins/depends.py @@ -6,7 +6,6 @@ Depends plugin """ from hyde.plugin import Plugin -import re class DependsPlugin(Plugin): """ @@ -57,4 +56,4 @@ class DependsPlugin(Plugin): resource=resource, site=self.site, context=self.site.context)) - resource.depends = list(set(resource.depends)) \ No newline at end of file + resource.depends = list(set(resource.depends)) diff --git a/hyde/ext/plugins/grouper.py b/hyde/ext/plugins/grouper.py index 63d4e5f..4b807a5 100644 --- a/hyde/ext/plugins/grouper.py +++ b/hyde/ext/plugins/grouper.py @@ -210,4 +210,4 @@ class GrouperPlugin(Plugin): for prev, next in pairwalk(walker): setattr(next, prev_att, prev) - setattr(prev, next_att, next) \ No newline at end of file + setattr(prev, next_att, next) diff --git a/hyde/ext/plugins/meta.py b/hyde/ext/plugins/meta.py index 29923bf..c9c40bd 100644 --- a/hyde/ext/plugins/meta.py +++ b/hyde/ext/plugins/meta.py @@ -2,6 +2,7 @@ """ Contains classes and utilities related to meta data in hyde. """ + import re from hyde.model import Expando from hyde.plugin import Plugin diff --git a/hyde/ext/plugins/paginator.py b/hyde/ext/plugins/paginator.py index 4d8b058..c6623fa 100644 --- a/hyde/ext/plugins/paginator.py +++ b/hyde/ext/plugins/paginator.py @@ -3,6 +3,7 @@ Paginator plugin. Groups a sorted set of resources into pages and supplies each page to a copy of the original resource. """ + import os from hyde.plugin import Plugin diff --git a/hyde/ext/plugins/sphinx.py b/hyde/ext/plugins/sphinx.py index c7e0768..e5aaa1e 100644 --- a/hyde/ext/plugins/sphinx.py +++ b/hyde/ext/plugins/sphinx.py @@ -56,7 +56,6 @@ logger = getLoggerWithNullHandler('hyde.ext.plugins.sphinx') try: import sphinx from sphinx.builders.html import JSONHTMLBuilder - from sphinx.util.osutil import SEP except ImportError: logger.error("The sphinx plugin requires sphinx.") logger.error("`pip install -U sphinx` to get it.") diff --git a/hyde/ext/plugins/tagger.py b/hyde/ext/plugins/tagger.py index ff3f28d..3130fd0 100644 --- a/hyde/ext/plugins/tagger.py +++ b/hyde/ext/plugins/tagger.py @@ -3,7 +3,6 @@ Contains classes and utilities related to tagging resources in hyde. """ - from hyde.model import Expando from hyde.plugin import Plugin from hyde.site import Node diff --git a/hyde/ext/plugins/urls.py b/hyde/ext/plugins/urls.py index 393f634..09fb44c 100644 --- a/hyde/ext/plugins/urls.py +++ b/hyde/ext/plugins/urls.py @@ -2,7 +2,6 @@ """ Contains classes and utilities related to hyde urls. """ - from hyde.plugin import Plugin from hyde.site import Site