python-fmrest icon indicating copy to clipboard operation
python-fmrest copied to clipboard

Add super for mro

Open rothloup opened this issue 3 years ago • 1 comments

Added calls in object init() methods to super() to support python's MRO. Addresses Issue #22.

rothloup avatar Sep 11 '20 16:09 rothloup

Thanks for the PR. A couple of remarks:

  • The added super() in server.py currently uses tabs as indentation, leading to a TabError exception and breaking the code
  • We could skip the argument to super(), as self should implicitly be passed (i.e. for example super() vs super(Server, self))
  • I would prefer to pass the surplus args only via kwargs to avoid confusion and make it more explicit when using multiple inheritance. What do you think? I'm currently also getting a mypy error for the super calls complaining about the call to object's __init__ with args, but I assume this should be fine as surplus args should already be consumed before the last __init__ call.

davidhamann avatar Oct 06 '20 16:10 davidhamann