From d84baf726f555f1e7ae8bd58472c56492070d750 Mon Sep 17 00:00:00 2001 From: sparrowsurya Date: Thu, 22 Aug 2024 14:17:27 +0530 Subject: [PATCH] fix the Optional imoport from typing --- api/crud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/crud.py b/api/crud.py index 523ff4a..d0ebfae 100644 --- a/api/crud.py +++ b/api/crud.py @@ -1,5 +1,5 @@ import datetime -from typing import optional +from typing import Optional from sqlalchemy.orm import Session @@ -13,7 +13,7 @@ def create_unique_random_key(db: Session) -> str: return key -def get_db_paste_by_key(db: Session, key: str) -> optional[schemas.PasteInfo]: +def get_db_paste_by_key(db: Session, key: str) -> Optional[schemas.PasteInfo]: return db.query(models.Paste).filter(models.Paste.key==key).first()