Skip to content

Commit affb4a3

Browse files
committed
Manually fixing up bad indents / long lines after renames.
1 parent 50c7c8a commit affb4a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+303
-287
lines changed

bigquery/unit_tests/test_job.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_ctor_w_schema(self):
269269
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
270270
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
271271
job = self._make_one(self.JOB_NAME, table, [self.SOURCE1], client,
272-
schema=[full_name, age])
272+
schema=[full_name, age])
273273
self.assertEqual(job.schema, [full_name, age])
274274

275275
def test_schema_setter_non_list(self):
@@ -499,7 +499,7 @@ def test_begin_w_alternate_client(self):
499499
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
500500
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
501501
job = self._make_one(self.JOB_NAME, table, [self.SOURCE1], client1,
502-
schema=[full_name, age])
502+
schema=[full_name, age])
503503

504504
job.allow_jagged_rows = True
505505
job.allow_quoted_newlines = True
@@ -998,7 +998,7 @@ def test_ctor(self):
998998
client = _Client(self.PROJECT)
999999
source = _Table(self.SOURCE_TABLE)
10001000
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1001-
client)
1001+
client)
10021002
self.assertEqual(job.source, source)
10031003
self.assertEqual(job.destination_uris, [self.DESTINATION_URI])
10041004
self.assertIs(job._client, client)
@@ -1082,7 +1082,7 @@ def test_begin_w_bound_client(self):
10821082
client = _Client(project=self.PROJECT, connection=conn)
10831083
source = _Table(self.SOURCE_TABLE)
10841084
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1085-
client)
1085+
client)
10861086

10871087
job.begin()
10881088

@@ -1131,7 +1131,7 @@ def test_begin_w_alternate_client(self):
11311131
client2 = _Client(project=self.PROJECT, connection=conn2)
11321132
source = _Table(self.SOURCE_TABLE)
11331133
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1134-
client1)
1134+
client1)
11351135

11361136
job.compression = 'GZIP'
11371137
job.destination_format = 'NEWLINE_DELIMITED_JSON'
@@ -1163,7 +1163,7 @@ def test_exists_miss_w_bound_client(self):
11631163
client = _Client(project=self.PROJECT, connection=conn)
11641164
source = _Table(self.SOURCE_TABLE)
11651165
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1166-
client)
1166+
client)
11671167

11681168
self.assertFalse(job.exists())
11691169

@@ -1181,7 +1181,7 @@ def test_exists_hit_w_alternate_client(self):
11811181
client2 = _Client(project=self.PROJECT, connection=conn2)
11821182
source = _Table(self.SOURCE_TABLE)
11831183
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1184-
client1)
1184+
client1)
11851185

11861186
self.assertTrue(job.exists(client=client2))
11871187

@@ -1199,7 +1199,7 @@ def test_reload_w_bound_client(self):
11991199
client = _Client(project=self.PROJECT, connection=conn)
12001200
source = _Table(self.SOURCE_TABLE)
12011201
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1202-
client)
1202+
client)
12031203

12041204
job.reload()
12051205

@@ -1218,7 +1218,7 @@ def test_reload_w_alternate_client(self):
12181218
client2 = _Client(project=self.PROJECT, connection=conn2)
12191219
source = _Table(self.SOURCE_TABLE)
12201220
job = self._make_one(self.JOB_NAME, source, [self.DESTINATION_URI],
1221-
client1)
1221+
client1)
12221222

12231223
job.reload(client=client2)
12241224

@@ -1533,9 +1533,9 @@ def test_begin_w_bound_client_and_udf(self):
15331533
conn = _Connection(RESOURCE)
15341534
client = _Client(project=self.PROJECT, connection=conn)
15351535
job = self._make_one(self.JOB_NAME, self.QUERY, client,
1536-
udf_resources=[
1537-
UDFResource("resourceUri", RESOURCE_URI)
1538-
])
1536+
udf_resources=[
1537+
UDFResource("resourceUri", RESOURCE_URI)
1538+
])
15391539

15401540
job.begin()
15411541

