mirror of
https://github.com/Paillat-dev/pycord-rest.git
synced 2026-01-02 00:56:19 +00:00
🏷️ Update app.py and quality.yaml for type checking and command adjustments
This commit is contained in:
9
.github/workflows/quality.yaml
vendored
9
.github/workflows/quality.yaml
vendored
@@ -20,14 +20,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
check: [format, lint]
|
check: [format, lint, basedpyright]
|
||||||
include:
|
include:
|
||||||
- check: format
|
- check: format
|
||||||
name: "Format Check"
|
name: "Format Check"
|
||||||
command: "uv run ruff format --check ."
|
command: "uv run ruff format --check src"
|
||||||
- check: lint
|
- check: lint
|
||||||
name: "Lint Check"
|
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 }}
|
name: ${{ matrix.name }}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import aiohttp
|
|||||||
import discord
|
import discord
|
||||||
import uvicorn
|
import uvicorn
|
||||||
from discord import Interaction, InteractionType
|
from discord import Interaction, InteractionType
|
||||||
from discord.ui.view import ViewStore
|
|
||||||
from fastapi import APIRouter, Depends, FastAPI, HTTPException, Request
|
from fastapi import APIRouter, Depends, FastAPI, HTTPException, Request
|
||||||
from fastapi.exceptions import FastAPIError
|
from fastapi.exceptions import FastAPIError
|
||||||
from nacl.exceptions import BadSignatureError
|
from nacl.exceptions import BadSignatureError
|
||||||
@@ -198,7 +197,7 @@ class App(discord.Bot):
|
|||||||
self,
|
self,
|
||||||
token: str,
|
token: str,
|
||||||
public_key: str,
|
public_key: str,
|
||||||
uvicorn_options: dict[str, Any] | None = None,
|
uvicorn_options: dict[str, Any] | None = None, # pyright: ignore [reportExplicitAny]
|
||||||
health: bool = True,
|
health: bool = True,
|
||||||
) -> None:
|
) -> None:
|
||||||
await self.login(token)
|
await self.login(token)
|
||||||
|
|||||||
Reference in New Issue
Block a user