From c09b7c86bf45104d0d20092291e26e7c006e04f4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:02:19 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) - [github.com/pycqa/flake8: 6.1.0 → 7.0.0](https://github.com/pycqa/flake8/compare/6.1.0...7.0.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8687e5218..93a880c47 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: exclude: ^docs/.*|.*.md - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black language_version: python3 @@ -32,6 +32,6 @@ repos: args: ["-d", "relaxed"] - repo: https://github.com/pycqa/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 From 24aefa3e8f50be16df89289ceab46c97bb3f56bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:02:37 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- model_clone/admin.py | 6 +++--- model_clone/mixin.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/model_clone/admin.py b/model_clone/admin.py index fe4a3d627..15c44a7ca 100644 --- a/model_clone/admin.py +++ b/model_clone/admin.py @@ -17,9 +17,9 @@ class CloneModelAdminMixin(object): def change_view(self, request, object_id, form_url="", extra_context=None): extra_context = extra_context or {} - extra_context[ - "include_duplicate_object_link" - ] = self.include_duplicate_object_link + extra_context["include_duplicate_object_link"] = ( + self.include_duplicate_object_link + ) if self.include_duplicate_object_link: to_field = request.POST.get(TO_FIELD_VAR, request.GET.get(TO_FIELD_VAR)) if to_field and not self.to_field_allowed(request, to_field): diff --git a/model_clone/mixin.py b/model_clone/mixin.py index e6d383e51..b8868ca65 100644 --- a/model_clone/mixin.py +++ b/model_clone/mixin.py @@ -23,7 +23,6 @@ class CloneMixin(object): - """CloneMixin mixin to duplicate an object using the model's class. :param _clone_fields: Restricted List of fields to copy from the instance.