From 962168659703b83c4b2f4fc66c592d430db825df Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 18 Feb 2020 11:56:46 +0530 Subject: [PATCH] refactor: consistent help action in click, formatting and sorted imports --- bench/commands/git.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/bench/commands/git.py b/bench/commands/git.py index ffaa4d5b..cc9812ab 100644 --- a/bench/commands/git.py +++ b/bench/commands/git.py @@ -1,28 +1,31 @@ -import click -import os, subprocess, re +# imports - standard imports +import os +import re +import subprocess +# imports - module imports from bench.app import get_repo_dir, get_apps, get_remote from bench.utils import set_git_remote_url +# imports - third party imports +import click -@click.command('remote-set-url') + +@click.command('remote-set-url', help="Set app remote url") @click.argument('git-url') def remote_set_url(git_url): - "Set app remote url" set_git_remote_url(git_url) -@click.command('remote-reset-url') +@click.command('remote-reset-url', help="Reset app remote url to frappe official") @click.argument('app') def remote_reset_url(app): - "Reset app remote url to frappe official" git_url = "https://github.com/frappe/{}.git".format(app) set_git_remote_url(git_url) -@click.command('remote-urls') +@click.command('remote-urls', help="Show apps remote url") def remote_urls(): - "Show apps remote url" for app in get_apps(): repo_dir = get_repo_dir(app)