Add isort1
Do not do any travis checks, but append the commands, so that we can use isort to clean up the code
This commit is contained in:
parent
411213b1ce
commit
8ad6accaa6
@ -15,6 +15,7 @@ install:
|
||||
- "node_modules/.bin/gulp --production"
|
||||
script:
|
||||
- "flake8 --max-line-length=150 --statistics openslides tests"
|
||||
- "isort --check-only --recursive openslides tests"
|
||||
|
||||
- "DJANGO_SETTINGS_MODULE='tests.settings' coverage run ./manage.py test tests.unit"
|
||||
- "coverage report --show-missing --fail-under=35"
|
||||
|
@ -120,3 +120,9 @@ def po2json(args=None):
|
||||
lang = args.language
|
||||
call('node_modules/.bin/po2json openslides/locale/%s/javascript.po openslides/static/i18n/%s.json' %
|
||||
(lang, lang))
|
||||
|
||||
|
||||
@command('isort',
|
||||
help='Sorts all imports in all python files.')
|
||||
def isort(args=None):
|
||||
return call('isort --recursive openslides tests')
|
||||
|
@ -2,8 +2,9 @@
|
||||
-r requirements_production.txt
|
||||
|
||||
# Requirements for development and tests in alphabetical order
|
||||
coverage==3.7.1
|
||||
flake8==2.2.4
|
||||
coverage
|
||||
flake8
|
||||
isort
|
||||
|
||||
# Requirements for OpenSlides handbook/documentation in alphabetical order
|
||||
Sphinx==1.2.2
|
||||
|
4
setup.cfg
Normal file
4
setup.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
[isort]
|
||||
multi_line_output=3
|
||||
include_trailing_comma=True
|
||||
skip=main.py,signals.py,csv_import.py,global_settings.py,test_personal_info.py,tests.py,auth.py,search_indexes.py,test_list_of_speakers.py,chatbox.py,test_main_menu.py,test_config.py,runserver.py,rest_api.py,settings.py,test_pdf.py,__main__.py,test_serializers.py,autoupdate.py,pdf.py,widgets.py,models.py,test_csv_import.py,plugins.py,serializers.py,test_csv.py,test_overlays.py,backupdb.py,views.py,test_views.py,urls.py,forms.py,utils.py,test_auth.py
|
Loading…
Reference in New Issue
Block a user