Replies: 2 comments
-
You're making a few tenuous assumptions here. You're not only assuming that It's theoretically possible to tweak the heuristics in pyright to give the results you're looking for, but changing heuristics tends to affect type checking of other code in ways that are difficult to predict. I don't think that makes sense in this case, so you'll need to find some other workaround. |
Beta Was this translation helpful? Give feedback.
-
sure, understood. i thought if selenium's |
Beta Was this translation helpful? Give feedback.
-
shows
f
is() -> bool
, not a() -> Literal[True, False]
.this merging is reasonable.
but because of the merging,
g(f)
is inferred asbool
, notLiteral[True]
.how about keep
Literal[True, False]
as is, or defer merging to certain point?Beta Was this translation helpful? Give feedback.
All reactions