-
Notifications
You must be signed in to change notification settings - Fork 44.6k
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
Only take subclasses of AutoGPTPluginTemplate as plugins #4345
Only take subclasses of AutoGPTPluginTemplate as plugins #4345
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4345 +/- ##
=======================================
Coverage 70.77% 70.77%
=======================================
Files 68 68
Lines 3326 3326
Branches 532 532
=======================================
Hits 2354 2354
Misses 795 795
Partials 177 177
☔ View full report in Codecov by Sentry. |
Deployment failed with the following error:
|
Deployment failed with the following error:
|
Deployment failed with the following error:
|
Deployment failed with the following error:
|
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…ude the files that the PR is addressing
✅ Deploy Preview for auto-gpt-docs canceled.
|
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made in subsequent commits.
The changes were made in a subsequent commit
autogpt/plugins/__init__.py
Outdated
break | ||
|
||
if is_plugin and a_module.__name__ != "AutoGPTPluginTemplate": | ||
if issubclass(a_module, AutoGPTPluginTemplate) and a_module.__name__ != "AutoGPTPluginTemplate": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my python might mislead me here, but doesn't this mean the class needs to exist as such? the class is currently a dependency of the plugins not a part of autogpt itself, (currently its listed in the dev-dependencies in requirements.txt, this change makes it a runtime dependency if i'm not mistaken)
this fixes #4215, and is a re-submission of #4217 where i managed to screw up the history of the PR.
Background
limit plugin detection to classes that implement AutoGPTPluginTemplate (have it as parent),
solving #4215
Changes
added check to scan_plugin
Test Plan
create empty plugin, add class triggering old detection -> run = only real plugins detected
PR Quality Checklist