Skip to content

Commit

Permalink
Type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Oct 27, 2023
1 parent 0b9f70a commit 9ba218f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions loqusdb/commands/view.py
Expand Up @@ -2,6 +2,7 @@
import json
import logging
from pprint import pprint as pp
from pymongo.cursor import Cursor

import click

Expand Down Expand Up @@ -42,12 +43,12 @@ def cases(ctx, case_id, to_json, count, case_type):
case_obj["_id"] = str(case_obj["_id"])
cases.append(case_obj)
else:

case_count: int = adapter.case_count()
if case_count == 0:
LOG.info("No cases found in database")
ctx.abort()
cases = adapter.cases()
cases: Cursor = adapter.cases()


if to_json:
click.echo(json.dumps(cases))
Expand Down

0 comments on commit 9ba218f

Please sign in to comment.