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

🐛 Allow Script to have custom metaclass #11264

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

huchenlei
Copy link
Contributor

@huchenlei huchenlei commented Jun 16, 2023

Description

Previously the code was checking whether script_class is a class by checking whether it has type as metaclass, but this implicitly disallows Script classes in extensions to have custom metaclass.

This PR change the implementation to use inspect.isclass to perform the check so that Script classes can have custom metaclass.

Original PR that adds the code:
b523019#diff-e4bc1c55946593391fac69500badc7f35ca9efb23ced1064856ce79fd53f29ceR204

Screenshots/videos:

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev June 27, 2023 06:01
@AUTOMATIC1111 AUTOMATIC1111 merged commit bedcd2f into AUTOMATIC1111:dev Jun 27, 2023
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.

2 participants