Skip to content

Commit f00899f

Browse files
committed
Fix for sqlalchemy >=v2.019.
1 parent 832ff30 commit f00899f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/_pytask/parameters.py

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
def _database_url_callback(
7575
ctx: Context, name: str, value: str | None # noqa: ARG001
7676
) -> URL:
77+
"""Check the url for the database."""
78+
# Since sqlalchemy v2.0.19, we need to shortcircuit here.
79+
if value is None:
80+
return None
81+
7782
try:
7883
return make_url(value)
7984
except ArgumentError:

0 commit comments

Comments
 (0)