Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 8, 2015
1 parent c8f0cb5 commit 21fd3c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -23,7 +23,7 @@ install:
- "if [[ $NMODE == 'flake8' ]]; then pip install flake8; fi"
script:
- "if [[ $NMODE == 'nikola' ]]; then py.test tests/; fi"
- "if [[ $NMODE == 'flake8' ]]; then flake8 .; fi"
- "if [[ $NMODE == 'flake8' ]]; then flake8 v*/; fi"
notifications:
irc:
channels:
Expand Down
6 changes: 3 additions & 3 deletions v6/iarchiver/iarchiver.py
Expand Up @@ -32,6 +32,9 @@
import time
import dateutil.tz

from nikola.plugin_categories import Command
from nikola.utils import get_logger

if sys.version_info[0] == 2:
import robotparser as robotparser
from urlparse import urljoin
Expand All @@ -41,9 +44,6 @@
from urllib.parse import urljoin
import urllib.request as web_browser

from nikola.plugin_categories import Command
from nikola.utils import get_logger


class Iarchiver(Command):
"""Archive site updates."""
Expand Down
3 changes: 2 additions & 1 deletion v7/projectpages/projectpages.py
Expand Up @@ -132,7 +132,8 @@ def gen_tasks(self):
context["description"] = None
context["permalink"] = '/' + short_tdst.replace('\\', '/')

sortf = lambda p: ((-int(p.meta('sort')) if p.meta('sort') != '' else -1), p.title())
def sortf(p):
return ((-int(p.meta('sort')) if p.meta('sort') != '' else -1), p.title())

context["featured"] = sorted((p for p in self.projects if p.meta('featured') not in ('False', '0', 'false', 'no', '')), key=sortf)
context["projects"] = sorted((p for p in self.projects if p.meta('hidden') not in ('False', '0', 'false', 'no')), key=sortf)
Expand Down

0 comments on commit 21fd3c6

Please sign in to comment.