Page MenuHomeSoftware Heritage

api: kind of fix for the SWHRemoteAPI's contructor
ClosedPublic

Authored by douardda on Mar 18 2019, 10:54 AM.

Details

Summary
  • ensure we do accept kwargs so any super().init(kwargs) from an unexpected MRO path in an indecent maze of multi-inheritance will not crash
  • do not call super().init(); it is either useless (most probably, super() is object in this context) or silently ignore passed kwargs that super() (when it's not object) may have been able to understand...

Long story short, kwargs handling in multi-inheritance init methods is
a mess.

Diff Detail

Repository
rDCORE Foundations and core functionalities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Doesn't this mean that arguments that should be used somewhere are silently ignored?

This revision is now accepted and ready to land.Mar 18 2019, 2:25 PM

Doesn't this mean that arguments that should be used somewhere are silently ignored?

Yeah, I believe that's the whole point of this diff. Shuffling differing arguments around is a lot of what makes the inheritance pattern painful.

This revision was automatically updated to reflect the committed changes.