mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
fix linting
This commit is contained in:
parent
37087da1a3
commit
614b4187c7
4 changed files with 5 additions and 4 deletions
6
Makefile
6
Makefile
|
@ -26,13 +26,13 @@ update: install-poetry ## update the sources and installation
|
||||||
poetry update
|
poetry update
|
||||||
|
|
||||||
lint: ## Run code formatters and linter
|
lint: ## Run code formatters and linter
|
||||||
poetry run flynt --fail-on-change --line_length=${MAX_LINE_LENGTH} django_ynh
|
poetry run flynt --fail-on-change --line_length=${MAX_LINE_LENGTH} .
|
||||||
poetry run isort --check-only .
|
poetry run isort --check-only .
|
||||||
poetry run flake8 django_ynh
|
poetry run flake8 django_ynh
|
||||||
|
|
||||||
fix-code-style: ## Fix code formatting
|
fix-code-style: ## Fix code formatting
|
||||||
poetry run flynt --line_length=${MAX_LINE_LENGTH} django_ynh
|
poetry run flynt --line_length=${MAX_LINE_LENGTH} .
|
||||||
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization django_ynh django_ynh_tests
|
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization .
|
||||||
poetry run isort .
|
poetry run isort .
|
||||||
|
|
||||||
tox-listenvs: check-poetry ## List all tox test environments
|
tox-listenvs: check-poetry ## List all tox test environments
|
||||||
|
|
|
@ -7,6 +7,7 @@ import sys
|
||||||
def main():
|
def main():
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_ynh_demo_settings'
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_ynh_demo_settings'
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
def setup_demo_user(user):
|
def setup_demo_user(user):
|
||||||
"""
|
"""
|
||||||
The django_ynh DEMO use the Django admin. So we need a "staff" user ;)
|
The django_ynh DEMO use the Django admin. So we need a "staff" user ;)
|
||||||
|
|
|
@ -27,5 +27,6 @@ def publish():
|
||||||
creole_readme=True, # don't publish if README.rst is not up-to-date
|
creole_readme=True, # don't publish if README.rst is not up-to-date
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
publish()
|
publish()
|
||||||
|
|
Loading…
Add table
Reference in a new issue