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

fix: handle regular functions on serve #28

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

isidentical
Copy link
Collaborator

No description provided.

@isidentical isidentical marked this pull request as ready for review January 12, 2024 01:07
@@ -257,7 +257,7 @@ def load_function_from(
raise api.FalServerlessError(f"Function '{function_name}' not found in module")

target = module[function_name]
if issubclass(target, fal.App):
if isinstance(target, type) and issubclass(target, fal.App):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is type in this scope?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all classes (types) are an instance of type (type the built-in object type, which is the metaclass of all classes).

@isidentical isidentical merged commit 5e95ddb into main Jan 12, 2024
4 checks passed
@isidentical isidentical deleted the make-issubclass-only-for-apps branch January 12, 2024 13:52
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