Hey, #python devs. I want to be able to enforce that methods overriding existing methods raise an error if they don't have an @override decorator. Likewise, if they have that decorator and don't override a method, it should also throw an exception.
Didn't see anything which does this, so I threw this together. https://gist.github.com/Ovid/1a1d7869b29816cc4c82d00ad42aa2fc
Am I missing something obvious?
Force validation of overridden methods in Python
Force validation of overridden methods in Python. GitHub Gist: instantly share code, notes, and snippets.Gist
Tom Ritchford
in reply to Curtis "Ovid" Poe (he/him) • • •overrides
PyPICurtis "Ovid" Poe (he/him)
in reply to Tom Ritchford • • •Curtis "Ovid" Poe (he/him)
in reply to Tom Ritchford • • •Mohammad Sajid Anwar
in reply to Curtis "Ovid" Poe (he/him) • • •Curtis "Ovid" Poe (he/him)
in reply to Mohammad Sajid Anwar • • •