From 01f27a8c47c586c98f29d7d74c97f5265608a523 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 8 Mar 2025 20:26:00 +0100 Subject: [PATCH] :label: Update app.py and quality.yaml for type checking and command adjustments --- .github/workflows/quality.yaml | 9 ++++++--- src/pycord_rest/app.py | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 9df9068..72f58bd 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -20,14 +20,17 @@ jobs: strategy: fail-fast: false matrix: - check: [format, lint] + check: [format, lint, basedpyright] include: - check: format name: "Format Check" - command: "uv run ruff format --check ." + command: "uv run ruff format --check src" - check: lint name: "Lint Check" - command: "uv run ruff check ." + command: "uv run ruff check src" + - check: basedpyright + name: "Type Check" + command: "uv run basedpyright src" name: ${{ matrix.name }} diff --git a/src/pycord_rest/app.py b/src/pycord_rest/app.py index bb6f5bc..ad1e19a 100644 --- a/src/pycord_rest/app.py +++ b/src/pycord_rest/app.py @@ -10,7 +10,6 @@ import aiohttp import discord import uvicorn from discord import Interaction, InteractionType -from discord.ui.view import ViewStore from fastapi import APIRouter, Depends, FastAPI, HTTPException, Request from fastapi.exceptions import FastAPIError from nacl.exceptions import BadSignatureError @@ -198,7 +197,7 @@ class App(discord.Bot): self, token: str, public_key: str, - uvicorn_options: dict[str, Any] | None = None, + uvicorn_options: dict[str, Any] | None = None, # pyright: ignore [reportExplicitAny] health: bool = True, ) -> None: await self.login(token)