Skip to content

Commit

Permalink
test: test commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood committed Nov 20, 2024
1 parent aafe79e commit 9726099
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
##### Create release on GitHub
- name: Create or update GitHub release
run: scriv github-release --repo=overhangio/tutor
run: scriv github-release --repo=edly-io/tutor
env:
GITHUB_TOKEN: ${{ github.token }}
# scriv command will fail when not on a tag, such as running with act or a
Expand Down
10 changes: 10 additions & 0 deletions tutor/plugins/v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ def _load_tasks(self) -> None:
Load hooks and check types.
"""
tasks = get_callable_attr(self.obj, "hooks", default={})
print(f"self.obj: {self.obj}")
print(f"tasks: {tasks}")
# Check if tasks is a module and try to access its attributes
import sys
if isinstance(tasks, type(sys)):
# Assuming hooks are defined in a variable named 'hooks' in the module
print("Attributes of the tasks module:")
print(dir(tasks)) # List of attribute names
print(vars(tasks)) # Dictionary of attribute names and values
tasks = getattr(tasks, 'hooks', {})
if not isinstance(tasks, dict):
raise exceptions.TutorError(
f"Invalid hooks in plugin {self.name}. Expected dict, got {tasks.__class__}."
Expand Down

0 comments on commit 9726099

Please sign in to comment.