diff options
author | John Nduli | 2024-09-24 15:41:26 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-30 11:14:08 +0300 |
commit | 04dc9fbcbce400265a916e8a60d358a26a22cb0b (patch) | |
tree | 6a1f7826e809f404f4adf08d8cecc769dd70d439 | |
parent | 8e1e33aa8991477c3141116ab28aa28a324b0c41 (diff) | |
download | genenetwork3-04dc9fbcbce400265a916e8a60d358a26a22cb0b.tar.gz |
chore: pylint code fix
-rw-r--r-- | gn3/api/metadata_api/wiki.py | 2 | ||||
-rw-r--r-- | gn3/db/wiki.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gn3/api/metadata_api/wiki.py b/gn3/api/metadata_api/wiki.py index 0fe228f..8df6cfb 100644 --- a/gn3/api/metadata_api/wiki.py +++ b/gn3/api/metadata_api/wiki.py @@ -83,7 +83,7 @@ def edit_wiki(comment_id: int): sparql_auth_uri=current_app.config["SPARQL_AUTH_URI"] ) except Exception as exc: - conn.rollback() + conn.rollback() # type: ignore raise exc return jsonify({"success": "ok"}) return jsonify(error="Error editing wiki entry, most likely due to DB error!"), 500 diff --git a/gn3/db/wiki.py b/gn3/db/wiki.py index 4721a69..0f46855 100644 --- a/gn3/db/wiki.py +++ b/gn3/db/wiki.py @@ -11,11 +11,11 @@ class MissingDBDataException(Exception): def _decode_dict(result: dict): new_result = {} - for k, v in result.items(): - if isinstance(v, bytes): - new_result[k] = v.decode() + for key, val in result.items(): + if isinstance(val, bytes): + new_result[key] = val.decode() else: - new_result[k] = v + new_result[key] = val return new_result |