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

vdk-plugins: Update README.md #614

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions projects/vdk-plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ from vdk.api.plugin.hook_markers import hookimpl
# name of function must match name of hookspec function

@hookimpl(tryfirst=True)
def vdk_configure(config_builder: "ConfigurationBuilder") -> None:
def vdk_configure(config_builder: ConfigurationBuilder) -> None:
"""
Here we define what configuration settings are needed with reasonable defaults.
Other plugins will populate them. For example, there could be a plugin that reads env variables or parses config files.
Expand All @@ -56,7 +56,7 @@ def vdk_configure(config_builder: "ConfigurationBuilder") -> None:
# And here we can create another hook implementation
# let's use our configuration to print bar if it is set to foo everytime a job runs
@hookimpl
def run_job(self, context: "JobContext"):
def run_job(self, context: JobContext):
value = context.configuration.get_required_option('my_config')
if value == "foo":
print("bar")
Expand Down