[black] add action
This commit is contained in:
parent
9ecb13aed0
commit
e44b6a1cb3
2 changed files with 13 additions and 1 deletions
10
.github/workflows/black.yml
vendored
Normal file
10
.github/workflows/black.yml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
name: Lint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: psf/black@stable
|
|
@ -66,6 +66,8 @@ class GetProductByBarCode(AuthorizedController):
|
|||
)
|
||||
await session.commit()
|
||||
|
||||
return Product.from_orm(await DBProduct.get_by_barcode(session, barcode))
|
||||
return Product.from_orm(
|
||||
await DBProduct.get_by_barcode(session, barcode)
|
||||
)
|
||||
except AssertionError as e:
|
||||
raise HTTPException(status_code=400, detail=e.args[0])
|
||||
|
|
Loading…
Reference in a new issue