mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-12 03:24:23 +02:00
Fix mypy failures in PR #604
This commit is contained in:
parent
e4b9b582cd
commit
cfecbce71f
2 changed files with 3 additions and 4 deletions
|
|
@ -538,11 +538,10 @@ class Database:
|
|||
:param table_name: Name of the table
|
||||
"""
|
||||
if table_name in self.view_names():
|
||||
klass = View
|
||||
return View(self, table_name, **kwargs)
|
||||
else:
|
||||
klass = Table
|
||||
kwargs.setdefault("strict", self.strict)
|
||||
return klass(self, table_name, **kwargs)
|
||||
return Table(self, table_name, **kwargs)
|
||||
|
||||
def quote(self, value: str) -> str:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -154,6 +154,6 @@ def test_lookup_with_extra_insert_parameters(fresh_db):
|
|||
|
||||
|
||||
@pytest.mark.parametrize("strict", (False, True))
|
||||
def test_lookup_new_table(fresh_db, strict):
|
||||
def test_lookup_new_table_strict(fresh_db, strict):
|
||||
fresh_db["species"].lookup({"name": "Palm"}, strict=strict)
|
||||
assert fresh_db["species"].strict == strict or not fresh_db.supports_strict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue