Skip to content

Commit

Permalink
ci: pre-commit autoupdate (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabian Braun <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and fsbraun authored Dec 3, 2024
1 parent 0dd49b4 commit df9a540
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.19.0
hooks:
- id: pyupgrade
args: ["--py39-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.6.1'
rev: '1.22.2'
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
args: [--target-version, "4.2"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.8.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 1 addition & 0 deletions djangocms_text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
9. Publish the release when ready
10. Github actions will publish the new package to pypi
"""

__version__ = "0.3.3"
12 changes: 6 additions & 6 deletions djangocms_text/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def discover_inline_editable_models():
if form:
field_instance = form.base_fields.get(field_name, None)
if field_instance.__class__.__name__ in registered_inline_fields:
inline_models[
f"{model._meta.app_label}-{model._meta.model_name}-{field_name}"
] = field_instance.__class__.__name__
inline_models[f"{model._meta.app_label}-{model._meta.model_name}-{field_name}"] = (
field_instance.__class__.__name__
)

from cms.plugin_pool import plugin_pool

Expand All @@ -47,9 +47,9 @@ def discover_inline_editable_models():
form = plugin.form
field_instance = form.base_fields.get(field_name, None)
if field_instance.__class__.__name__ in registered_inline_fields:
inline_models[
f"{model._meta.app_label}-{model._meta.model_name}-{field_name}"
] = field_instance.__class__.__name__
inline_models[f"{model._meta.app_label}-{model._meta.model_name}-{field_name}"] = (
field_instance.__class__.__name__
)

return inline_models

Expand Down
1 change: 0 additions & 1 deletion djangocms_text/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def hyphenate(t):


class AbstractText(CMSPlugin):

"""
Abstract Text Plugin Class designed to be backwards compatible with
djangocms-text-ckeditor:
Expand Down
4 changes: 1 addition & 3 deletions tests/test_app/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ToppingInlineAdmin(admin.TabularInline):
extra = 1


@admin.register(Pizza)
class PizzaAdmin(admin.ModelAdmin):
fieldsets = (
(
Expand All @@ -27,6 +28,3 @@ class PizzaAdmin(admin.ModelAdmin):
),
)
inlines = [ToppingInlineAdmin]


admin.site.register(Pizza, PizzaAdmin)

0 comments on commit df9a540

Please sign in to comment.