Commit 82a9f923 authored by Myle Ott's avatar Myle Ott Committed by Facebook Github Bot
Browse files

Fix arg formatting in preprocess.py and add fmt control for black formatting (#399)

Summary:
Not switching to Black formatting just yet, but adding fmt: off directives in case we decide to later.
Pull Request resolved: https://github.com/pytorch/fairseq/pull/399

Differential Revision: D13364674

Pulled By: myleott

fbshipit-source-id: a20a11a18be3d583ee30eff770278fb4bd05b93c
parent 0693c351
...@@ -16,8 +16,10 @@ from fairseq.data import IndexedDataset ...@@ -16,8 +16,10 @@ from fairseq.data import IndexedDataset
def get_parser(): def get_parser():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='writes text from binarized file to stdout') description='writes text from binarized file to stdout')
# fmt: off
parser.add_argument('--dict', metavar='FP', required=True, help='dictionary containing known words') parser.add_argument('--dict', metavar='FP', required=True, help='dictionary containing known words')
parser.add_argument('--input', metavar='FP', required=True, help='binarized file to read') parser.add_argument('--input', metavar='FP', required=True, help='binarized file to read')
# fmt: on
return parser return parser
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment