@@ -269,7 +269,7 @@ def _attr_getter(self, obj, attr):
269
269
# Both lxml and BeautifulSoup have the same implementation:
270
270
return obj .get (attr )
271
271
272
- def _href_getter (self , obj ):
272
+ def _href_getter (self , obj ) -> str | None :
273
273
"""
274
274
Return a href if the DOM node contains a child <a> or None.
275
275
@@ -392,7 +392,7 @@ def _parse_tables(self, document, match, attrs):
392
392
"""
393
393
raise AbstractMethodError (self )
394
394
395
- def _equals_tag (self , obj , tag ):
395
+ def _equals_tag (self , obj , tag ) -> bool :
396
396
"""
397
397
Return whether an individual DOM node matches a tag
398
398
@@ -629,7 +629,7 @@ def _href_getter(self, obj) -> str | None:
629
629
def _text_getter (self , obj ):
630
630
return obj .text
631
631
632
- def _equals_tag (self , obj , tag ):
632
+ def _equals_tag (self , obj , tag ) -> bool :
633
633
return obj .name == tag
634
634
635
635
def _parse_td (self , row ):
@@ -758,7 +758,7 @@ def _parse_tables(self, document, match, kwargs):
758
758
raise ValueError (f"No tables found matching regex { repr (pattern )} " )
759
759
return tables
760
760
761
- def _equals_tag (self , obj , tag ):
761
+ def _equals_tag (self , obj , tag ) -> bool :
762
762
return obj .tag == tag
763
763
764
764
def _build_doc (self ):
0 commit comments