Skip to content

Commit 9e64336

Browse files
committed
fix linting issues
1 parent 6999d68 commit 9e64336

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

django_enum/choices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class FloatChoices(
6969
class MissingEnumProperties(Enum):
7070
"""Throw error if choice types are used without enum-properties"""
7171

72-
def __init__(self, *args, **kwargs):
72+
def __init__(self, *args, **kwargs): # pylint: disable=W0231
7373
raise ImportError(
7474
f'{self.__class__.__name__} requires enum-properties to be '
7575
f'installed.'

django_enum/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def __init__(self, *args, enum=None, **kwargs):
304304
choices = kwargs.get('choices', enum.choices if enum else [])
305305
kwargs.setdefault(
306306
'max_length',
307-
max([len(choice[0]) for choice in choices])
307+
max((len(choice[0]) for choice in choices))
308308
)
309309
super().__init__(*args, enum=enum, **kwargs)
310310

django_enum/tests/enum_prop/migrations/0001_initial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generated by Django 3.2.16 on 2022-10-25 11:36
22

3-
from django.db import migrations, models
43
import django_enum.fields
4+
from django.db import migrations, models
55

66

77
class Migration(migrations.Migration):

0 commit comments

Comments
 (0)