pylint: __implements__ or abc.ABCMeta?
I put a little time into exploring __implements__ and abc.ABCMeta today., in combination with pylint. I guess it's about time I started using one or both of them. I'm a little puzzled though. It _seems_ like pylint is ignoring __implements__, while abc.ABCMeta appears to be working the way I'd expect it would. I've put some sample code at http://stromberg.dnsalias.org/svn/pylint-interface-experiment/trunk/ At that URL, pie is an __implements__ experiment, and pabce is an ABC experiment. I found a year-old thread on stackoverflow saying that pylint no longer does __implements__, which seems to fit with what I'm seeing. However, the pylint doc and pylint code (internally) still appear to use __implements__ - so maybe I'm just doing it wrong. The thread: https://stackoverflow.com/questions/20879269/why-pylint-keeps-saying-my-clas... Assuming they both still work (__implements__ and abc.ABCMeta), which is preferred? Or are they a toss-up? Any suggestions on how to get __implements__ working? Thanks! PS: I'm using: pylint 1.7.1, astroid 1.5.2 Python 3.4.2 (default, Apr 17 2017, 09:05:12) -- Dan Stromberg
Anyone? It's been 2 days... On Mon, Jul 31, 2017 at 10:17 PM, Dan Stromberg <strombrg@gmail.com> wrote:
I put a little time into exploring __implements__ and abc.ABCMeta today., in combination with pylint.
I guess it's about time I started using one or both of them.
I'm a little puzzled though. It _seems_ like pylint is ignoring __implements__, while abc.ABCMeta appears to be working the way I'd expect it would.
I've put some sample code at http://stromberg.dnsalias. org/svn/pylint-interface-experiment/trunk/ At that URL, pie is an __implements__ experiment, and pabce is an ABC experiment.
I found a year-old thread on stackoverflow saying that pylint no longer does __implements__, which seems to fit with what I'm seeing. However, the pylint doc and pylint code (internally) still appear to use __implements__ - so maybe I'm just doing it wrong. The thread: https://stackoverflow. com/questions/20879269/why-pylint-keeps-saying-my-class- is-r0923-interface-not-implemented
Assuming they both still work (__implements__ and abc.ABCMeta), which is preferred? Or are they a toss-up?
Any suggestions on how to get __implements__ working?
Thanks!
PS: I'm using: pylint 1.7.1, astroid 1.5.2 Python 3.4.2 (default, Apr 17 2017, 09:05:12)
-- Dan Stromberg
-- Dan Stromberg
participants (1)
-
Dan Stromberg