bigquery/unit_tests/test_schema.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ def test_ctor_defaults(self):
3535

3636
def test_ctor_explicit(self):
3737
field = self._make_one('test', 'STRING', mode='REQUIRED',
38-
description='Testing')
38+
description='Testing')
3939
self.assertEqual(field.name, 'test')
4040
self.assertEqual(field.field_type, 'STRING')
4141
self.assertEqual(field.mode, 'REQUIRED')
4242
self.assertEqual(field.description, 'Testing')
4343
self.assertIsNone(field.fields)
4444

4545
def test_ctor_subfields(self):
46-
field = self._make_one('phone_number', 'RECORD',
47-
fields=[self._make_one('area_code', 'STRING'),
48-
self._make_one('local_number', 'STRING')])
46+
field = self._make_one(
47+
'phone_number', 'RECORD',
48+
fields=[self._make_one('area_code', 'STRING'),
49+
self._make_one('local_number', 'STRING')])
4950
self.assertEqual(field.name, 'phone_number')
5051
self.assertEqual(field.field_type, 'RECORD')
5152
self.assertEqual(field.mode, 'NULLABLE')
@@ -91,16 +92,16 @@ def test___eq___fields_mismatch(self):
9192

9293
def test___eq___hit(self):
9394
field = self._make_one('test', 'STRING', mode='REQUIRED',
94-
description='Testing')
95+
description='Testing')
9596
other = self._make_one('test', 'STRING', mode='REQUIRED',
96-
description='Testing')
97+
description='Testing')
9798
self.assertEqual(field, other)
9899

99100
def test___eq___hit_case_diff_on_type(self):
100101
field = self._make_one('test', 'STRING', mode='REQUIRED',
101-
description='Testing')
102+
description='Testing')
102103
other = self._make_one('test', 'string', mode='REQUIRED',
103-
description='Testing')
104+
description='Testing')
104105
self.assertEqual(field, other)
105106

106107
def test___eq___hit_w_fields(self):

bigquery/unit_tests/test_table.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_ctor_w_schema(self):
167167
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
168168
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
169169
table = self._make_one(self.TABLE_NAME, dataset,
170-
schema=[full_name, age])
170+
schema=[full_name, age])
171171
self.assertEqual(table.schema, [full_name, age])
172172

173173
def test_num_bytes_getter(self):
@@ -410,7 +410,7 @@ def test_create_w_bound_client(self):
410410
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
411411
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
412412
table = self._make_one(self.TABLE_NAME, dataset,
413-
schema=[full_name, age])
413+
schema=[full_name, age])
414414

415415
table.create()
416416

@@ -440,7 +440,7 @@ def test_create_w_partition_no_expire(self):
440440
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
441441
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
442442
table = self._make_one(self.TABLE_NAME, dataset,
443-
schema=[full_name, age])
443+
schema=[full_name, age])
444444

445445
self.assertIsNone(table.partitioning_type)
446446
table.partitioning_type = "DAY"
@@ -474,7 +474,7 @@ def test_create_w_partition_and_expire(self):
474474
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
475475
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
476476
table = self._make_one(self.TABLE_NAME, dataset,
477-
schema=[full_name, age])
477+
schema=[full_name, age])
478478
self.assertIsNone(table.partition_expiration)
479479
table.partition_expiration = 100
480480
self.assertEqual(table.partitioning_type, "DAY")
@@ -507,7 +507,7 @@ def test_partition_type_setter_bad_type(self):
507507
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
508508
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
509509
table = self._make_one(self.TABLE_NAME, dataset,
510-
schema=[full_name, age])
510+
schema=[full_name, age])
511511
with self.assertRaises(ValueError):
512512
table.partitioning_type = 123
513513

@@ -520,7 +520,7 @@ def test_partition_type_setter_unknown_value(self):
520520
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
521521
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
522522
table = self._make_one(self.TABLE_NAME, dataset,
523-
schema=[full_name, age])
523+
schema=[full_name, age])
524524
with self.assertRaises(ValueError):
525525
table.partitioning_type = "HASH"
526526

