Whitelist parameter of specific function
VakarisZ opened this issue · comments
Vakaris Žilius commented
I have a vulture complaint:
C:\Users\vzilius\Desktop\infection_monkey\monkey\common\utils\IJSONSerializable.py:9: unused variable 'json_string' (100% confidence)
The method looks like:
class IJSONSerializable(ABC):
@classmethod
@abstractmethod
def from_json(cls, json_string: str) -> IJSONSerializable:
pass
The method is an abstract class method, thus it doesn't use the variable. Is there a way to whitelist this parameter without 1. changing the code 2. whitelisting everything that's json_string
? Couldn't find anything in the documentation or examples, except "rename the parameter to _json_string".
Jendrik Seipp commented
For this specific example, I'd replace pass
by del json_string
(see README).
Jendrik Seipp commented
I don't think there's a solution that satisfies both 1. and 2. at the same time.