Skip to content

Commit

Permalink
fix pyright issue
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Dec 17, 2024
1 parent 7bb4336 commit 4a30515
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
build:
pyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 7 additions & 4 deletions userCode/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
from datetime import datetime
from typing import Tuple
from typing import Optional, Tuple
from aiohttp import ClientSession, ClientTimeout
from bs4 import BeautifulSoup
from dagster import (
Expand Down Expand Up @@ -386,7 +386,7 @@ def finished_individual_crawl(context: OpExecutionContext):


@asset(deps=[finished_individual_crawl])
def export_graph_as_nquads(context: OpExecutionContext) -> str:
def export_graph_as_nquads(context: OpExecutionContext) -> Optional[str]:
"""Export the graphdb to nquads"""

if not all_dependencies_materialized(context, "finished_individual_crawl"):
Expand Down Expand Up @@ -422,9 +422,12 @@ def export_graph_as_nquads(context: OpExecutionContext) -> str:
def nquads_to_renci(
context: OpExecutionContext,
rclone_config: str,
export_graph_as_nquads: str, # contains the path to the nquads
export_graph_as_nquads: Optional[str], # contains the path to the nquads
):
if not all_dependencies_materialized(context, "finished_individual_crawl"):
if (
not all_dependencies_materialized(context, "finished_individual_crawl")
or not export_graph_as_nquads
):
get_dagster_logger().warning(
"Skipping rclone copy as all dependencies are not materialized"
)
Expand Down

0 comments on commit 4a30515

Please sign in to comment.