Skip to content

Commit d33a49a

Browse files
committed
fix: make the python 3.10 plus
1 parent 2e97254 commit d33a49a

18 files changed

+5
-37
lines changed

djangocms_versioning/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def get_queryset(self, request: HttpRequest) -> models.QuerySet:
321321
description=_("State"),
322322
ordering="content_state",
323323
)
324-
def get_versioning_state(self, obj: models.Model) -> typing.Union[str, None]:
324+
def get_versioning_state(self, obj: models.Model) -> str | None:
325325
"""Returns verbose text of objects versioning state. This is a text column without user interaction.
326326
Typically, either ``get_versioning_state`` or ``state_indicator`` (provided by the
327327
:class:`~djangocms_versioning.admin.StateIndicatorMixin`) is used. The state indicator
@@ -335,7 +335,7 @@ def get_versioning_state(self, obj: models.Model) -> typing.Union[str, None]:
335335
description=_("Author"),
336336
ordering="content_created_by_sort",
337337
)
338-
def get_author(self, obj: models.Model) -> typing.Union[str, None]:
338+
def get_author(self, obj: models.Model) -> str | None:
339339
"""
340340
Return the author who created a version
341341
:param obj: Versioned grouper model instance annotated with its author username
@@ -349,7 +349,7 @@ def get_author(self, obj: models.Model) -> typing.Union[str, None]:
349349
description=_("Modified"),
350350
ordering="content_modified",
351351
)
352-
def get_modified_date(self, obj: models.Model) -> typing.Union[str, None]:
352+
def get_modified_date(self, obj: models.Model) -> str | None:
353353
"""
354354
Get the last modified date of a version
355355
:param obj: Versioned grouper model instance annotated with its modified datetime

djangocms_versioning/emails.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from djangocms_versioning.helpers import send_email
1212

1313

14-
def get_full_url(location: str, site: typing.Union[Site, None] = None) -> str:
14+
def get_full_url(location: str, site: Site | None = None) -> str:
1515
if not site:
1616
site = Site.objects.get_current()
1717

djangocms_versioning/migrations/0001_initial.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.13 on 2018-06-12 12:21
3-
from __future__ import unicode_literals
42

53
from django.db import migrations, models
64

djangocms_versioning/migrations/0002_delete_campaign.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.14 on 2018-07-24 12:42
3-
from __future__ import unicode_literals
42

53
from django.db import migrations
64

djangocms_versioning/migrations/0003_version.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11 on 2018-07-30 14:41
3-
from __future__ import unicode_literals
42

53
from django.db import migrations, models
64
import django.db.models.deletion

djangocms_versioning/migrations/0004_auto_20180730_1135.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.14 on 2018-07-30 10:35
3-
from __future__ import unicode_literals
42

53
from django.conf import settings
64
from django.db import migrations, models

djangocms_versioning/migrations/0005_remove_version_label.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.14 on 2018-08-03 13:32
3-
from __future__ import unicode_literals
42

53
from django.db import migrations
64

djangocms_versioning/migrations/0006_auto_20180809_1714.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.14 on 2018-08-09 16:14
3-
from __future__ import unicode_literals
42

53
from django.db import migrations
64

@@ -14,6 +12,6 @@ class Migration(migrations.Migration):
1412

1513
operations = [
1614
migrations.AlterUniqueTogether(
17-
name="version", unique_together=set([("content_type", "object_id")])
15+
name="version", unique_together={("content_type", "object_id")}
1816
)
1917
]

djangocms_versioning/migrations/0007_auto_20180813_1407.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11.14 on 2018-08-13 13:07
3-
from __future__ import unicode_literals
42

53
from django.conf import settings
64
from django.db import migrations, models

djangocms_versioning/migrations/0008_auto_20180820_1754.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
21
# Generated by Django 1.11 on 2018-08-20 15:54
3-
from __future__ import unicode_literals
42

53
from django.conf import settings
64
from django.db import migrations, models

0 commit comments

Comments
 (0)