this is because the logic checks if it's uppercase by making sure there are no lowercase characters in the name (which is usually correct, variables like _1 are treated as Final by pyright. whether or not that's https://github.com/DetachHead/basedpyright/labels/as%20designed is another discussion).
however _ is special-cased to allow reassignment:

this is because the logic checks if it's uppercase by making sure there are no lowercase characters in the name (which is usually correct, variables like
_1are treated asFinalby pyright. whether or not that's https://github.com/DetachHead/basedpyright/labels/as%20designed is another discussion).however

_is special-cased to allow reassignment: