Peewee: Please support python 3 abstract methods

Created on 12 Sep 2018  路  2Comments  路  Source: coleifer/peewee

Since Python 3.4, there has been a mechanism for declaring abstract base classes and methods thereof, from the abc module. As of Python 3.7, pylint pretty much requires its use; for example, the line:

self._query = model.Entry.select().where(self._where)

results in the pylint error:

publ/view.py:89:8: E1111: Assigning to function call which doesn't return (assignment-from-no-return)

As a temporary measure I can simply disable that warning from pylint, but going forward it would be great if peewee were to use abc.abstractmethod and abc.ABC to suppress these errors and provide abstract base classes in a more declarative, linter-friendly way.

Most helpful comment

bro-bro...Python is a dynamic language. Peewee uses this dynamism to provide such nice (if I do say so myself) APIs. There will be no ABCs.

All 2 comments

bro-bro...Python is a dynamic language. Peewee uses this dynamism to provide such nice (if I do say so myself) APIs. There will be no ABCs.

Hi, I'm rather disappointed in this response for a number of reasons.

At the very least I would like to be able to run pylint against peewee without getting a bunch of spurious E1111 notifications, and there are many mechanisms that peewee could use to provide that ability. ABCs were the most readily-obvious ones but there are other approaches as well.

I also don't really care for the condescending tone of your response. I realize that peewee is a volunteer effort that you do for your own needs but it's also part of a greater ecosystem.

Also, I'm not a bro.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MozzieHan picture MozzieHan  路  4Comments

dev-zero picture dev-zero  路  4Comments

GMaxera picture GMaxera  路  4Comments

razodactyl picture razodactyl  路  3Comments

aellwein picture aellwein  路  3Comments