Skip to content

Commit 029ee4d

Browse files
committed
STY - Add repr to html.py and parsers.py - pandas-dev#29953
1 parent 182c68b commit 029ee4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/io/html.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _get_skiprows(skiprows):
103103
elif skiprows is None:
104104
return 0
105105
raise TypeError(
106-
"%r is not a valid type for skipping rows" % type(skiprows).__name__
106+
f"{repr(type(skiprows).__name__)} is not a valid type for skipping rows"
107107
)
108108

109109

@@ -133,7 +133,7 @@ def _read(obj):
133133
except (TypeError, ValueError):
134134
pass
135135
else:
136-
raise TypeError("Cannot read object of type %r" % type(obj).__name__)
136+
raise TypeError(f"Cannot read object of type {type(obj).__name__}")
137137
return text
138138

139139

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3600,7 +3600,7 @@ def __init__(self, f, colspecs, delimiter, comment, skiprows=None, infer_nrows=1
36003600
self.comment = comment
36013601
if colspecs == "infer":
36023602
self.colspecs = self.detect_colspecs(
3603-
infer_nrows=infer_nrows, skiprows=skiprows
3603+
infer_nrows=infer_nrows, skiprows=skiprow
36043604
)
36053605
else:
36063606
self.colspecs = colspecs

0 commit comments

Comments
 (0)