def __init__(self, *args, **kwargs):
        if kwargs not in 'choices' or len(kwargs['choices']) == 0:
            raise ValueError(
                '"choices" argument must be be a non-empty list'
            )

        choices = []
        for choice in kwargs['choices']:
            if isinstance(choice, tuple):
                choices.append(choice)
            elif isinstance(choice, six.string_types):
                choices.append((choice, choice))
            else:
                raise TypeError(
                    'Invalid choice "{choice}". '
                    'Expected string or tuple as elements in choices'.format(
                        choice=choice,
                    )
                )

        kwargs['choices'] = choices

        if 'max_length' in kwargs:
            raise TypeError('"max_length" is not a valid argument')
        # Massive to avoid problems with validation - let MySQL handle the
        # maximum string length
        kwargs['max_length'] = int(2 ** 32)

        super(EnumField, self).__init__(*args, **kwargs)
dataset/ETHPy150Open adamchainz/django-mysql/django_mysql/models/fields/enum.py/EnumField.__init__/swapped operands of `not in`