I'm using the coc-pyright extension of CoC in neovim.
There are cases where we have an instance method in a class that doesn't need to access self variables. For example, I may have some variables in __init__
method which do not need to be accessed anywhere else in the class. As a toy example, consider,
class Example:
def __init__(self, some_var):
self.another_var = self.process_var(some_var)
def process_var(self, some_var):
return some_var*2
Now, here pyright warns me that self
is not accessed. Is there a way to set Pyright to not give a warning in such cases?
P.S. The variable being passed is an instance-specific variable. So self
would be required to make it an instance variable, right?