Skip to content

Commit

Permalink
#209: Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Apr 6, 2021
1 parent 904ded8 commit 7a885d2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions datagateway_api/common/icat/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def logout(self, session_id, **kwargs):
@requires_session_id
@queries_records
def get_with_filters(self, session_id, entity_type, filters, **kwargs):
# TODO - Pool only needed for logging
client_pool = kwargs.get("client_pool")
log.debug(f"Pool Size: {client_pool.get_pool_size()}")

client = kwargs.get("client")
client.sessionId = session_id
return get_entity_with_filters(client, entity_type, filters)
Expand Down
2 changes: 1 addition & 1 deletion datagateway_api/common/icat/lru_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self):
def popitem(self):
key, client = super().popitem()
session_id, client_pool = key
log.debug(f"Item popped from LRU cache: {key}, {client}")
log.debug("Client popped from LRU cache with session: %s", session_id)

# Flushing session ID so next time the client object is used, there's no issues
client.sessionId = None
Expand Down
2 changes: 1 addition & 1 deletion datagateway_api/src/resources/entities/entity_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def patch(self, id_):
backend.update_with_id(
session_id, entity_type, id_, request.json, **kwargs,
)
return backend.get_with_id(session_id, entity_type, id_, **kwargs,), 200
return backend.get_with_id(session_id, entity_type, id_, **kwargs), 200

patch.__doc__ = f"""
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get(self):
"""
return (
backend.get_session_details(
get_session_id_from_auth_header(), **kwargs
get_session_id_from_auth_header(), **kwargs,
),
200,
)
Expand Down

0 comments on commit 7a885d2

Please sign in to comment.