Skip to content

Refuse inlining methods decorated with abc.abstractmethod - #968

Open
Aschenbath wants to merge 1 commit into
python-rope:masterfrom
Aschenbath:fix/rope-744-20261122-7c2d-30
Open

Aschenbath wants to merge 1 commit into
python-rope:masterfrom
Aschenbath:fix/rope-744-20261122-7c2d-30

Conversation

@Aschenbath

Copy link
Copy Markdown

Inlining an abstract method can remove the abstract contract and substitute its placeholder body for a concrete implementation. Reject this refactoring before collecting changes, resolving the decorator so aliases and qualified imports are recognized while unrelated decorators with the same name still work.

Closes #744.

All 105 inline tests and 3 decorator subtests pass. The abstract-method regression fails on unchanged source. Black and git diff --check pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline Method refactoring is allowed in abstract methods.

1 participant