Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Jul 26, 2022
1 parent 6d45960 commit 6c26a28
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/maggma/api/resource/aggregation.py
Expand Up @@ -81,7 +81,7 @@ async def search(**queries: Dict[str, STORE_PARAMS]) -> Dict:
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(
Expand Down
2 changes: 1 addition & 1 deletion src/maggma/api/resource/post_resource.py
Expand Up @@ -115,7 +115,7 @@ async def search(**queries: Dict[str, STORE_PARAMS]) -> Dict:
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(status_code=500)
Expand Down
4 changes: 2 additions & 2 deletions src/maggma/api/resource/read_resource.py
Expand Up @@ -150,7 +150,7 @@ async def get_by_key(
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(
Expand Down Expand Up @@ -243,7 +243,7 @@ async def search(**queries: Dict[str, STORE_PARAMS]) -> Union[Dict, Response]:
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(
Expand Down
10 changes: 4 additions & 6 deletions src/maggma/api/resource/submission.py
Expand Up @@ -156,7 +156,7 @@ async def get_by_key(
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(status_code=500)
Expand Down Expand Up @@ -221,13 +221,11 @@ async def search(**queries: STORE_PARAMS):
if e.timeout:
raise HTTPException(
status_code=504,
detail=f"Server timed out trying to obtain data. Try again with a smaller request.",
detail="Server timed out trying to obtain data. Try again with a smaller request.",
)
else:
raise HTTPException(
status_code=500,
)

raise HTTPException(status_code=500,)

meta = Meta(total_doc=count)

for operator in self.get_query_operators: # type: ignore
Expand Down

0 comments on commit 6c26a28

Please sign in to comment.