(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None)
| 16 | |
| 17 | @docstring(init.__doc__) |
| 18 | def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None) -> None: |
| 19 | parser = argparse.ArgumentParser( |
| 20 | prog=__command__, |
| 21 | description=init.__doc__, |
| 22 | add_help=True, |
| 23 | formatter_class=SmartFormatter, |
| 24 | ) |
| 25 | parser.add_argument( |
| 26 | '--force', # '-f', |
| 27 | action='store_true', |
| 28 | help='Ignore unrecognized files in current directory and initialize anyway', |
| 29 | ) |
| 30 | parser.add_argument( |
| 31 | '--quick', '-q', |
| 32 | action='store_true', |
| 33 | help='Run any updates or migrations without rechecking all snapshot dirs', |
| 34 | ) |
| 35 | parser.add_argument( |
| 36 | '--setup', #'-s', |
| 37 | action='store_true', |
| 38 | help='Automatically install dependencies and extras used for archiving', |
| 39 | ) |
| 40 | command = parser.parse_args(args or ()) |
| 41 | reject_stdin(__command__, stdin) |
| 42 | |
| 43 | init( |
| 44 | force=command.force, |
| 45 | quick=command.quick, |
| 46 | setup=command.setup, |
| 47 | out_dir=pwd or OUTPUT_DIR, |
| 48 | ) |
| 49 | |
| 50 | |
| 51 | if __name__ == '__main__': |
no test coverage detected