Skip to content

Commit

Permalink
apply lrowe flake8 fix to my fork
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Mar 3, 2015
2 parents f06f717 + e46a621 commit 1657f2d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
5 changes: 1 addition & 4 deletions lib/diazo/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@
theme="//div[@id='page-content']"/>
</rules>\
"""
usage = __doc__

import logging
import pkg_resources

from lxml import etree
from six import string_types

from diazo.rules import process_rules
from diazo.utils import pkg_xsl, _createOptionParser, CustomResolver
from diazo.utils import quote_param, split_params

logger = logging.getLogger('diazo')
usage = __doc__


def set_parser(stylesheet, parser, compiler_parser=None):
Expand Down
6 changes: 2 additions & 4 deletions lib/diazo/cssrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
</rules>\
"""
from __future__ import absolute_import
usage = __doc__

from optparse import OptionParser
from lxml import etree
from experimental.cssselect import css_to_xpath

from . import utils

import sys
import logging

logger = logging.getLogger('diazo')
usage = __doc__


def convert_css_selectors(rules):
Expand Down
5 changes: 1 addition & 4 deletions lib/diazo/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
Preprocess RULES, an diazo rules file
"""
usage = __doc__

import logging
import re

from lxml import etree
from six import string_types
from future.moves.urllib.parse import urljoin
from future.moves.urllib.request import urlopen

from diazo.cssrules import convert_css_selectors
from diazo.utils import namespaces, fullname, pkg_xsl, _createOptionParser

logger = logging.getLogger('diazo')
usage = __doc__

IMPORT_STYLESHEET = re.compile(
r'''(?P<before>@import[ \t]+(?P<paren>url\([ \t]?)?(?P<quote>['"]?))'''
Expand Down
6 changes: 1 addition & 5 deletions lib/diazo/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@
Usage: %prog -r RULES [options] CONTENT
"""
usage = __doc__

import logging
import sys
import os.path

from lxml import etree
from six import string_types

from diazo.compiler import compile_theme
from diazo.utils import AC_READ_NET, AC_READ_FILE, _createOptionParser
from diazo.utils import split_params, quote_param

import diazo.runtrace

logger = logging.getLogger('diazo')
usage = __doc__


class RunResolver(etree.Resolver):
Expand Down
4 changes: 1 addition & 3 deletions lib/diazo/tests/test_diazo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import difflib
from io import BytesIO
import unittest
import future.standard_library
with future.standard_library.hooks():
import configparser
import configparser
import pkg_resources

import diazo.compiler
Expand Down

0 comments on commit 1657f2d

Please sign in to comment.