@@ -269,7 +269,7 @@ def _attr_getter(self, obj, attr):
269269 # Both lxml and BeautifulSoup have the same implementation:
270270 return obj .get (attr )
271271
272- def _href_getter (self , obj ):
272+ def _href_getter (self , obj ) -> str | None :
273273 """
274274 Return a href if the DOM node contains a child <a> or None.
275275
@@ -392,7 +392,7 @@ def _parse_tables(self, document, match, attrs):
392392 """
393393 raise AbstractMethodError (self )
394394
395- def _equals_tag (self , obj , tag ):
395+ def _equals_tag (self , obj , tag ) -> bool :
396396 """
397397 Return whether an individual DOM node matches a tag
398398
@@ -629,7 +629,7 @@ def _href_getter(self, obj) -> str | None:
629629 def _text_getter (self , obj ):
630630 return obj .text
631631
632- def _equals_tag (self , obj , tag ):
632+ def _equals_tag (self , obj , tag ) -> bool :
633633 return obj .name == tag
634634
635635 def _parse_td (self , row ):
@@ -758,7 +758,7 @@ def _parse_tables(self, document, match, kwargs):
758758 raise ValueError (f"No tables found matching regex { repr (pattern )} " )
759759 return tables
760760
761- def _equals_tag (self , obj , tag ):
761+ def _equals_tag (self , obj , tag ) -> bool :
762762 return obj .tag == tag
763763
764764 def _build_doc (self ):
0 commit comments