Skip to content

Commit

Permalink
ci: Add ruff linter (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoomlam authored Apr 4, 2024
1 parent ebf4f76 commit 73f2961
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-linter-ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff linter
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
2 changes: 0 additions & 2 deletions 01-resource-referral/langgraph-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
from datetime import datetime
from dotenv import main
import operator
import json
from typing import TypedDict, Annotated, Sequence
# import os
import textwrap
import graphviz # type: ignore

from langgraph.prebuilt import ToolInvocation # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions 01-resource-referral/my_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def get_services_from_211(city:str, keyword:str | list[str]):
# difficult to find param {location_id}, location_id returns dataowner
location_id = first_result["idLocation"]
print("211 location_id: " + location_id)
except:
except Exception:
print("Failed to get location result")
try:
# In Query: /api/Locations/complete/{location_id}, location_id is inconsistent with other queries
service_list = f"{TWO_ONE_ONE_BASE_SEARCH_ENDPOINT}/ServicesAtLocation?idLocation={location_id}"
service_search = requests.get(service_list, headers=headers)
return json.dumps(service_search.json(), indent=2)
except:
except Exception:
print("Failed to get services at location")
return "[]"

Expand Down

0 comments on commit 73f2961

Please sign in to comment.