-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Describe the bug
👋
Sentinels should rather be compared with is but afaik == is fine as well. Currently pyright raises an issue in case a Sentinel (or a union containing one) is compared with another sentinel.
Code or Screenshots
Code sample in pyright playground
# pyright: enableExperimentalFeatures=true
from typing_extensions import Sentinel
S = Sentinel("S")
S2 = Sentinel("S2")
S == S #reportOperatorIssue
S == S2 #reportOperatorIssueVS Code extension or command-line
playground 1.1.403
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working