def __init__(self, verbose=False, ignore_names=None, ignore_decorators=None): self.verbose = verbose def get_list(typ): return utils.LoggingList(typ, self.verbose) self.defined_attrs = get_list("attribute") self.defined_classes = get_list("class") self.defined_funcs = get_list("function") self.defined_imports = get_list("import") self.defined_methods = get_list("method") self.defined_props = get_list("property") self.defined_vars = get_list("variable") self.unreachable_code = get_list("unreachable_code") self.used_names = utils.LoggingSet("name", self.verbose) self.ignore_names = ignore_names or [] self.ignore_decorators = ignore_decorators or [] self.filename = Path() self.code = [] self.found_dead_code_or_error = False
def get_set(typ): return utils.LoggingSet(typ, self.verbose)