Switch to ruff for linting (a5c064cc) · Commits · Sturm / Brown Hill Community Hub website · GitLab
2026-03-10
·
via Ben Sturmfels activity
| Original line number |
Diff line number |
Diff line |
|
@@ -15,12 +15,16 @@ def install_scheduled_jobs(c): |
|
|
c, 'deploy/cron.weekly', f'/etc/cron.weekly/{c.env.site_name}', '755')
|
|
|
|
|
|
|
|
|
def ruff_test(c):
|
|
|
c.local("git ls-files '*.py' | xargs ruff check")
|
|
|
|
|
|
|
|
|
@task(hosts=hosts)
|
|
|
def deploy(c):
|
|
|
if not c.config.sudo.password:
|
|
|
c.config.sudo.password = df2.read_gpg_password_file(c, os.environ['GPG_ENCRYPTED_SUDO_PASSWORD_FILE'])
|
|
|
# df2.grep_for_pdb(c)
|
|
|
df2.lint(c)
|
|
|
df2.grep_for_pdb(c)
|
|
|
ruff_test(c)
|
|
|
df2.transfer_files_git(c)
|
|
|
df2.init(c)
|
|
|
df2.prepare_virtualenv(c)
|
|
|
| Original line number |
Diff line number |
Diff line |
|
|
# Generated by Django 1.11.11 on 2018-07-05 08:58
|
|
|
|
|
|
import json
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
import django.db.models.deletion
|
|
|
import modelcluster.fields
|
|
|
| Original line number |
Diff line number |
Diff line |
|
@@ -11,7 +11,7 @@ if __name__ == "__main__": |
|
|
# issue is really that Django is missing to avoid masking other
|
|
|
# exceptions on Python 2.
|
|
|
try:
|
|
|
import django #pylint: disable=unused-import
|
|
|
import django #noqa: F401
|
|
|
except ImportError:
|
|
|
raise ImportError(
|
|
|
"Couldn't import Django. Are you sure it's installed and "
|
|
|
| Original line number |
Diff line number |
Diff line |
|
@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.10/ref/settings/ |
|
|
"""
|
|
|
|
|
|
import os
|
|
|
from crispy_forms_foundation.settings import * #noqa: F403
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
@@ -182,7 +183,6 @@ MANAGERS = ADMINS + [ |
|
|
SERVER_EMAIL = 'no-reply@brownhill.vic.au'
|
|
|
DEFAULT_FROM_EMAIL = 'Brown Hill Community Hub <no-reply@sturmapps.com.au>'
|
|
|
|
|
|
from crispy_forms_foundation.settings import * #pylint: disable=wildcard-import
|
|
|
CRISPY_TEMPLATE_PACK = 'foundation-6'
|
|
|
|
|
|
|
|
|
| Original line number |
Diff line number |
Diff line |
|
|
#pylint: disable=wildcard-import
|
|
|
from .base import *
|
|
|
from .base import * #noqa: F403
|
|
|
|
|
|
SECRET_KEY = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
|
|
|
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。