Lines Matching refs:filename
81 logger.log(level, '%s:%d:%d: '+fmt, self.file.filename, pos.line, pos.col, *args)
303 filename: Path
306 def __init__(self, files: 'FileList', filename: os.PathLike, force:bool=False) -> None:
309 self.filename = Path(filename)
318 return self.filename.parts[-len(nameparts):] == nameparts
329 DBG("%s: scanning for %s", self.filename, klass.__name__)
332 DBG('%s: %d matches found for %s: %s', self.filename, len(matches),
352 with open(self.filename, 'rt') as f:
395 def write_to_filename(self, filename: os.PathLike) -> None:
396 with open(filename, 'wt') as of:
400 newfile = self.filename.with_suffix('.changed')
402 os.rename(newfile, self.filename)
408 subprocess.call(['diff', '-u', self.filename, f.name])
438 INFO("Scanning file %s", f.filename)
440 INFO("Generating patches for file %s", f.filename)
448 logger.exception("%s: failed to patch file", f.filename)