Skip to content

Commit 6e89ffd

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b871eff commit 6e89ffd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

mypy/checker.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6997,8 +6997,6 @@ def refine_identity_comparison_expression(
69976997
# print("final_else_map", final_else_map)
69986998
return final_if_map, final_else_map
69996999

7000-
7001-
70027000
should_coerce = True
70037001
if coerce_only_in_literal_context:
70047002

@@ -8702,15 +8700,19 @@ def reduce_conditional_maps(
87028700
def is_singleton_value(t: Type) -> bool:
87038701
t = get_proper_type(t)
87048702
# TODO: check the type object thing
8705-
ret = isinstance(t, LiteralType) or t.is_singleton_type() or (isinstance(t, CallableType) and t.is_type_obj())
8703+
ret = (
8704+
isinstance(t, LiteralType)
8705+
or t.is_singleton_type()
8706+
or (isinstance(t, CallableType) and t.is_type_obj())
8707+
)
87068708
# print("!!!", t, type(t), ret)
87078709
return ret
87088710

87098711

87108712
def has_no_custom_eq_checks(t: Type) -> bool:
8711-
return not custom_special_method(
8712-
t, "__eq__", check_all=False
8713-
) and not custom_special_method(t, "__ne__", check_all=False)
8713+
return not custom_special_method(t, "__eq__", check_all=False) and not custom_special_method(
8714+
t, "__ne__", check_all=False
8715+
)
87148716

87158717

87168718
def is_type_call(expr: CallExpr) -> bool:

0 commit comments

Comments
 (0)