Skip to content

Commit

Permalink
Add django-upgrade to our pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ticosax committed Mar 24, 2023
1 parent 2f16bf5 commit 4a9e4f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ repos:
- "--line-length"
- "119"
exclude: ^django_fsm_log/migrations|^docs/
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.13.0"
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
2 changes: 1 addition & 1 deletion tests/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from .models import Article


@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
inlines = [StateLogInline]


admin.site.register(Article, ArticleAdmin)
4 changes: 2 additions & 2 deletions tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
urlpatterns = [path("admin", admin.site.urls)]
except ImportError:
# django < 2.0
from django.conf.urls import include, url
from django.urls import include, path
from django.contrib import admin

urlpatterns = [url(r"^admin/", include(admin.site.urls))]
urlpatterns = [path("admin/", include(admin.site.urls))]

0 comments on commit 4a9e4f9

Please sign in to comment.