Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 3, 2024
1 parent 719f89e commit 4cf20ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,10 +1668,7 @@ def check_callable_call(
# An Enum() call that failed SemanticAnalyzerPass2.check_enum_call().
return callee.ret_type, callee

if (
callee.is_type_obj()
and callee.type_object().is_protocol
):
if callee.is_type_obj() and callee.type_object().is_protocol:
self.chk.fail(
message_registry.CANNOT_INSTANTIATE_PROTOCOL.format(callee.type_object().name),
context,
Expand Down

0 comments on commit 4cf20ff

Please sign in to comment.