New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support python 3 abstract methods #1722

Closed
fluffy-critter opened this Issue Sep 12, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@fluffy-critter

fluffy-critter commented Sep 12, 2018

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.

@coleifer

This comment has been minimized.

Show comment
Hide comment
@coleifer

coleifer Sep 12, 2018

Owner

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.

Owner

coleifer commented Sep 12, 2018

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.

@coleifer coleifer closed this Sep 12, 2018

@fluffy-critter

This comment has been minimized.

Show comment
Hide comment
@fluffy-critter

fluffy-critter Sep 12, 2018

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.

fluffy-critter commented Sep 12, 2018

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.

Repository owner locked as off topic and limited conversation to collaborators Sep 12, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.