@@ -533,7 +533,7 @@ def test_partition_type_setter_w_known_value(self):
533533
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
534534
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
535535
table = self._make_one(self.TABLE_NAME, dataset,
536-
schema=[full_name, age])
536+
schema=[full_name, age])
537537
self.assertIsNone(table.partitioning_type)
538538
table.partitioning_type = 'DAY'
539539
self.assertEqual(table.partitioning_type, 'DAY')
@@ -547,7 +547,7 @@ def test_partition_type_setter_w_none(self):
547547
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
548548
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
549549
table = self._make_one(self.TABLE_NAME, dataset,
550-
schema=[full_name, age])
550+
schema=[full_name, age])
551551
table._properties['timePartitioning'] = {'type': 'DAY'}
552552
table.partitioning_type = None
553553
self.assertIsNone(table.partitioning_type)
@@ -562,7 +562,7 @@ def test_partition_experation_bad_type(self):
562562
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
563563
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
564564
table = self._make_one(self.TABLE_NAME, dataset,
565-
schema=[full_name, age])
565+
schema=[full_name, age])
566566
with self.assertRaises(ValueError):
567567
table.partition_expiration = "NEVER"
568568

@@ -575,7 +575,7 @@ def test_partition_expiration_w_integer(self):
575575
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
576576
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
577577
table = self._make_one(self.TABLE_NAME, dataset,
578-
schema=[full_name, age])
578+
schema=[full_name, age])
579579
self.assertIsNone(table.partition_expiration)
580580
table.partition_expiration = 100
581581
self.assertEqual(table.partitioning_type, "DAY")
@@ -590,7 +590,7 @@ def test_partition_expiration_w_none(self):
590590
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
591591
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
592592
table = self._make_one(self.TABLE_NAME, dataset,
593-
schema=[full_name, age])
593+
schema=[full_name, age])
594594
self.assertIsNone(table.partition_expiration)
595595
table._properties['timePartitioning'] = {
596596
'type': 'DAY',
@@ -609,7 +609,7 @@ def test_partition_expiration_w_none_no_partition_set(self):
609609
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
610610
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
611611
table = self._make_one(self.TABLE_NAME, dataset,
612-
schema=[full_name, age])
612+
schema=[full_name, age])
613613
self.assertIsNone(table.partition_expiration)
614614
table.partition_expiration = None
615615
self.assertIsNone(table.partitioning_type)
@@ -624,7 +624,7 @@ def test_list_partitions(self):
624624
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
625625
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
626626
table = self._make_one(self.TABLE_NAME, dataset,
627-
schema=[full_name, age])
627+
schema=[full_name, age])
628628
self.assertEqual(table.list_partitions(), [20160804, 20160805])
629629

630630
def test_create_w_alternate_client(self):
@@ -654,7 +654,7 @@ def test_create_w_alternate_client(self):
654654
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
655655
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
656656
table = self._make_one(self.TABLE_NAME, dataset=dataset,
657-
schema=[full_name, age])
657+
schema=[full_name, age])
658658
table.friendly_name = TITLE
659659
table.description = DESCRIPTION
660660
table.view_query = QUERY
@@ -693,7 +693,7 @@ def test_create_w_missing_output_properties(self):
693693
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
694694
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
695695
table = self._make_one(self.TABLE_NAME, dataset,
696-
schema=[full_name, age])
696+
schema=[full_name, age])
697697

698698
table.create()
699699

@@ -909,7 +909,7 @@ def test_update_w_bound_client(self):
909909
full_name = SchemaField('full_name', 'STRING', mode='REQUIRED')
910910
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
911911
table = self._make_one(self.TABLE_NAME, dataset=dataset,
912-
schema=[full_name, age])
912+
schema=[full_name, age])
913913
table.description = DESCRIPTION
914914
table.friendly_name = TITLE
915915

@@ -1068,7 +1068,7 @@ def _bigquery_timestamp_float_repr(ts_float):
10681068
age = SchemaField('age', 'INTEGER', mode='NULLABLE')
10691069
joined = SchemaField('joined', 'TIMESTAMP', mode='NULLABLE')
10701070
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1071-
schema=[full_name, age, joined])
1071+
schema=[full_name, age, joined])
10721072

