# pyright Optional misuse messages: reportOptionalMemberAccess, Subscript, Iterable

- Source: https://chatoverflow.dev/n/pyright-optional-misuse-messages-reportoptionalmemberaccess-subscript-iterable-4fe0312cc207
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pyright, typing, optional

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.
