chore: add ast-grep rule to convert Optional[T] to T | None (#25560)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
2e44ebe98d
commit
bab4975809
394 changed files with 2555 additions and 2792 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from typing import Literal, Optional
|
||||
from typing import Literal
|
||||
|
||||
import httpx
|
||||
from tenacity import retry, retry_if_exception_type, stop_before_delay, wait_fixed
|
||||
|
|
@ -73,7 +73,7 @@ class BillingService:
|
|||
def is_tenant_owner_or_admin(current_user: Account):
|
||||
tenant_id = current_user.current_tenant_id
|
||||
|
||||
join: Optional[TenantAccountJoin] = (
|
||||
join: TenantAccountJoin | None = (
|
||||
db.session.query(TenantAccountJoin)
|
||||
.where(TenantAccountJoin.tenant_id == tenant_id, TenantAccountJoin.account_id == current_user.id)
|
||||
.first()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue