Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,8 @@ def check___new___signature(self, fdef: FuncDef, typ: CallableType) -> None:
"but must return a subtype of",
)
elif not isinstance(
get_proper_type(bound_type.ret_type), (AnyType, Instance, TupleType, UninhabitedType)
get_proper_type(bound_type.ret_type),
(AnyType, Instance, TupleType, UninhabitedType, LiteralType),
):
self.fail(
message_registry.NON_INSTANCE_NEW_TYPE.format(
Expand Down