Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
andbag committed Apr 5, 2018
1 parent a6a7581 commit 41ae917
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Products/PluginIndexes/TopicIndex/FilteredSet.py
Expand Up @@ -65,7 +65,10 @@ def setExpression(self, expr):
self.expr = expr

def __repr__(self):
return '%s: (%s) %s' % (self.id, self.expr, list(map(None, self.ids)))
return '{0}: ({1}) {2}'.format(
self.id, self.expr,
list(map(None, self.ids))
)

__str__ = __repr__

Expand All @@ -86,13 +89,13 @@ def index_object(self, documentId, o):
except ConflictError:
raise
except Exception:
LOG.warn('eval() failed Object: %s, expr: %s' %
(o.getId(), self.expr), exc_info=sys.exc_info())
LOG.warn('eval() failed Object: {0}, expr: {1}'.format(
o.getId(), self.expr), exc_info=sys.exc_info())


def factory(f_id, f_type, expr):
""" factory function for FilteredSets """
if f_type == 'PythonFilteredSet':
return PythonFilteredSet(f_id, expr)
else:
raise TypeError('unknown type for FilteredSets: %s' % f_type)
raise TypeError('unknown type for FilteredSets: {0}'.format(f_type))

0 comments on commit 41ae917

Please sign in to comment.