Skip to content
Snippets Groups Projects
Commit 873a90e8 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix flake8 warnings

New warnings after updating flake8 version used by pre-commit-hooks
parent b3bc18b3
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ def get_items(): ...@@ -45,7 +45,7 @@ def get_items():
@bp.route("/items/<id_>") @bp.route("/items/<id_>")
@login_required @login_required
def get_item(id_): def get_item(id_):
"""Retrieve item by id or ICS id r"""Retrieve item by id or ICS id
.. :quickref: Inventory; Get item by id or ICS id .. :quickref: Inventory; Get item by id or ICS id
...@@ -83,7 +83,7 @@ def create_item(): ...@@ -83,7 +83,7 @@ def create_item():
@bp.route("/items/<id_>", methods=["PATCH"]) @bp.route("/items/<id_>", methods=["PATCH"])
@login_groups_accepted("admin", "inventory") @login_groups_accepted("admin", "inventory")
def patch_item(id_): def patch_item(id_):
"""Patch an existing item r"""Patch an existing item
.. :quickref: Inventory; Update existing item .. :quickref: Inventory; Update existing item
...@@ -143,7 +143,7 @@ def patch_item(id_): ...@@ -143,7 +143,7 @@ def patch_item(id_):
@bp.route("/items/<id_>/comments") @bp.route("/items/<id_>/comments")
@login_required @login_required
def get_item_comments(id_): def get_item_comments(id_):
"""Get item comments r"""Get item comments
.. :quickref: Inventory; Get item comments .. :quickref: Inventory; Get item comments
...@@ -156,7 +156,7 @@ def get_item_comments(id_): ...@@ -156,7 +156,7 @@ def get_item_comments(id_):
@bp.route("/items/<id_>/comments", methods=["POST"]) @bp.route("/items/<id_>/comments", methods=["POST"])
@login_groups_accepted("admin", "inventory") @login_groups_accepted("admin", "inventory")
def create_item_comment(id_): def create_item_comment(id_):
"""Create a comment on item r"""Create a comment on item
.. :quickref: Inventory; Create comment on item .. :quickref: Inventory; Create comment on item
......
...@@ -234,7 +234,7 @@ def attributes(kind): ...@@ -234,7 +234,7 @@ def attributes(kind):
db.session.add(new_model) db.session.add(new_model)
try: try:
db.session.commit() db.session.commit()
except sa.exc.IntegrityError as e: except sa.exc.IntegrityError:
db.session.rollback() db.session.rollback()
flash(f"{form.name.data} already exists! {kind} not created.", "error") flash(f"{form.name.data} already exists! {kind} not created.", "error")
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment