1919import os
2020import unittest
2121
22+ # TODO(https://github.com/google/pytype/issues/1081): Re-enable import-error.
2223from absl .testing import parameterized
2324from google .api_core import datetime_helpers
24- from google .cloud import spanner
25+ from google .cloud import spanner # pytype: disable=import-error
2526from google .cloud import spanner_v1
2627
2728import spanner_orm
@@ -45,6 +46,9 @@ def setUp(self):
4546 ))
4647
4748 @parameterized .parameters (
49+ # TODO(https://github.com/google/pytype/issues/1287): Re-enable
50+ # module-attr.
51+ # pytype: disable=module-attr
4852 (True , spanner_v1 .param_types .BOOL ),
4953 (0 , spanner_v1 .param_types .INT64 ),
5054 (0.0 , spanner_v1 .param_types .FLOAT64 ),
@@ -71,6 +75,7 @@ def setUp(self):
7175 array_element_type = spanner_v1 .param_types .STRING ,
7276 ),
7377 ),
78+ # pytype: enable=module-attr
7479 )
7580 def test_param_from_value (self , value , expected_type ):
7681 param = condition .Param .from_value (value )
@@ -132,6 +137,9 @@ def test_param_from_value_correctly_encodes(self, tautology):
132137 self .assertCountEqual ((test_model ,), models .SmallTestModel .where (tautology ))
133138
134139 @parameterized .named_parameters (
140+ # TODO(https://github.com/google/pytype/issues/1287): Re-enable
141+ # module-attr.
142+ # pytype: disable=module-attr
135143 (
136144 'minimal' ,
137145 condition .ArbitraryCondition (
@@ -167,6 +175,7 @@ def test_param_from_value_correctly_encodes(self, tautology):
167175 'IF(@true_param0, @key_param0, SmallTestModel.value_1)' ),
168176 ('some-key' ,),
169177 ),
178+ # pytype: enable=module-attr
170179 )
171180 def test_arbitrary_condition (
172181 self ,
@@ -227,6 +236,9 @@ def test_arbitrary_condition_validation_error(
227236 models .SmallTestModel .where (condition_ )
228237
229238 @parameterized .named_parameters (
239+ # TODO(https://github.com/google/pytype/issues/1287): Re-enable
240+ # module-attr.
241+ # pytype: disable=module-attr
230242 (
231243 'empty_or' ,
232244 condition .OrCondition (),
@@ -283,6 +295,7 @@ def test_arbitrary_condition_validation_error(
283295 ')' ),
284296 'ab' ,
285297 ),
298+ # pytype: enable=module-attr
286299 )
287300 def test_or_condition (
288301 self ,
0 commit comments