wrong arg name for `r` in `self.view.replace` of `sublime.pyi`
jrappen opened this issue · comments
In sublime.pyi
it's:
self.view.replace(edit, r, text)
not:
self.view.replace(edit, region, text)
it should follow the name in the corresponding .py
def replace(self, edit, r, text):
if edit.edit_token == 0:
raise ValueError("Edit objects may not be used after the TextCommand's run method has returned")
sublime_api.view_replace(self.view_id, edit.edit_token, r, text)
I know what it should be. The current LSP-pyright chockes on r
though and tells me to use region
instead.
Oops, there seems to be more things like this. I have to check.
Fixed in 49c0e8b. It turns out to be r
is actually the minor. Only 3 places use r
. Well spotted!
so, ... do I just clear my cache and restart for a reload?
so, ... do I just clear my cache and restart for a reload?
I didn't tag a release as I think pyright releases a new version quite frequently. If you you want to fix it locally now, maybe fix them in Package Storage\LSP-pyright\resources\typings\sublime_text\
.
ok thanks