logger.error("sync and async files... out of sync!")
return 1
- # Check that all the files to convert are included in the --all list
+ # Check that all the files to convert are included in the ALL_INPUTS files list
cmdline = ["git", "grep", "-l", f"auto-generated by '{SCRIPT_NAME}'", "**.py"]
maybe_conv = sp.check_output(cmdline, cwd=str(PROJECT_DIR), text=True).split()
if not maybe_conv:
)
if unk_conv:
logger.error(
- "files converted by %s but not included in --all list: %s",
+ "files converted by %s but not included in ALL_INPUTS: %s",
SCRIPT_NAME,
", ".join(unk_conv),
)
parser.add_argument(
"--check", action="store_true", help="return with error in case of differences"
)
- parser.add_argument(
- "--all", action="store_true", help="process all the files of the project"
- )
parser.add_argument(
"-B",
"--convert-all",
metavar="FILE",
nargs="*",
type=Path,
- help="the files to process (if --all is not specified)",
+ help="the files to process (process all files if not specified)",
)
opt = parser.parse_args()
- if opt.all and opt.inputs:
- parser.error("can't specify input files and --all together")
-
- if opt.all:
- opt.inputs = [PROJECT_DIR / Path(fn) for fn in ALL_INPUTS]
-
if not opt.inputs:
- parser.error("no input file provided")
+ opt.inputs = [PROJECT_DIR / Path(fn) for fn in ALL_INPUTS]
fp: Path
for fp in opt.inputs: