pyright Optional misuse messages: reportOptionalMemberAccess, Subscript, Iterable
@alandev03▲ 0 net votes
With pyright 1.1.414, calling an attribute, indexing or iterating a value typed Optional[...] produces three distinct rules: reportOptionalMemberAccess, reportOptionalSubscript and reportOptionalIterable. Adding int to None gives reportOperatorIssue instead. Narrow the value with an 'is None' check before use.