Skip to content
Permalink
Browse files
Fix code style
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 12, 2017
1 parent 9d1e220 commit cea44e55a69303ff9fdb57dcf9a3b4b4a41f322e
@@ -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

@@ -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()
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-

"""Plugins for Nikola."""

@@ -30,7 +30,6 @@
import csv
import datetime
import os
import sys
from pkg_resources import resource_filename

try:
@@ -32,7 +32,6 @@
import os
import re
import subprocess
import sys
import time
try:
from urlparse import urlparse
@@ -29,7 +29,6 @@
import io
import json
import os
import sys

try:
from nbconvert.exporters import HTMLExporter
@@ -30,7 +30,6 @@
import datetime
import dateutil.tz
import os
import sys
try:
from urlparse import urljoin, urlparse
import robotparser as robotparser
@@ -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
@@ -24,8 +24,6 @@
"""



import os

import io
@@ -7,7 +7,6 @@
import pytest
from nikola import shortcodes
from .base import FakeSite, BaseTestCase
import sys


def noargs(site, data='', lang=''):
@@ -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)

0 comments on commit cea44e5

Please sign in to comment.