Final flaking.

This commit is contained in:
Jannis Leidel
2012-05-19 20:37:11 +02:00
parent 6c2198a7e7
commit 90966edf97
3 changed files with 7 additions and 15 deletions

View File

@@ -1,2 +1,3 @@
# flake8: noqa
from compressor.filters.base import (FilterBase, CallbackOutputFilter,
CompilerFilter, FilterError) # noqa
CompilerFilter, FilterError)

View File

@@ -1,3 +1,4 @@
# flake8: noqa
import os
import sys
from types import MethodType

View File

@@ -27,21 +27,11 @@ _field_part_re = re.compile(
r'(?(1)(?:\]|$)([^.[]+)?)' # ']' and invalid tail
)
if hasattr(re, '__version__'):
_format_str_sub = _format_str_re.sub
else:
# Python 2.4 fails to preserve the Unicode type
def _format_str_sub(repl, s):
if isinstance(s, unicode):
return unicode(_format_str_re.sub(repl, s))
return _format_str_re.sub(repl, s)
_format_str_sub = _format_str_re.sub
if hasattr(int, '__index__'):
def _is_integer(value):
return hasattr(value, '__index__')
else: # Python 2.4
def _is_integer(value):
return isinstance(value, (int, long))
def _is_integer(value):
return hasattr(value, '__index__')
def _strformat(value, format_spec=""):