Closed colinc719 closed 4 years ago
Would it make sense to have the text of non-python files still go through Vulture._handle_string? For instance,
Vulture._handle_string
class Temp: def __init__(self): self.arg = None pattern = '{self.arg!s}' assert pattern.format(self=Temp())
correctly produces no problems, but if you move the pattern to a separate txt file
temp.txt:
{self.arg!s}
temp.py
class Temp: def __init__(self): self.arg = None pattern = open('temp.txt').read() assert pattern.format(self=Temp())
It will produce "unused attribute 'arg'".
Vulture will parse a file not ending with .py if it's passed on the command line and if it contains correct Python syntax. I don't think it makes sense to consider files that don't contain valid Python.
Would it make sense to have the text of non-python files still go through
Vulture._handle_string
? For instance,correctly produces no problems, but if you move the pattern to a separate txt file
temp.txt:
temp.py
It will produce "unused attribute 'arg'".