Skip to content

Commit

Permalink
Minor style fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 4, 2017
1 parent 807ed73 commit a9d46bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nikola/nikola.py
Expand Up @@ -978,9 +978,7 @@ def __init__(self, **config):
filter_name_format = 'filters.{0}'
for filter_name, filter_definition in filters.__dict__.items():
# Ignore objects whose name starts with an underscore, or which are not callable
if filter_name.startswith('_'):
continue
if not callable(filter_definition):
if filter_name.startswith('_') or not callable(filter_definition):
continue
# Register all other objects as filters
self.register_filter(filter_name_format.format(filter_name), filter_definition)
Expand Down Expand Up @@ -1190,7 +1188,7 @@ def init_plugins(self, commands_only=False, load_all=False):

# Check with registered filters and configure filters
for actions in self.config['FILTERS'].values():
for i, f in list(enumerate(actions)):
for i, f in enumerate(actions):
if isinstance(f, str):
# Check whether this denotes a registered filter
_f = self.filters.get(f)
Expand Down

0 comments on commit a9d46bc

Please sign in to comment.