mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Applied Black plus some extra type hints
This commit is contained in:
parent
c62363ebdc
commit
282e81362a
2 changed files with 10 additions and 4 deletions
8
setup.py
8
setup.py
|
|
@ -33,7 +33,13 @@ setup(
|
|||
extras_require={
|
||||
"test": ["pytest", "black", "hypothesis"],
|
||||
"docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell"],
|
||||
"mypy": ["mypy", "types-click", "types-tabulate", "types-python-dateutil", "data-science-types"],
|
||||
"mypy": [
|
||||
"mypy",
|
||||
"types-click",
|
||||
"types-tabulate",
|
||||
"types-python-dateutil",
|
||||
"data-science-types",
|
||||
],
|
||||
"flake8": ["flake8"],
|
||||
},
|
||||
entry_points="""
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ class Database:
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
filename_or_conn=None,
|
||||
filename_or_conn: Union[str, pathlib.Path, sqlite3.Connection] = None,
|
||||
memory: bool = False,
|
||||
recreate: bool = False,
|
||||
recursive_triggers: bool = True,
|
||||
|
|
@ -331,7 +331,7 @@ class Database:
|
|||
"""
|
||||
return self.table(table_name)
|
||||
|
||||
def __repr__(self):
|
||||
def __repr__(self) -> str:
|
||||
return "<Database {}>".format(self.conn)
|
||||
|
||||
def register_function(
|
||||
|
|
@ -1069,7 +1069,7 @@ class Table(Queryable):
|
|||
return next(iter(counts.values()))
|
||||
return self.count_where()
|
||||
|
||||
def exists(self):
|
||||
def exists(self) -> bool:
|
||||
return self.name in self.db.table_names()
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue