Skip to content

Commit 0c5b9e1

Browse files
committed
2 parents 5d6e11f + 2d0cd7f commit 0c5b9e1

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

.github/workflows/scorecard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
persist-credentials: false
2626

2727
- name: "Run analysis"
28-
uses: ossf/[email protected].0
28+
uses: ossf/[email protected].1
2929
with:
3030
results_file: results.sarif
3131
results_format: sarif

doc/source/changelog.rst

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
Change Log
55
==========
66

7+
v2.2.0 (2025-03-07)
8+
===================
9+
10+
* Implemented `Move form imports to locally scoped imports where needed in fields.py <https://github.com/bckohan/django-enum/issues/79>`_
11+
712
v2.1.0 (2025-02-24)
813
===================
914

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ packages = ["src/django_enum"]
6060

6161

6262
[project.optional-dependencies]
63-
properties = ["enum-properties>=2.0.0"]
63+
properties = ["enum-properties>=2.2.0"]
6464
filters = ["django-filter>=21"]
6565
rest = ["djangorestframework>=3.9,<4.0"]
6666

src/django_enum/fields.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@
4242
from django.utils.functional import cached_property
4343
from django.utils.translation import gettext_lazy as _
4444

45-
from django_enum.forms import (
46-
EnumChoiceField,
47-
EnumFlagField,
48-
FlagSelectMultiple,
49-
NonStrictSelect,
50-
NonStrictSelectMultiple,
51-
)
5245
from django_enum.query import ( # HasAllFlagsExtraBigLookup,
5346
HasAllFlagsLookup,
5447
HasAnyFlagsLookup,
@@ -669,6 +662,13 @@ def formfield(self, form_class=None, choices_form_class=None, **kwargs):
669662
# we try to pass in. Very annoying because we have to
670663
# un-encapsulate some of this initialization logic, this makes our
671664
# EnumChoiceField pretty ugly!
665+
from django_enum.forms import (
666+
EnumChoiceField,
667+
EnumFlagField,
668+
FlagSelectMultiple,
669+
NonStrictSelect,
670+
NonStrictSelectMultiple,
671+
)
672672

673673
is_multi = self.enum and issubclass(self.enum, Flag)
674674
if is_multi and self.enum:

uv.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)