mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-21 00:11:20 -05:00
prs-fleshgolem-2070: feat: sqlalchemy 2.0 (#2096)
* upgrade sqlalchemy to 2.0 * rewrite all db models to sqla 2.0 mapping api * fix some importing and typing weirdness * fix types of a lot of nullable columns * remove get_ref methods * fix issues found by tests * rewrite all queries in repository_recipe to 2.0 style * rewrite all repository queries to 2.0 api * rewrite all remaining queries to 2.0 api * remove now-unneeded __allow_unmapped__ flag * remove and fix some unneeded cases of "# type: ignore" * fix formatting * bump black version * run black * can this please be the last one. okay. just. okay. * fix repository errors * remove return * drop open API validator --------- Co-authored-by: Sören Busch <fleshgolem@gmx.net>
This commit is contained in:
@@ -25,7 +25,6 @@ def test_camelize_variables():
|
||||
|
||||
|
||||
def test_cast_to():
|
||||
|
||||
model = TestModel(long_name="Hello", long_int=1, long_float=1.1)
|
||||
|
||||
model2 = model.cast(TestModel2, another_str="World")
|
||||
@@ -37,7 +36,6 @@ def test_cast_to():
|
||||
|
||||
|
||||
def test_map_to():
|
||||
|
||||
model = TestModel(long_name="Model1", long_int=100, long_float=1.5)
|
||||
|
||||
model2 = TestModel2(long_name="Model2", long_int=1, long_float=1.1, another_str="World")
|
||||
|
||||
Reference in New Issue
Block a user