Skip to content

Commit 282e813

Browse files
committed
Applied Black plus some extra type hints
1 parent c62363e commit 282e813

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ def get_long_description():
3333
extras_require={
3434
"test": ["pytest", "black", "hypothesis"],
3535
"docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell"],
36-
"mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil", "data-science-types"],
36+
"mypy": [
37+
"mypy",
38+
"types-click",
39+
"types-tabulate",
40+
"types-python-dateutil",
41+
"data-science-types",
42+
],
3743
"flake8": ["flake8"],
3844
},
3945
entry_points="""

sqlite_utils/db.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class Database:
277277

278278
def __init__(
279279
self,
280-
filename_or_conn=None,
280+
filename_or_conn: Union[str, pathlib.Path, sqlite3.Connection] = None,
281281
memory: bool = False,
282282
recreate: bool = False,
283283
recursive_triggers: bool = True,
@@ -331,7 +331,7 @@ def __getitem__(self, table_name: str) -> Union["Table", "View"]:
331331
"""
332332
return self.table(table_name)
333333

334-
def __repr__(self):
334+
def __repr__(self) -> str:
335335
return "<Database {}>".format(self.conn)
336336

337337
def register_function(
@@ -1069,7 +1069,7 @@ def count(self) -> int:
10691069
return next(iter(counts.values()))
10701070
return self.count_where()
10711071

1072-
def exists(self):
1072+
def exists(self) -> bool:
10731073
return self.name in self.db.table_names()
10741074

10751075
@property

0 commit comments

Comments
 (0)