Skip to content

Commit 566d80d

Browse files
committed
Added log.tip()
1 parent f62dcf8 commit 566d80d

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

  • remove-json-keys/src/remove_json_keys/lib
  • translate-messages/src/translate_messages/lib

remove-json-keys/src/remove_json_keys/lib/log.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def overwrite_print(msg, *args, **kwargs):
4747
def success(msg, *args, **kwargs):
4848
print(f'\n{colors.bg}{msg.format(*args, **kwargs)}{colors.nc}')
4949

50+
def tip(msg, *args, **kwargs):
51+
print(f'\n{colors.bo}TIP: {msg.format(*args, **kwargs)}{colors.nc}')
52+
5053
def trunc(msg, end='\n'):
5154
truncated_lines = [
5255
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines()]

translate-messages/src/translate_messages/lib/log.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def overwrite_print(msg, *args, **kwargs):
4747
def success(msg, *args, **kwargs):
4848
print(f'\n{colors.bg}{msg.format(*args, **kwargs)}{colors.nc}')
4949

50+
def tip(msg, *args, **kwargs):
51+
print(f'\n{colors.bo}TIP: {msg.format(*args, **kwargs)}{colors.nc}')
52+
5053
def trunc(msg, end='\n'):
5154
truncated_lines = [
5255
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines()]

0 commit comments

Comments
 (0)