Skip to content

Commit

Permalink
Transform files into positional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesegfault committed Jul 24, 2019
1 parent ee35f33 commit 978bb70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions beautysh/beautysh.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,6 @@ def main(self):
parser.add_argument('--indent-size', '-i', nargs=1, type=int, default=4,
help="Sets the number of spaces to be used in "
"indentation.")
parser.add_argument('--files', '-f', nargs='*',
help="Files to be beautified. This is mandatory. "
"If - is provided as filename, then beautysh reads "
"from stdin and writes on stdout.")
parser.add_argument('--backup', '-b', action='store_true',
help="Beautysh will create a backup file in the "
"same path as the original.")
Expand All @@ -333,6 +329,10 @@ def main(self):
help="Prints the version and exits.")
parser.add_argument('--help', '-h', action='store_true',
help="Print this help message.")
parser.add_argument('files', metavar='FILE', nargs='+',
help="Files to be beautified. This is mandatory. "
"If - is provided as filename, then beautysh reads "
"from stdin and writes on stdout.")
args = parser.parse_args()
if (len(sys.argv) < 2) or args.help:
self.print_help(parser)
Expand Down

0 comments on commit 978bb70

Please sign in to comment.