Skip to content

Commit e66e82f

Browse files
authored
Remove Sentinel workaround for Click 8.3.1+ (#685)
Closes #666 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent a0d8bc3 commit e66e82f

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
]
2323

2424
dependencies = [
25-
"click",
25+
"click>=8.3.1",
2626
"click-default-group>=1.2.3",
2727
"pluggy",
2828
"python-dateutil",

sqlite_utils/cli.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,6 @@ def insert_upsert_implementation(
963963
functions=None,
964964
strict=False,
965965
):
966-
convert = _value_or_none(convert)
967-
delimiter = _value_or_none(delimiter)
968-
quotechar = _value_or_none(quotechar)
969-
encoding = _value_or_none(encoding)
970-
bulk_sql = _value_or_none(bulk_sql)
971966
db = sqlite_utils.Database(path)
972967
_load_extensions(db, load_extension)
973968
_maybe_register_functions(db, functions)
@@ -1943,9 +1938,6 @@ def memory(
19431938
\b
19441939
sqlite-utils memory animals.csv --schema
19451940
"""
1946-
sql = _value_or_none(sql)
1947-
save = _value_or_none(save)
1948-
encoding = _value_or_none(encoding)
19491941
db = sqlite_utils.Database(memory=True)
19501942

19511943
# If --dump or --save or --analyze used but no paths detected, assume SQL query is a path:
@@ -3328,16 +3320,9 @@ def _register_functions(db, functions):
33283320
db.register_function(value, name=name)
33293321

33303322

3331-
def _value_or_none(value):
3332-
if getattr(value, "__class__", None).__name__ == "Sentinel":
3333-
return None
3334-
return value
3335-
3336-
33373323
def _maybe_register_functions(db, functions_list):
33383324
if not functions_list:
33393325
return
33403326
for functions in functions_list:
3341-
functions = _value_or_none(functions)
33423327
if isinstance(functions, str) and functions.strip():
33433328
_register_functions(db, functions)

0 commit comments

Comments
 (0)