@@ -407,7 +407,10 @@ async def sample_create_dataset():
407
407
# Create or coerce a protobuf request object.
408
408
# - Quick check: If we got a request object, we should *not* have
409
409
# gotten any keyword arguments that map to the request.
410
- has_flattened_params = any ([parent , dataset ])
410
+ flattened_params = [parent , dataset ]
411
+ has_flattened_params = (
412
+ len ([param for param in flattened_params if param is not None ]) > 0
413
+ )
411
414
if request is not None and has_flattened_params :
412
415
raise ValueError (
413
416
"If the `request` argument is set, then none of "
@@ -526,7 +529,10 @@ async def sample_get_dataset():
526
529
# Create or coerce a protobuf request object.
527
530
# - Quick check: If we got a request object, we should *not* have
528
531
# gotten any keyword arguments that map to the request.
529
- has_flattened_params = any ([name ])
532
+ flattened_params = [name ]
533
+ has_flattened_params = (
534
+ len ([param for param in flattened_params if param is not None ]) > 0
535
+ )
530
536
if request is not None and has_flattened_params :
531
537
raise ValueError (
532
538
"If the `request` argument is set, then none of "
@@ -653,7 +659,10 @@ async def sample_update_dataset():
653
659
# Create or coerce a protobuf request object.
654
660
# - Quick check: If we got a request object, we should *not* have
655
661
# gotten any keyword arguments that map to the request.
656
- has_flattened_params = any ([dataset , update_mask ])
662
+ flattened_params = [dataset , update_mask ]
663
+ has_flattened_params = (
664
+ len ([param for param in flattened_params if param is not None ]) > 0
665
+ )
657
666
if request is not None and has_flattened_params :
658
667
raise ValueError (
659
668
"If the `request` argument is set, then none of "
@@ -769,7 +778,10 @@ async def sample_list_datasets():
769
778
# Create or coerce a protobuf request object.
770
779
# - Quick check: If we got a request object, we should *not* have
771
780
# gotten any keyword arguments that map to the request.
772
- has_flattened_params = any ([parent ])
781
+ flattened_params = [parent ]
782
+ has_flattened_params = (
783
+ len ([param for param in flattened_params if param is not None ]) > 0
784
+ )
773
785
if request is not None and has_flattened_params :
774
786
raise ValueError (
775
787
"If the `request` argument is set, then none of "
@@ -903,7 +915,10 @@ async def sample_delete_dataset():
903
915
# Create or coerce a protobuf request object.
904
916
# - Quick check: If we got a request object, we should *not* have
905
917
# gotten any keyword arguments that map to the request.
906
- has_flattened_params = any ([name ])
918
+ flattened_params = [name ]
919
+ has_flattened_params = (
920
+ len ([param for param in flattened_params if param is not None ]) > 0
921
+ )
907
922
if request is not None and has_flattened_params :
908
923
raise ValueError (
909
924
"If the `request` argument is set, then none of "
@@ -1039,7 +1054,10 @@ async def sample_import_data():
1039
1054
# Create or coerce a protobuf request object.
1040
1055
# - Quick check: If we got a request object, we should *not* have
1041
1056
# gotten any keyword arguments that map to the request.
1042
- has_flattened_params = any ([name , import_configs ])
1057
+ flattened_params = [name , import_configs ]
1058
+ has_flattened_params = (
1059
+ len ([param for param in flattened_params if param is not None ]) > 0
1060
+ )
1043
1061
if request is not None and has_flattened_params :
1044
1062
raise ValueError (
1045
1063
"If the `request` argument is set, then none of "
@@ -1175,7 +1193,10 @@ async def sample_export_data():
1175
1193
# Create or coerce a protobuf request object.
1176
1194
# - Quick check: If we got a request object, we should *not* have
1177
1195
# gotten any keyword arguments that map to the request.
1178
- has_flattened_params = any ([name , export_config ])
1196
+ flattened_params = [name , export_config ]
1197
+ has_flattened_params = (
1198
+ len ([param for param in flattened_params if param is not None ]) > 0
1199
+ )
1179
1200
if request is not None and has_flattened_params :
1180
1201
raise ValueError (
1181
1202
"If the `request` argument is set, then none of "
@@ -1317,7 +1338,10 @@ async def sample_create_dataset_version():
1317
1338
# Create or coerce a protobuf request object.
1318
1339
# - Quick check: If we got a request object, we should *not* have
1319
1340
# gotten any keyword arguments that map to the request.
1320
- has_flattened_params = any ([parent , dataset_version ])
1341
+ flattened_params = [parent , dataset_version ]
1342
+ has_flattened_params = (
1343
+ len ([param for param in flattened_params if param is not None ]) > 0
1344
+ )
1321
1345
if request is not None and has_flattened_params :
1322
1346
raise ValueError (
1323
1347
"If the `request` argument is set, then none of "
@@ -1450,7 +1474,10 @@ async def sample_update_dataset_version():
1450
1474
# Create or coerce a protobuf request object.
1451
1475
# - Quick check: If we got a request object, we should *not* have
1452
1476
# gotten any keyword arguments that map to the request.
1453
- has_flattened_params = any ([dataset_version , update_mask ])
1477
+ flattened_params = [dataset_version , update_mask ]
1478
+ has_flattened_params = (
1479
+ len ([param for param in flattened_params if param is not None ]) > 0
1480
+ )
1454
1481
if request is not None and has_flattened_params :
1455
1482
raise ValueError (
1456
1483
"If the `request` argument is set, then none of "
@@ -1579,7 +1606,10 @@ async def sample_delete_dataset_version():
1579
1606
# Create or coerce a protobuf request object.
1580
1607
# - Quick check: If we got a request object, we should *not* have
1581
1608
# gotten any keyword arguments that map to the request.
1582
- has_flattened_params = any ([name ])
1609
+ flattened_params = [name ]
1610
+ has_flattened_params = (
1611
+ len ([param for param in flattened_params if param is not None ]) > 0
1612
+ )
1583
1613
if request is not None and has_flattened_params :
1584
1614
raise ValueError (
1585
1615
"If the `request` argument is set, then none of "
@@ -1695,7 +1725,10 @@ async def sample_get_dataset_version():
1695
1725
# Create or coerce a protobuf request object.
1696
1726
# - Quick check: If we got a request object, we should *not* have
1697
1727
# gotten any keyword arguments that map to the request.
1698
- has_flattened_params = any ([name ])
1728
+ flattened_params = [name ]
1729
+ has_flattened_params = (
1730
+ len ([param for param in flattened_params if param is not None ]) > 0
1731
+ )
1699
1732
if request is not None and has_flattened_params :
1700
1733
raise ValueError (
1701
1734
"If the `request` argument is set, then none of "
@@ -1810,7 +1843,10 @@ async def sample_list_dataset_versions():
1810
1843
# Create or coerce a protobuf request object.
1811
1844
# - Quick check: If we got a request object, we should *not* have
1812
1845
# gotten any keyword arguments that map to the request.
1813
- has_flattened_params = any ([parent ])
1846
+ flattened_params = [parent ]
1847
+ has_flattened_params = (
1848
+ len ([param for param in flattened_params if param is not None ]) > 0
1849
+ )
1814
1850
if request is not None and has_flattened_params :
1815
1851
raise ValueError (
1816
1852
"If the `request` argument is set, then none of "
@@ -1939,7 +1975,10 @@ async def sample_restore_dataset_version():
1939
1975
# Create or coerce a protobuf request object.
1940
1976
# - Quick check: If we got a request object, we should *not* have
1941
1977
# gotten any keyword arguments that map to the request.
1942
- has_flattened_params = any ([name ])
1978
+ flattened_params = [name ]
1979
+ has_flattened_params = (
1980
+ len ([param for param in flattened_params if param is not None ]) > 0
1981
+ )
1943
1982
if request is not None and has_flattened_params :
1944
1983
raise ValueError (
1945
1984
"If the `request` argument is set, then none of "
@@ -2060,7 +2099,10 @@ async def sample_list_data_items():
2060
2099
# Create or coerce a protobuf request object.
2061
2100
# - Quick check: If we got a request object, we should *not* have
2062
2101
# gotten any keyword arguments that map to the request.
2063
- has_flattened_params = any ([parent ])
2102
+ flattened_params = [parent ]
2103
+ has_flattened_params = (
2104
+ len ([param for param in flattened_params if param is not None ]) > 0
2105
+ )
2064
2106
if request is not None and has_flattened_params :
2065
2107
raise ValueError (
2066
2108
"If the `request` argument is set, then none of "
@@ -2286,7 +2328,10 @@ async def sample_list_saved_queries():
2286
2328
# Create or coerce a protobuf request object.
2287
2329
# - Quick check: If we got a request object, we should *not* have
2288
2330
# gotten any keyword arguments that map to the request.
2289
- has_flattened_params = any ([parent ])
2331
+ flattened_params = [parent ]
2332
+ has_flattened_params = (
2333
+ len ([param for param in flattened_params if param is not None ]) > 0
2334
+ )
2290
2335
if request is not None and has_flattened_params :
2291
2336
raise ValueError (
2292
2337
"If the `request` argument is set, then none of "
@@ -2420,7 +2465,10 @@ async def sample_delete_saved_query():
2420
2465
# Create or coerce a protobuf request object.
2421
2466
# - Quick check: If we got a request object, we should *not* have
2422
2467
# gotten any keyword arguments that map to the request.
2423
- has_flattened_params = any ([name ])
2468
+ flattened_params = [name ]
2469
+ has_flattened_params = (
2470
+ len ([param for param in flattened_params if param is not None ]) > 0
2471
+ )
2424
2472
if request is not None and has_flattened_params :
2425
2473
raise ValueError (
2426
2474
"If the `request` argument is set, then none of "
@@ -2537,7 +2585,10 @@ async def sample_get_annotation_spec():
2537
2585
# Create or coerce a protobuf request object.
2538
2586
# - Quick check: If we got a request object, we should *not* have
2539
2587
# gotten any keyword arguments that map to the request.
2540
- has_flattened_params = any ([name ])
2588
+ flattened_params = [name ]
2589
+ has_flattened_params = (
2590
+ len ([param for param in flattened_params if param is not None ]) > 0
2591
+ )
2541
2592
if request is not None and has_flattened_params :
2542
2593
raise ValueError (
2543
2594
"If the `request` argument is set, then none of "
@@ -2653,7 +2704,10 @@ async def sample_list_annotations():
2653
2704
# Create or coerce a protobuf request object.
2654
2705
# - Quick check: If we got a request object, we should *not* have
2655
2706
# gotten any keyword arguments that map to the request.
2656
- has_flattened_params = any ([parent ])
2707
+ flattened_params = [parent ]
2708
+ has_flattened_params = (
2709
+ len ([param for param in flattened_params if param is not None ]) > 0
2710
+ )
2657
2711
if request is not None and has_flattened_params :
2658
2712
raise ValueError (
2659
2713
"If the `request` argument is set, then none of "
0 commit comments