Skip to content

Commit

Permalink
Upload SARIF for Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlul committed Jan 21, 2024
1 parent 8f41f6f commit 6b086f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ jobs:
# https://github.com/astral-sh/ruff
ruff:
runs-on: ubuntu-latest
permissions: {}
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: pip install ruff
- run: ruff format --check src
- run: ruff check src
if: ${{ !cancelled() }}
- run: ruff check --output-format=github src
if: ${{ !cancelled() }}
- run: ruff check --output-format=sarif src > ruff.sarif
- uses: github/codeql-action/upload-sarif@v3
with:
category: ruff
sarif_file: ruff.sarif
2 changes: 1 addition & 1 deletion src/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def generate_card_display(card: Any) -> str:
if card.get("images"):
image_link = f"https://yugipedia.com/wiki/Special:Redirect/file/{card['images'][0]['image']}?utm_source=bastion&utm_medium=reddit"
links += f"[Card Image]({image_link}) | "
if card["konami_id"] != None:
if card["konami_id"] is not None:
# Official database, does not work for zh locales
official = f"https://www.db.yugioh-card.com/yugiohdb/card_search.action?ope=2&request_locale=en&cid={card['konami_id']}"
rulings = f"https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&request_locale=ja&cid={card['konami_id']}"
Expand Down

0 comments on commit 6b086f4

Please sign in to comment.