Open Loriasun opened 2 years ago
With the pull request, this program
from icecream import ic
ic.configureOutput(includeContext=True)
def a():
def hello(val):
ic(val)
hello("world")
a()
results in
ic| test context icecream.py:6 in a.<locals>.hello()- val: 'world'
Therefore, I think it would be better to use
parentFunction = executing.Source.executing(callFrame).code_qualname().replace(".<locals>.",".")
@salabim Thank you for your suggestion!
I agree with @salabim's suggestion, I think a.hello
is better than a.<locals>.hello
for this purpose.
@Loriasun did you run the tests with this PR? I suspect many of them now fail and need updating.
We really need to have functioning CI again. I don't think #98 is going to happen, so it would be really helpful to set up GitHub actions to replace Travis.
ic() output class name
Modified parentFunction in _getContext so that icecream prints class name for the method as well.