Showing 9 of 2,092 total issues
Consider simplifying this complex logical expression. Open
Open
if (
dependency.field_name is None
and dependency.type == OperationDependency.Type.CREATE
):
return (
Consider simplifying this complex logical expression. Open
Open
if (old_type is None and old_field.remote_field is None) or (
new_type is None and new_field.remote_field is None
):
raise ValueError(
"Cannot alter field %s into %s - they do not properly define "
Consider simplifying this complex logical expression. Open
Open
if (
isinstance(operation, DeleteModel)
and self.name_lower == operation.name_lower
and not self.options.get("proxy", False)
):
Consider simplifying this complex logical expression. Open
Open
if isinstance(other, UniqueConstraint):
return (
self.name == other.name
and self.fields == other.fields
and self.condition == other.condition
Consider simplifying this complex logical expression. Open
Open
if (
isinstance(self.group_by, tuple)
or self.is_sliced
or has_existing_aggregation
or refs_subquery
Consider simplifying this complex logical expression. Open
Open
if (old_field.db_index or old_field.unique) and (
(old_type.startswith("varchar") and not new_type.startswith("varchar"))
or (old_type.startswith("text") and not new_type.startswith("text"))
or (old_type.startswith("citext") and not new_type.startswith("citext"))
):
Consider simplifying this complex logical expression. Open
Open
if not prev_field or (
prev_field.is_relation
and field not in model._meta.parents.values()
and field is not model._meta.auto_field
and (
Consider simplifying this complex logical expression. Open
Open
if isinstance(other, Envelope):
return (
(self.min_x == other.min_x)
and (self.min_y == other.min_y)
and (self.max_x == other.max_x)
Consider simplifying this complex logical expression. Open
Open
if isinstance(other, self.__class__):
return (
self.name == other.name
and self.index_type == other.index_type
and self.expressions == other.expressions