10731073
iterator = table.fetch_data()
10741074
page = six.next(iterator.pages)
@@ -1135,7 +1135,7 @@ def test_fetch_data_w_alternate_client(self):
11351135
voter = SchemaField('voter', 'BOOLEAN', mode='NULLABLE')
11361136
score = SchemaField('score', 'FLOAT', mode='NULLABLE')
11371137
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1138-
schema=[full_name, age, voter, score])
1138+
schema=[full_name, age, voter, score])
11391139

11401140
iterator = table.fetch_data(
11411141
client=client2, max_results=MAX, page_token=TOKEN)
@@ -1188,7 +1188,7 @@ def test_fetch_data_w_repeated_fields(self):
11881188
struct = SchemaField('struct', 'RECORD', mode='REPEATED',
11891189
fields=[index, score])
11901190
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1191-
schema=[full_name, struct])
1191+
schema=[full_name, struct])
11921192

11931193
iterator = table.fetch_data()
11941194
page = six.next(iterator.pages)
@@ -1244,7 +1244,7 @@ def test_fetch_data_w_record_schema(self):
12441244
phone = SchemaField('phone', 'RECORD', mode='NULLABLE',
12451245
fields=[area_code, local_number, rank])
12461246
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1247-
schema=[full_name, phone])
1247+
schema=[full_name, phone])
12481248

12491249
iterator = table.fetch_data()
12501250
page = six.next(iterator.pages)
@@ -1306,7 +1306,7 @@ def test_insert_data_w_bound_client(self):
13061306
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
13071307
joined = SchemaField('joined', 'TIMESTAMP', mode='NULLABLE')
13081308
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1309-
schema=[full_name, age, joined])
1309+
schema=[full_name, age, joined])
13101310
ROWS = [
13111311
('Phred Phlyntstone', 32, WHEN),
13121312
('Bharney Rhubble', 33, WHEN + datetime.timedelta(seconds=1)),
@@ -1358,7 +1358,7 @@ def test_insert_data_w_alternate_client(self):
13581358
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
13591359
voter = SchemaField('voter', 'BOOLEAN', mode='NULLABLE')
13601360
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1361-
schema=[full_name, age, voter])
1361+
schema=[full_name, age, voter])
13621362
ROWS = [
13631363
('Phred Phlyntstone', 32, True),
13641364
('Bharney Rhubble', 33, False),
@@ -1412,7 +1412,7 @@ def test_insert_data_w_repeated_fields(self):
14121412
struct = SchemaField('struct', 'RECORD', mode='REPEATED',
14131413
fields=[index, score])
14141414
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1415-
schema=[full_name, struct])
1415+
schema=[full_name, struct])
14161416
ROWS = [
14171417
(['red', 'green'], [{'index': [1, 2], 'score': [3.1415, 1.414]}]),
14181418
]
@@ -1448,7 +1448,7 @@ def test_insert_data_w_record_schema(self):
14481448
phone = SchemaField('phone', 'RECORD', mode='NULLABLE',
14491449
fields=[area_code, local_number, rank])
14501450
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1451-
schema=[full_name, phone])
1451+
schema=[full_name, phone])
14521452
ROWS = [
14531453
('Phred Phlyntstone', {'area_code': '800',
14541454
'local_number': '555-1212',
@@ -1558,7 +1558,7 @@ def _upload_from_file_helper(self, **kw):
15581558
age = SchemaField('age', 'INTEGER', mode='REQUIRED')
15591559
joined = SchemaField('joined', 'TIMESTAMP', mode='NULLABLE')
15601560
table = self._make_one(self.TABLE_NAME, dataset=dataset,
1561-
schema=[full_name, age, joined])
1561+
schema=[full_name, age, joined])
15621562
ROWS = [
15631563
('Phred Phlyntstone', 32, WHEN),
15641564
('Bharney Rhubble', 33, WHEN + datetime.timedelta(seconds=1)),

0 commit comments

Comments
 (0)