disable pyright

This commit is contained in:
Georges-Antoine Assi
2025-01-26 11:29:33 -05:00
parent 2859ac04c8
commit 8e5d4cdcb5
5 changed files with 2 additions and 14 deletions

View File

@@ -18,7 +18,6 @@ runtimes:
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- pyright@1.1.392
- markdownlint@0.43.0
- eslint@9.18.0
- actionlint@1.7.7
@@ -45,10 +44,6 @@ lint:
- frontend/src/__generated__/**
- docker/Dockerfile
- docker/nginx/js/**
- linters: [pyright]
paths:
- backend/alembic/**
- backend/handler/database/*_handler.py
files:
- name: vue
extensions: [vue]

View File

@@ -522,7 +522,6 @@ async def _identify_rom(
return scan_stats
# trunk-ignore(pyright/reportOptionalCall)
@socket_handler.socket_server.on("scan")
async def scan_handler(_sid: str, options: dict):
"""Scan socket endpoint
@@ -556,7 +555,6 @@ async def scan_handler(_sid: str, options: dict):
)
# trunk-ignore(pyright/reportOptionalCall)
@socket_handler.socket_server.on("scan:stop")
async def stop_scan_handler(_sid: str):
"""Stop scan socket endpoint"""

View File

@@ -127,10 +127,7 @@ class OpenIDHandler:
detail="Email is missing from token.",
)
metadata = (
# trunk-ignore(pyright/reportOptionalMemberAccess)
await oauth.openid.load_server_metadata()
)
metadata = await oauth.openid.load_server_metadata()
claims_supported = metadata.get("claims_supported")
is_email_verified = userinfo.get("email_verified", None)

View File

@@ -20,7 +20,7 @@ def json_array_contains_value(
) -> ColumnElement:
"""Check if a JSON array column contains a single value."""
conn = session.get_bind()
if is_postgresql(conn): # trunk-ignore(pyright/reportArgumentType)
if is_postgresql(conn):
# In PostgreSQL, string values can be checked for containment using the `?` operator.
# For other types, we use the `@>` operator.
if isinstance(value, str):

View File

@@ -8,8 +8,6 @@ import datetime
import decimal
import json
import uuid
# trunk-ignore(pyright/reportWildcardImportFromLibrary)
from json import * # noqa: F401, F403
from json import dumps as __original_dumps
from typing import Any