Skip to content

Commit

Permalink
Fix code style
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 12, 2017
1 parent 9d1e220 commit cea44e5
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions nikola/__main__.py
Expand Up @@ -80,14 +80,12 @@ def main(args=None):
args = [sys_decode(arg) for arg in args]

conf_filename = 'conf.py'
conf_filename_bytes = b'conf.py'
conf_filename_changed = False
for index, arg in enumerate(args):
if arg[:7] == '--conf=':
del args[index]
del oargs[index]
conf_filename = arg[7:]
conf_filename_bytes = sys_encode(arg[7:])
conf_filename_changed = True
break

Expand Down
1 change: 1 addition & 0 deletions nikola/nikola.py
Expand Up @@ -2606,6 +2606,7 @@ def sanitized_locales(locale_fallback, locale_default, locales, translations):
NOTE: never use locale.getlocale(), it can return values that
locale.setlocale will not accept in Windows.
Examples: "Spanish", "French" can't do the full circle set / get / set
"""
if sys.platform != 'win32':
workaround_empty_LC_ALL_posix()
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-

"""Plugins for Nikola."""

1 change: 0 additions & 1 deletion nikola/plugins/basic_import.py
Expand Up @@ -30,7 +30,6 @@
import csv
import datetime
import os
import sys
from pkg_resources import resource_filename

try:
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/command/auto/__init__.py
Expand Up @@ -32,7 +32,6 @@
import os
import re
import subprocess
import sys
import time
try:
from urlparse import urlparse
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/compile/ipynb.py
Expand Up @@ -29,7 +29,6 @@
import io
import json
import os
import sys

try:
from nbconvert.exporters import HTMLExporter
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/sitemap/__init__.py
Expand Up @@ -30,7 +30,6 @@
import datetime
import dateutil.tz
import os
import sys
try:
from urlparse import urljoin, urlparse
import robotparser as robotparser
Expand Down
2 changes: 0 additions & 2 deletions nikola/plugins/template/mako.py
Expand Up @@ -29,8 +29,6 @@
import io
import os
import shutil
import sys
import tempfile

from mako import exceptions, util, lexer, parsetree
from mako.lookup import TemplateLookup
Expand Down
2 changes: 0 additions & 2 deletions tests/test_rst_compiler.py
Expand Up @@ -24,8 +24,6 @@
"""



import os

import io
Expand Down
3 changes: 1 addition & 2 deletions tests/test_shortcodes.py
Expand Up @@ -7,7 +7,6 @@
import pytest
from nikola import shortcodes
from .base import FakeSite, BaseTestCase
import sys


def noargs(site, data='', lang=''):
Expand Down Expand Up @@ -169,8 +168,8 @@ def test_errors(self):
('AAA{{% foo %}} BBB {{% bar %}} quux {{% /bar %}} CCC',
(u'AAASC1 BBB SC2 CCC',
{u'SC1': u'{{% foo %}}', u'SC2': u'{{% bar %}} quux {{% /bar %}}'})), ])
def test_extract_shortcodes(input, expected, monkeypatch):

def test_extract_shortcodes(input, expected, monkeypatch):
i = iter('SC%d' % i for i in range(1, 100))
monkeypatch.setattr(shortcodes, '_new_sc_id', i.__next__)
extracted = shortcodes.extract_shortcodes(input)
Expand Down

0 comments on commit cea44e5

Please sign in to comment.