diff --git a/hyde/ext/plugins/structure.py b/hyde/ext/plugins/structure.py index 24ddf91..f818fd4 100644 --- a/hyde/ext/plugins/structure.py +++ b/hyde/ext/plugins/structure.py @@ -338,8 +338,8 @@ class PaginatorPlugin(Plugin): for node in self.site.content.walk(): added_resources = [] paged_resources = (res for res in node.resources - if hasattr(res, "meta") - and hasattr(res.meta, 'paginator')) + if hasattr(res, "meta") and + hasattr(res.meta, 'paginator')) for resource in paged_resources: paginator = Paginator(resource.meta.paginator) added_resources += paginator.walk_paged_resources( diff --git a/hyde/lib/pygments/rst_directive.py b/hyde/lib/pygments/rst_directive.py index c157679..b161b01 100644 --- a/hyde/lib/pygments/rst_directive.py +++ b/hyde/lib/pygments/rst_directive.py @@ -35,14 +35,19 @@ :license: BSD, see LICENSE for details. """ +from docutils import nodes +from docutils.parsers.rst import directives, Directive + +from pygments import highlight +from pygments.formatters import HtmlFormatter +from pygments.lexers import get_lexer_by_name, TextLexer + # Options # ~~~~~~~ # Set to True if you want inline CSS styles instead of classes INLINESTYLES = False -from pygments.formatters import HtmlFormatter - # The default formatter DEFAULT = HtmlFormatter(noclasses=INLINESTYLES) @@ -52,13 +57,6 @@ VARIANTS = { } -from docutils import nodes -from docutils.parsers.rst import directives, Directive - -from pygments import highlight -from pygments.lexers import get_lexer_by_name, TextLexer - - class Pygments(Directive): """ Source code syntax hightlighting.