Skip to content

Commit

Permalink
No need for close in main. Use 1 client instance and allow destructor…
Browse files Browse the repository at this point in the history
… to deal with closing. Reformat.
  • Loading branch information
Schalk1e committed May 20, 2024
1 parent 232e682 commit cb25fcb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/api/aaq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def get_paginated(
else:
params["offset"] += limit


response_list = [{k: str(v) for k, v in d.items()} for d in response_list]

return response_list
Expand Down
9 changes: 0 additions & 9 deletions src/api/aaq/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,3 @@ class pyAAQ:
faqmatches = FAQMatches(client)
inbounds_ud = InboundsUD(client)
urgency_rules = UrgencyRules(client)

def client_close():
"""Exposing the ability to close the client here.
The client is being used outside of a context manager
and httpx recommends closing these connections in this case.
"""
client.close()

0 comments on commit cb25fcb

Please sign in to comment.