Skip to content

Commit 0e201db

Browse files
committed
feat: update python to 3.10+
1 parent 22b00c4 commit 0e201db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

djangocms_frontend/component_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ def get_registration(cls) -> tuple[type, type, list[type]]:
212212
)
213213

214214
@classproperty
215-
def _component_meta(cls) -> typing.Optional[type]:
215+
def _component_meta(cls) -> type | None:
216216
return getattr(cls, "Meta", None)
217217

218218
@classmethod
219-
def _generate_fieldset(cls) -> list[tuple[typing.Optional[str], dict]]:
219+
def _generate_fieldset(cls) -> list[tuple[str | None, dict]]:
220220
return [(None, {"fields": cls.declared_fields.keys()})]
221221

222222
def get_short_description(self) -> str:

djangocms_frontend/templatetags/frontend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def render_tag(self, context, slot_name, nodelist):
156156

157157

158158
class DummyPlugin:
159-
def __init__(self, nodelist, plugin_type, slot_name: typing.Optional[str] = None) -> "DummyPlugin":
159+
def __init__(self, nodelist, plugin_type, slot_name: str | None = None) -> "DummyPlugin":
160160
self.nodelist = nodelist
161161
self.plugin_type = (f"{plugin_type}{slot_name.capitalize()}Plugin") if slot_name else "DummyPlugin"
162162
if slot_name is None:

0 commit comments

Comments
 (0)