pinnwand/command.py
def delete(paste: str) -> None:
    """Delete a paste from pinnwand's database."""
    with database.session() as session:
        paste_object = (
            session.query(database.Paste)
            .filter(database.Paste.paste_id == paste)
            .first()
        )

        if not paste_object:
            log.error("delete: unknown paste")
            return

        session.delete(paste_object)
        session.commit()

        log.info("delete: paste %s deleted", paste_object)
Delete a paste from pinnwand's database.
Delete a paste from pinnwand's database.
Delete a paste from pinnwand ' s database .
def delete(paste: str) -> None:
    with database.session() as session:
        paste_object = (
            session.query(database.Paste)
            .filter(database.Paste.paste_id == paste)
            .first()
        )
        if not paste_object:
            log.error("delete: unknown paste")
            return
        session.delete(paste_object)
        session.commit()
        log.info("delete: paste %s deleted", paste_object)
def delete ( paste : str ) -> None : with database . session ( ) as session : paste_object = ( session . query ( database . Paste ) . filter ( database . Paste . paste_id == paste ) . first ( ) ) if not paste_object : log . error ( "delete: unknown paste" ) return session . delete ( paste_object ) session . commit ( ) log . info ( "delete: paste %s deleted" , paste_object )
Delete a paste from pinnwand's database.
Delete a paste from pinnwand ' s database .
"""Delete a paste from pinnwand's database."""
paste
str