129129)
130130
131131
132-
133132def test_non_existing_urn ():
134133 assert (
135134 registry .lookup_function (
136- urn = "non_existent" , function_name = "add" , signature = [i8 (nullable = False ), i8 (nullable = False )]
135+ urn = "non_existent" ,
136+ function_name = "add" ,
137+ signature = [i8 (nullable = False ), i8 (nullable = False )],
137138 )
138139 is None
139140 )
@@ -142,8 +143,9 @@ def test_non_existing_urn():
142143def test_non_existing_function ():
143144 assert (
144145 registry .lookup_function (
145-
146- urn = "extension:test:functions" , function_name = "sub" , signature = [i8 (nullable = False ), i8 (nullable = False )]
146+ urn = "extension:test:functions" ,
147+ function_name = "sub" ,
148+ signature = [i8 (nullable = False ), i8 (nullable = False )],
147149 )
148150 is None
149151 )
@@ -152,15 +154,19 @@ def test_non_existing_function():
152154def test_non_existing_function_signature ():
153155 assert (
154156 registry .lookup_function (
155- urn = "extension:test:functions" , function_name = "add" , signature = [i8 (nullable = False )]
157+ urn = "extension:test:functions" ,
158+ function_name = "add" ,
159+ signature = [i8 (nullable = False )],
156160 )
157161 is None
158162 )
159163
160164
161165def test_exact_match ():
162166 assert registry .lookup_function (
163- urn = "extension:test:functions" , function_name = "add" , signature = [i8 (nullable = False ), i8 (nullable = False )]
167+ urn = "extension:test:functions" ,
168+ function_name = "add" ,
169+ signature = [i8 (nullable = False ), i8 (nullable = False )],
164170 )[1 ] == Type (i8 = Type .I8 (nullability = Type .NULLABILITY_REQUIRED ))
165171
166172
@@ -184,43 +190,35 @@ def test_wildcard_match_fails_with_constraits():
184190
185191
186192def test_wildcard_match_with_constraits ():
187- assert (
188- registry .lookup_function (
189- urn = "extension:test:functions" ,
190- function_name = "add" ,
191- signature = [i16 (nullable = False ), i16 (nullable = False ), i8 (nullable = False )],
192- )[1 ]
193- == i8 (nullable = False )
194- )
193+ assert registry .lookup_function (
194+ urn = "extension:test:functions" ,
195+ function_name = "add" ,
196+ signature = [i16 (nullable = False ), i16 (nullable = False ), i8 (nullable = False )],
197+ )[1 ] == i8 (nullable = False )
195198
196199
197200def test_variadic ():
198- assert (
199- registry .lookup_function (
200- urn = "extension:test:functions" ,
201- function_name = "test_fn" ,
202- signature = [i8 (nullable = False ), i8 (nullable = False ), i8 (nullable = False )],
203- )[1 ]
204- == i8 (nullable = False )
205- )
201+ assert registry .lookup_function (
202+ urn = "extension:test:functions" ,
203+ function_name = "test_fn" ,
204+ signature = [i8 (nullable = False ), i8 (nullable = False ), i8 (nullable = False )],
205+ )[1 ] == i8 (nullable = False )
206206
207207
208208def test_variadic_any ():
209- assert (
210- registry .lookup_function (
211- urn = "extension:test:functions" ,
212- function_name = "test_fn_variadic_any" ,
213- signature = [i16 (nullable = False ), i16 (nullable = False ), i16 (nullable = False )],
214- )[1 ]
215- == i16 (nullable = False )
216- )
209+ assert registry .lookup_function (
210+ urn = "extension:test:functions" ,
211+ function_name = "test_fn_variadic_any" ,
212+ signature = [i16 (nullable = False ), i16 (nullable = False ), i16 (nullable = False )],
213+ )[1 ] == i16 (nullable = False )
217214
218215
219216def test_variadic_fails_min_constraint ():
220217 assert (
221218 registry .lookup_function (
222-
223- urn = "extension:test:functions" , function_name = "test_fn" , signature = [i8 (nullable = False )]
219+ urn = "extension:test:functions" ,
220+ function_name = "test_fn" ,
221+ signature = [i8 (nullable = False )],
224222 )
225223 is None
226224 )
@@ -254,14 +252,11 @@ def test_decimal_happy_path_discrete():
254252
255253
256254def test_enum_with_valid_option ():
257- assert (
258- registry .lookup_function (
259- urn = "extension:test:functions" ,
260- function_name = "test_enum" ,
261- signature = ["FLIP" , i8 (nullable = False )],
262- )[1 ]
263- == i8 (nullable = False )
264- )
255+ assert registry .lookup_function (
256+ urn = "extension:test:functions" ,
257+ function_name = "test_enum" ,
258+ signature = ["FLIP" , i8 (nullable = False )],
259+ )[1 ] == i8 (nullable = False )
265260
266261
267262def test_enum_with_nonexistent_option ():
0 commit comments