Closed xieleo5 closed 1 year ago
Hello @xieleo5! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Line 43:80: E501 line too long (83 > 79 characters)
Hey! Thanks for the PR. I will try to look into this tomorrow. Meanwhile, one thing that confuses me is the univ_keys
parameter which is set as life_stats
. Would you have idea what is the purpose of that argument? (PS: this code is inherited from other devs and I have not touched this part myself).
I guess the hero_key
intended to get value from its parent class, which means the parent class need to first unpack one layer of the info, then pass the unpacked value to all its children. While the univ_key
is just unpack the value from the origin info dict passed from the java side. So I think maybe the better solution to fix this is to add a step to unpack 'life_stats' in LifeStatsObservation
class.
I'll modify my code and update soon.
👍 Would it also be possible to modify the .diff file manually to add your changes (like done here)? You can also share the modified chunks here and I can do that manual change :)
Just a small heads-up: currently busy with work, but this PR is not forgotten! I do have things on TODO list, but it may take till the weekend 😅 . Same for the other PR you made.
I've tried the lifeStats observation, and found that it is actually not changing at all. I took a look at the code and found that the
'life_stats'
key is missing. The info provided by java side is likeIf we don't add
'life_stats'
beforehero_keys
, when we dowalk_dict
, it will directly callinfo['xx']
but notinfo['life_stats']['xx']
. Then it will return thedefault_is_missing
value.