Closed yuema137 closed 2 months ago
@dachengx In order to pass the pre-commit check I had to format it with black & flake. I think it happens now and then when we make PR for the files that were not checked previously. Should we do a through cleaning for strax?
This PR was initially aimed to solve https://github.com/AxFoundation/strax/issues/846, but replaced by https://github.com/AxFoundation/strax/pull/860.
But this PR reminds us that we need to make sure that the depends_on
is unique. I will change this PR to a safe guard of Plugin
.
Solve error #846.
Explanation
Basically what happened was:
plugin.py
, the chunks are fetched for eachself.depends_on
and stored in a dictionary: https://github.com/AxFoundation/strax/blob/2218e78722cb64cdedb17e255752b7857c5f229b/strax/plugins/plugin.py#L458-L493self.depends_on
, the later one overwrites the previous oneSolution
The fix is simple, which is to remove the duplicate items in
self.depends_on
of thePlugin
class.