@@ -103,7 +103,7 @@ def _get_skiprows(skiprows):
103
103
elif skiprows is None :
104
104
return 0
105
105
raise TypeError (
106
- f"{ repr (type (skiprows ).__name__ )} is not a valid type for skipping rows"
106
+ f"{ (type (skiprows ).__name__ )} is not a valid type for skipping rows"
107
107
)
108
108
109
109
@@ -133,7 +133,7 @@ def _read(obj):
133
133
except (TypeError , ValueError ):
134
134
pass
135
135
else :
136
- raise TypeError (f"Cannot read object of type { repr (type (obj ).__name__ )} " )
136
+ raise TypeError (f"Cannot read object of type { (type (obj ).__name__ )} " )
137
137
return text
138
138
139
139
@@ -560,7 +560,7 @@ def _parse_tables(self, doc, match, attrs):
560
560
unique_tables .add (table )
561
561
562
562
if not result :
563
- raise ValueError (f"No tables found matching pattern { repr ( match .pattern ) } " )
563
+ raise ValueError (f"No tables found matching pattern { match .pattern } " )
564
564
return result
565
565
566
566
def _text_getter (self , obj ):
@@ -659,7 +659,7 @@ def _parse_tables(self, doc, match, kwargs):
659
659
660
660
# 1. check all descendants for the given pattern and only search tables
661
661
# 2. go up the tree until we find a table
662
- xpath_expr = f"//table//*[re:test(text(), { repr ( pattern ) } )]/ancestor::table"
662
+ xpath_expr = f"//table//*[re:test(text(), { pattern } )]/ancestor::table"
663
663
664
664
# if any table attributes were given build an xpath expression to
665
665
# search for them
@@ -679,7 +679,7 @@ def _parse_tables(self, doc, match, kwargs):
679
679
elem .getparent ().remove (elem )
680
680
681
681
if not tables :
682
- raise ValueError (f"No tables found matching regex { repr ( pattern ) } " )
682
+ raise ValueError (f"No tables found matching regex { pattern } " )
683
683
return tables
684
684
685
685
def _equals_tag (self , obj , tag ):
@@ -857,7 +857,7 @@ def _validate_flavor(flavor):
857
857
elif isinstance (flavor , abc .Iterable ):
858
858
if not all (isinstance (flav , str ) for flav in flavor ):
859
859
raise TypeError (
860
- f"Object of type { repr (type (flavor ).__name__ )} "
860
+ f"Object of type { (type (flavor ).__name__ )} "
861
861
f"is not an iterable of strings"
862
862
)
863
863
else :
0 commit comments