-
|
Can anybody tell me how to change yaspin attributes inside the function when it's used as a decorator? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Spinner instance is not passed inside of the decorated function as of now: https://github.com/pavdmyt/yaspin/blob/master/yaspin/core.py#L109, so it is not possible to modify spinner attributes when using it as a decorator. Technically it should be easy to pass spinner instance inside the function via e.g. pre-defined |
Beta Was this translation helpful? Give feedback.
Spinner instance is not passed inside of the decorated function as of now: https://github.com/pavdmyt/yaspin/blob/master/yaspin/core.py#L109, so it is not possible to modify spinner attributes when using it as a decorator.
Technically it should be easy to pass spinner instance inside the function via e.g. pre-defined
spinnerargument. This is the first thing that came to my mind, have to think more carefully if better API is possible for this use-case.