Benjamin Bossan commited on
Commit
1bfc3ce
1 Parent(s): 5c028cc

Fix mypy, linting, black

Browse files
src/gistillery/webservice.py CHANGED
@@ -1,6 +1,5 @@
1
  import datetime as dt
2
  import logging
3
- import shutil
4
  import sqlite3
5
  import uuid
6
 
@@ -148,7 +147,7 @@ def clear() -> str:
148
  @app.get("/backup/")
149
  def backup() -> FileResponse:
150
  # create a backup and return it
151
- def progress(status, remaining, total):
152
  logger.debug(f"DB: Copied {total-remaining} of {total} pages...")
153
 
154
  now = dt.datetime.now(dt.timezone.utc)
 
1
  import datetime as dt
2
  import logging
 
3
  import sqlite3
4
  import uuid
5
 
 
147
  @app.get("/backup/")
148
  def backup() -> FileResponse:
149
  # create a backup and return it
150
+ def progress(status: int, remaining: int, total: int) -> None:
151
  logger.debug(f"DB: Copied {total-remaining} of {total} pages...")
152
 
153
  now = dt.datetime.now(dt.timezone.utc)
tests/test_app.py CHANGED
@@ -46,6 +46,7 @@ class TestWebservice:
46
 
47
  class DummySummarizer(Summarizer):
48
  """Returns the first 10 characters of the input"""
 
49
  def get_name(self):
50
  return "dummy summarizer"
51
 
@@ -54,6 +55,7 @@ class TestWebservice:
54
 
55
  class DummyTagger(Tagger):
56
  """Returns the first 3 words of the input"""
 
57
  def get_name(self):
58
  return "dummy tagger"
59
 
 
46
 
47
  class DummySummarizer(Summarizer):
48
  """Returns the first 10 characters of the input"""
49
+
50
  def get_name(self):
51
  return "dummy summarizer"
52
 
 
55
 
56
  class DummyTagger(Tagger):
57
  """Returns the first 3 words of the input"""
58
+
59
  def get_name(self):
60
  return "dummy tagger"
61