Skip to content

Commit 22b0b73

Browse files
authored
Fixed warnings per flake8 6.1.0.
1 parent 4087367 commit 22b0b73

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
hooks:
1616
- id: isort
1717
- repo: https://github.com/PyCQA/flake8
18-
rev: 6.0.0
18+
rev: 6.1.0
1919
hooks:
2020
- id: flake8
2121
- repo: https://github.com/pre-commit/mirrors-eslint

django/db/models/functions/datetime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def resolve_expression(
9797
"TimeField, or DurationField."
9898
)
9999
# Passing dates to functions expecting datetimes is most likely a mistake.
100-
if type(field) == DateField and copy.lookup_name in (
100+
if type(field) is DateField and copy.lookup_name in (
101101
"hour",
102102
"minute",
103103
"second",
@@ -310,7 +310,7 @@ def resolve_expression(
310310
has_explicit_output_field = (
311311
class_output_field or field.__class__ is not copy.output_field.__class__
312312
)
313-
if type(field) == DateField and (
313+
if type(field) is DateField and (
314314
isinstance(output_field, DateTimeField)
315315
or copy.kind in ("hour", "minute", "second", "time")
316316
):

tests/schema/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def check_added_field_default(
242242
"SELECT {} FROM {};".format(field_name, model._meta.db_table)
243243
)
244244
database_default = cursor.fetchall()[0][0]
245-
if cast_function and type(database_default) != type(expected_default):
245+
if cast_function and type(database_default) is not type(expected_default):
246246
database_default = cast_function(database_default)
247247
self.assertEqual(database_default, expected_default)
248248

0 commit comments

Comments
 (0)