Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 157 #160

Closed
Closed

Conversation

LowLevelLover
Copy link

@LowLevelLover LowLevelLover commented May 9, 2021

#157

Description of new feature, or changes

Change decorator implementation so old codes still work and issue #157 could implement in a new way

Code Example:

from halo import Halo
from time import sleep

# should write stop_text and stop_symbol to implement stop_and_persist function
@Halo(text='Loading {task}', spinner='line')
def run_task(halo_iter=[], stop_text='', stop_symbol=' '):
    sleep(3)


tasks1 = ['breakfest', 'launch', 'dinner']
tasks2 = ['morning', 'noon', 'night']

run_task(halo_iter=tasks1, stop_symbol='🦄'.encode('utf-8'), stop_text='Task1 Finished')
run_task(halo_iter=tasks2, stop_text='Finished Time')

Checklist

  • Your branch is up-to-date with the base branch
  • You've included at least one test if this is a new feature
  • All tests are passing

Related Issues and Discussions

fixes #157

People to notify

@manrajgrover

fix issue manrajgrover#157 -+- change decorator implementation -+- add an example of new decorator approach -+- it needs to write new tests but example work well
@LowLevelLover LowLevelLover deleted the fix_issue_157 branch April 17, 2023 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Allow text to change when using decorate pattern.
1 participant