-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-high
Description
Joins of str and a subclass of unicode (in Python 2) are calculated inconsistently:
class S(unicode): pass
reveal_type('' if bool() else S()) # Sequence[unicode]
reveal_type(S() if bool() else '') # unicodeThis is probably caused by the promotion from str to unicode being handled differently depending on the order of the join operands.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-high