🚨 fix some linter warnings
Some checks failed
Python formatting PEP8 / Python-PEP8 (push) Failing after 13s
Some checks failed
Python formatting PEP8 / Python-PEP8 (push) Failing after 13s
This commit is contained in:
parent
44b73ab89d
commit
a689b1c56d
4 changed files with 28 additions and 38 deletions
|
@ -1,6 +1,3 @@
|
|||
from fastapi import HTTPException
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from models import Item
|
||||
from schemas.schemas import ItemCreate, ItemUpdate
|
||||
from crud.base import CRUDBase
|
||||
|
@ -8,33 +5,6 @@ from crud.base import CRUDBase
|
|||
|
||||
class CRUDItem(CRUDBase[Item, ItemCreate, ItemUpdate]):
|
||||
pass
|
||||
# def get_item(self, db: Session, item_id: int):
|
||||
# item = db.query(Item).filter(Item.id == item_id).first()
|
||||
# if not item:
|
||||
# raise HTTPException(status_code=404, detail="Item not found")
|
||||
# return item
|
||||
|
||||
# def get_items(self, db: Session, skip: int = 0, limit: int = 100):
|
||||
# return db.query(Item).offset(skip).limit(limit).all()
|
||||
|
||||
# def create_item(self, db: Session, item: ItemCreate):
|
||||
# db_item = Item(title=item.title, description=item.description)
|
||||
# db.add(db_item)
|
||||
# db.commit()
|
||||
# db.refresh(db_item)
|
||||
# return db_item
|
||||
|
||||
# def update_item(self, db: Session, item: ItemUpdate):
|
||||
# db_item = Item(title=item.title, description=item.description)
|
||||
# db.add(db_item)
|
||||
# db.commit()
|
||||
# db.refresh(db_item)
|
||||
# return db_item
|
||||
|
||||
# def delete_item(self, db: Session, item_id: int):
|
||||
# db.query(Item).filter(Item.id == item_id).first().delete()
|
||||
# db.commit()
|
||||
# return
|
||||
|
||||
|
||||
item = CRUDItem(Item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue