Skip to content

Commit

Permalink
ignored as this should work
Browse files Browse the repository at this point in the history
according to https://multidict.aio-libs.org/en/stable/multidict.html#multidict.MultiDictProxy.copy which is what request uses it should be available
  • Loading branch information
blankdots committed Nov 28, 2023
1 parent 7507f72 commit a6cf270
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions swift_browser_ui/ui/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ async def swift_list_containers(
f"{request.remote}, session: {session} :: {time.ctime()}"
)

query = request.query.copy()
# as of v 3.9.1 the return type of query is "MultiMapping[str]"
# however the actual function returns MultiDictProxy which has copy
# https://github.com/aio-libs/multidict/blob/master/multidict/_multidict_py.py#L146-L163
query = request.query.copy() # type: ignore[attr-defined]
query["format"] = "json"
try:
async with client.get(
Expand Down Expand Up @@ -241,7 +244,10 @@ async def swift_list_objects(request: aiohttp.web.Request) -> aiohttp.web.Stream
f"{request.remote}, sess: {session} :: {time.ctime()}"
)

query = request.query.copy()
# as of v 3.9.1 the return type of query is "MultiMapping[str]"
# however the actual function returns MultiDictProxy which has copy
# https://github.com/aio-libs/multidict/blob/master/multidict/_multidict_py.py#L146-L163
query = request.query.copy() # type: ignore[attr-defined]
query["format"] = "json"

endpoint = session["projects"][project]["endpoint"]
Expand Down

0 comments on commit a6cf270

Please sign in to comment.