Skip to content
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

ABC (Abstract Base Class) fixups #9719

Merged
merged 6 commits into from
Sep 29, 2024
Merged

Conversation

TheSven73
Copy link
Contributor

Poetry doesn't always use the ABC pattern where appropriate, and where used, not always consistently. Fix that up.

BasePlugin contains @AbstractMethod without inheriting from ABC.
Without ABC, @AbstractMethod has no effect.

Fix by letting BasePlugin inherit from ABC.
ConfigSource appears to be used as an ABC, yet uses an older Python
pattern: its abstract methods raise NotImplementedError().

Improve by making ConfigSource inherit from ABC, and use
@AbstractMethod to mark its abstract methods.
Formatter appears to be used as an ABC, yet uses an older Python
pattern: its abstract methods raise NotImplementedError().

Improve by making the class inherit from ABC, and use
@AbstractMethod to mark its abstract methods.
Operation appears to be used as an ABC, yet uses an older Python
pattern: its abstract methods raise NotImplementedError().

Improve by making the class inherit from ABC, and use
@AbstractMethod to mark its abstract methods.
Env appears to be used as an ABC, yet uses an older Python
pattern: its abstract methods raise NotImplementedError().

Improve by making the class inherit from ABC, and use
@AbstractMethod to mark its abstract methods.
@radoering radoering merged commit 65ccfb2 into python-poetry:main Sep 29, 2024
75 checks passed
@TheSven73 TheSven73 deleted the abc-fixes branch September 29, 2024 15:57
Secrus pushed a commit to Secrus/poetry that referenced this pull request Oct 27, 2024
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants