Skip to content

Commit

Permalink
disable pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed Jan 26, 2025
1 parent 2859ac0 commit 8e5d4cd
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
5 changes: 0 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ runtimes:
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -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]
Expand Down
2 changes: 0 additions & 2 deletions backend/endpoints/sockets/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"""
Expand Down
5 changes: 1 addition & 4 deletions backend/handler/auth/base_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ async def get_current_active_user_from_openid_token(self, token: Any):
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)

Expand Down
2 changes: 1 addition & 1 deletion backend/utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions backend/utils/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
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
Expand Down

0 comments on commit 8e5d4cd

Please sign in to comment.