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

Invalid runtime error #1

Open
gentlegiantJGC opened this issue Dec 4, 2022 · 2 comments
Open

Invalid runtime error #1

gentlegiantJGC opened this issue Dec 4, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@gentlegiantJGC
Copy link

The following code raises a runtime error which is invalid.

from runtime_final import final

class A:
    @final
    def test1(self):
        pass
    
    def test2(self):
        pass
    
class B(A):
    @final
    def test2(self):
        pass

Commenting out test1 makes it run correctly.

@gentlegiantJGC
Copy link
Author

I have solved this in a fork by storing the class path that the method was finalised in and checking against that in __init_subclass__.

The fork is here: https://github.com/Amulet-Team/runtime-final
I have refactored the code a lot and fixed a number of other issues.

@izxxr izxxr added the bug Something isn't working label Dec 4, 2022
@izxxr
Copy link
Owner

izxxr commented Dec 4, 2022

Hi, Thanks for reporting this bug. I won't be able to work on a fix at the moment due to some busy schedule but will surely try to get to it as soon as possible. If you have a fix, you can open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants