Lines Matching refs:file

7 (relative to the manifest file, as they appear in the CPython codebase).
93 """Yield lines to recreate the manifest file (sans comments/newlines)"""
147 def parse_manifest(file):
148 """Parse the given file (iterable of lines) to a Manifest"""
152 data = tomllib.load(file)
166 # Most actions are "generators", which generate a single file from the
167 # manifest. (Checking works by generating a temp file & comparing.)
168 # Other actions, like "--unixy-check", don't work on a single file.
172 """Decorates a file generator: function that writes to a file"""
185 write = partial(print, file=outfile)
267 write = partial(print, file=outfile)
341 write = partial(print, file=outfile)
360 """Generate/check a file with a single generator
452 print(msg, file=sys.stderr)
454 print(' -', item, file=sys.stderr)
505 """), file=sys.stderr)
535 + [str(file) for file in headers],
578 + [str(file) for file in headers],
610 with filename.open('rb') as file:
611 from_file = tomllib.load(file)
613 print(f'Dump differs from loaded data!', file=sys.stderr)
621 print(line, file=sys.stderr)
632 "file", type=Path, metavar='FILE',
633 help="file with the stable abi manifest",
637 help="generate file(s), rather than just checking them",
641 help="as --generate, but generate all file(s) using default filenames."
671 base_path = args.file.parent.parent
688 file = args.file.open('rb')
690 if args.file.suffix == '.txt':
692 suggestion = args.file.with_suffix('.toml')
694 f'{args.file} not found. Did you mean {suggestion} ?') from err
696 with file:
697 manifest = parse_manifest(file)
709 results['dump'] = check_dump(manifest, args.file)
725 parser.error('No file specified. Use --help for usage.')
741 The stable ABI manifest is at: {args.file}