Skip to content

Commit

Permalink
vdk-plugins: Update README.md (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpalashki authored Dec 10, 2021
1 parent 409e437 commit df9f1dd
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit df9f1dd

Please sign in to comment.