diff --git a/.gitguardian.yml b/.gitguardian.yml index 663b27ba00..78ab32525d 100644 --- a/.gitguardian.yml +++ b/.gitguardian.yml @@ -1,2 +1,4 @@ -exclude_paths: +version: 2 +secret: + ignored_paths: - pod/enrichment/tests/test_views.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68b5d5639c..2cef09ccc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/gitguardian/ggshield - rev: v1.27.0 + rev: v1.32.0 hooks: - id: ggshield language_version: python3 - stages: [commit] + stages: [pre-commit] diff --git a/Makefile b/Makefile index f5eaae6da9..e29ae0170c 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ # Affiche la liste des commandes disponibles help: - echo "Syntax: [make target] where target is in this list:" + @echo "Syntax: [make target] where target is in this list:" @awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t # Démarre le serveur de test diff --git a/pod/completion/admin.py b/pod/completion/admin.py index 12de1b4dbf..4c404f292d 100644 --- a/pod/completion/admin.py +++ b/pod/completion/admin.py @@ -241,6 +241,7 @@ def enrich_kaldi_model_launch() -> None: @admin.action(description=_("Enrich with selected subtitles")) def enrich_model(modeladmin, request, queryset) -> None: + """Enrich with selected subtitles.""" text = "" title = "" for query in list(queryset.all()): @@ -249,7 +250,7 @@ def enrich_model(modeladmin, request, queryset) -> None: title += query.video.title file = query.src.file for caption in webvtt.read(file.path): - text += caption.text + " \n" + text += caption.text + "\n" query.enrich_ready = False query.save() diff --git a/pod/dressing/templates/my_dressings.html b/pod/dressing/templates/my_dressings.html index 14711c212f..75ae58e380 100644 --- a/pod/dressing/templates/my_dressings.html +++ b/pod/dressing/templates/my_dressings.html @@ -91,10 +91,15 @@ {% endif %}
- + - +
diff --git a/pod/import_video/forms.py b/pod/import_video/forms.py index 1a858eb0d9..7ea44d8e17 100644 --- a/pod/import_video/forms.py +++ b/pod/import_video/forms.py @@ -42,13 +42,13 @@ class ExternalRecordingForm(forms.ModelForm): ), ) - def filter_fields_admin(form): + def filter_fields_admin(form) -> None: """List fields, depends on user right.""" if not form.is_superuser and not form.is_admin: form.remove_field("owner") form.remove_field("site") - def clean(self): + def clean(self) -> None: """Clean method.""" cleaned_data = super(ExternalRecordingForm, self).clean() try: diff --git a/pod/import_video/templates/import_video/add_or_edit.html b/pod/import_video/templates/import_video/add_or_edit.html index 65ccef3744..913006baa0 100644 --- a/pod/import_video/templates/import_video/add_or_edit.html +++ b/pod/import_video/templates/import_video/add_or_edit.html @@ -33,7 +33,7 @@ {% if form.errors %}

{% trans "One or more errors have been found in the form." %}
{% for error in form.non_field_errors %} - - {{ error }}
+ - {{ error }}
{% endfor %}

{% endif %} diff --git a/pod/live/templates/live/event-info.html b/pod/live/templates/live/event-info.html index 9d4f44fdbb..aec2f1b631 100644 --- a/pod/live/templates/live/event-info.html +++ b/pod/live/templates/live/event-info.html @@ -118,11 +118,13 @@