Skip to content

Commit

Permalink
add: refactorates method of string interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-filho committed Aug 22, 2018
1 parent 35f05b3 commit 044ccd9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
tag = str(input("type the tag: "))
msg = str(input("type the commit message: ")).lower()

commit_msg_pre = 'git commit -m '

if tag_type == 1:
context = str(input('type the context: ')).lower()
tag = tag.lower()
composed_msg = commit_msg_pre + "'" + tag + "(" + context + ")" +": " + msg + "'"
# os.system(composed_msg)
os.system("git commit -m '%s(%s): %s'" % (tag, context, msg))
else:
composed_msg = commit_msg_pre + "'" + tag.upper() + ": " + msg + "'"
os.system(composed_msg)
os.system("git commit -m '%s: %s'" % (tag, msg))

0 comments on commit 044ccd9

Please sign in to comment.