mpounsett / nagiosplugin

A Python class library which helps with writing Nagios (Icinga) compatible plugins.
https://nagiosplugin.readthedocs.io/
Other
28 stars 14 forks source link

Wrong argument order for (all ?) super(*,*) calls #18

Closed mpounsett closed 2 years ago

mpounsett commented 5 years ago

Original report by Vincent Danjean (Bitbucket: vdanjean, GitHub: vdanjean).


Hi, I tried to subclass the Range class in one of my project. I'm using the official Debian package (ie upstream version 1.2.4). I see that new in the Range class is calling super(cls, Range) instead of super(Range, cls)

I checkout the last sources and see that, in the repo, the Range object do not have the new method anymore. However, a quick look show me that the remaining call to super(,) have their parameters reverted. With basic usage, it is not a problem (as both parameters refer to the same type), but it leads to problem when subclassing AND overriding the method.

Regards, Vincent

mpounsett commented 5 years ago

Original comment by Christian Kauhaus (Bitbucket: ckauhaus, GitHub: ckauhaus).


Thank you for the bug report. I'll have a look at it during the next days.

mpounsett commented 2 years ago

I don't think Christian ever had a chance to look at this before I took over the project. I've done some digging and found a bunch of places where arguments are swapped. I think I've identified them all.