Browse Source

New pep8 rules cleanup

main
Jon Banafato 9 years ago
parent
commit
5a7120bfc9
2 changed files with 9 additions and 11 deletions
  1. +2
    -2
      hyde/ext/plugins/structure.py
  2. +7
    -9
      hyde/lib/pygments/rst_directive.py

+ 2
- 2
hyde/ext/plugins/structure.py View File

@@ -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(


+ 7
- 9
hyde/lib/pygments/rst_directive.py View File

@@ -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.


Loading…
Cancel
Save