@@ -214,7 +214,7 @@ def parse_tables(self):
214
214
215
215
Returns
216
216
-------
217
- tables : list of parsed (header, body, footer) tuples from tables
217
+ list of parsed (header, body, footer) tuples from tables.
218
218
"""
219
219
tables = self ._parse_tables (self ._build_doc (), self .match , self .attrs )
220
220
return (self ._parse_thead_tbody_tfoot (table ) for table in tables )
@@ -233,7 +233,7 @@ def _attr_getter(self, obj, attr):
233
233
234
234
Returns
235
235
-------
236
- text : str or unicode
236
+ str or unicode
237
237
The attribute value.
238
238
"""
239
239
raise com .AbstractMethodError (self )
@@ -264,7 +264,7 @@ def _parse_td(self, obj):
264
264
265
265
Returns
266
266
-------
267
- columns : list of node-like
267
+ list of node-like
268
268
These are the elements of each row, i.e., the columns.
269
269
"""
270
270
raise com .AbstractMethodError (self )
@@ -279,7 +279,8 @@ def _parse_thead_tr(self, table):
279
279
280
280
Returns
281
281
-------
282
- rows : list of <tr> row elements of a table
282
+ list of node-like
283
+ These are the <tr> row elements of a table.
283
284
"""
284
285
raise com .AbstractMethodError (self )
285
286
@@ -297,7 +298,8 @@ def _parse_tbody_tr(self, table):
297
298
298
299
Returns
299
300
-------
300
- rows : list of <tr> row elements of a table
301
+ list of node-like
302
+ These are the <tr> row elements of a table.
301
303
"""
302
304
raise com .AbstractMethodError (self )
303
305
@@ -311,7 +313,8 @@ def _parse_tfoot_tr(self, table):
311
313
312
314
Returns
313
315
-------
314
- rows : list of <tr> row elements of a table
316
+ list of node-like
317
+ These are the <tr> row elements of a table.
315
318
"""
316
319
raise com .AbstractMethodError (self )
317
320
@@ -336,7 +339,8 @@ def _parse_tables(self, doc, match, attrs):
336
339
337
340
Returns
338
341
-------
339
- tables : list of HTML <table> elements to be parsed into raw data.
342
+ list of node-like
343
+ HTML <table> elements to be parsed into raw data.
340
344
"""
341
345
raise com .AbstractMethodError (self )
342
346
@@ -354,8 +358,8 @@ def _equals_tag(self, obj, tag):
354
358
355
359
Returns
356
360
-------
357
- is_tag_equal : boolean
358
- boolean indicating if the object is equal to tag 'tag'
361
+ boolean
362
+ Whether the object is equal to tag 'tag'
359
363
"""
360
364
raise com .AbstractMethodError (self )
361
365
@@ -365,7 +369,8 @@ def _build_doc(self):
365
369
366
370
Returns
367
371
-------
368
- obj : the DOM from which to parse the table element.
372
+ node-like
373
+ The DOM from which to parse the table element.
369
374
"""
370
375
raise com .AbstractMethodError (self )
371
376
@@ -390,7 +395,7 @@ def _parse_thead_tbody_tfoot(self, table_html):
390
395
391
396
Returns
392
397
-------
393
- tuple of (header, body, footer)
398
+ tuple of (header, body, footer), each a list of list-of-text rows.
394
399
"""
395
400
396
401
header_rows = self ._parse_thead_tr (table_html )
@@ -432,7 +437,8 @@ def _expand_colspan_rowspan(self, rows):
432
437
433
438
Returns
434
439
-------
435
- res : list of rows, each of which is a list of str in that row
440
+ list of list
441
+ Each returned row is a list of str text.
436
442
"""
437
443
438
444
all_texts = [] # list of rows, each a list of str
@@ -501,14 +507,14 @@ def _handle_hidden_tables(self, tbl_list, attr_name):
501
507
502
508
Parameters
503
509
----------
504
- tbl_list : list of Tag or list of Element
510
+ tbl_list : list of node-like
505
511
Type of list elements will vary depending upon parser used
506
512
attr_name : str
507
513
Name of the accessor for retrieving HTML attributes
508
514
509
515
Returns
510
516
-------
511
- list of Tag or list of Element
517
+ list of node-like
512
518
Return type matches `tbl_list`
513
519
"""
514
520
if not self .displayed_only :
0 commit comments