Skip to content

Commit

Permalink
Merge pull request #199 from nephila/lint
Browse files Browse the repository at this point in the history
Linting code
  • Loading branch information
yakky committed Aug 29, 2015
2 parents 315af62 + 2c339da commit bab8bed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions djangocms_installer/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def parse(args):

# Advanced options. These have a predefined default and are not managed
# by config wizard.
#parser.add_argument('--aldryn', '-a', dest='aldryn', action='store_true',
# parser.add_argument('--aldryn', '-a', dest='aldryn', action='store_true',
# default=False, help="Use Aldryn-boilerplate as project template")
parser.add_argument('--no-input', '-q', dest='noinput', action='store_true',
default=False, help="Don't run the configuration wizard, just use the provided values")
Expand Down Expand Up @@ -109,7 +109,7 @@ def parse(args):
for action in parser._positionals._actions:
if action.dest == 'timezone':
action.default = 'UTC'

# If config_args then pretend that config args came from the stdin and run parser again.
config_args = ini.parse_config_file(parser, args)
args = parser.parse_args(config_args + args)
Expand Down
8 changes: 4 additions & 4 deletions djangocms_installer/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
'--permissions', '--bootstrap', '--templates',
'--starting-page']

DJANGOCMS_DEVELOP = 'https://github.com/divio/django-cms/archive/develop.zip?%s' % time.time() ## to avoid getting this from caches or mirrors
DJANGOCMS_DEVELOP = 'https://github.com/divio/django-cms/archive/develop.zip?%s' % time.time()
DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/3.0c2.zip'
DJANGOCMS_BETA = 'https://github.com/divio/django-cms/archive/3.0.0.beta3.zip'
DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', 'stable', 'develop')

DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?%s' % time.time() ## to avoid getting this from caches or mirrors
DJANGO_BETA = 'https://github.com/django/django/archive/master.zip?%s' % time.time() ## to avoid getting this from caches or mirrors
DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?%s' % time.time()
DJANGO_BETA = 'https://github.com/django/django/archive/master.zip?%s' % time.time()
DJANGO_SUPPORTED = ('1.4', '1.5', '1.6', '1.7', '1.8', 'stable')

CMS_VERSION_MATRIX = {
Expand All @@ -35,7 +35,7 @@
3.2: (1.6, 1.8),
}

REQUIREMENTS ={
REQUIREMENTS = {
'default': [
'django-classy-tags>=0.3.4.1',
'html5lib',
Expand Down
2 changes: 1 addition & 1 deletion djangocms_installer/config/ini.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def dump_config_file(filename, args, parser=None):
keys_empty_values_not_pass = (
'--extra-settings', '--languages', '--requirements', '--template', '--timezone')

#_positionals._option_string_actions
# positionals._option_string_actions
for action in parser._actions:
if action.dest in ('help', 'config_file', 'config_dump', 'project_name'):
continue
Expand Down
3 changes: 1 addition & 2 deletions djangocms_installer/install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def check_install(config_data):
Many other errors will go undetected
"""
errors = []
size = 128, 128

# PIL tests
try:
Expand Down Expand Up @@ -73,7 +72,7 @@ def cleanup(requirements): # pragma: no cover

args = ['uninstall', '-q', '-y']
args.extend(requirements.split())
exit_status = pip.main(args)
pip.main(args)
return True


Expand Down
6 changes: 3 additions & 3 deletions djangocms_installer/share/starting_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def create_pages():
try:
# try to get a feature placeholder
placeholder_feature = page.placeholders.get(slot='feature')
p = add_plugin(placeholder_feature, 'TextPlugin', lang,
body=content['feature'])
add_plugin(placeholder_feature, 'TextPlugin', lang,
body=content['feature'])
except Placeholder.DoesNotExist:
# fallback, add it to the
add_plugin(placeholder['main'], 'TextPlugin', lang, body=content['feature'])
Expand All @@ -57,4 +57,4 @@ def create_pages():
if __name__ == '__main__':
if LooseVersion(django.get_version()) >= LooseVersion('1.7'):
django.setup()
create_pages()
create_pages()

0 comments on commit bab8bed

Please sign in to comment.