diff --git a/crawl.py b/crawl.py index 3b44654..64cb332 100755 --- a/crawl.py +++ b/crawl.py @@ -52,6 +52,7 @@ parser.add_argument( parser.add_argument( '--cache-dir', dest='cache_dir', + type=str, help='Override the default cache directory with your own path' ) exc_group = parser.add_mutually_exclusive_group() @@ -78,23 +79,23 @@ vals_group.add_argument( def _process_stdin(argv: str, res: utils.CurrencyResult) -> None: - argv=argv.split() + argv = argv.split() try: if argv[0] in ['q', 'exit', 'quit']: sys.exit() elif argv[0] in ['date', 'd']: print(res.date) - elif len(argv[0])==3 or len(argv[1])==3: + elif len(argv[0]) == 3 or len(argv[1]) == 3: # more than 3 letter abbreviations are invalid if is_float(argv[0]): - # amount first -> convert to currency in argv[1] + # amount first -> convert to currency in argv[1] print(fmt_and_calc( cur=argv[1].upper(), amt=float(argv[0]), res=res, direction=DIRECTION_FROM_EUR)) elif is_float(argv[1]): - # currency first -> convert to EUR + # currency first -> convert to EUR print(fmt_and_calc( cur=argv[0].upper(), amt=float(argv[1]),