Skip to content

Commit 198c0a4

Browse files
committed
pandas-dev#29886 - Replace rm -rf pandas/ for repr() on parses.py
1 parent 80e8a1a commit 198c0a4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: 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 {repr(type(obj).__name__)}")
137137
return text
138138

139139

Diff for: pandas/io/parsers.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,8 @@ def _get_options_with_defaults(self, engine):
913913
pass
914914
else:
915915
raise ValueError(
916-
"The %r option is not supported with the"
917-
" %r engine" % (argname, engine)
916+
f"The {repr(argname)} option is not supported with the"
917+
f" {repr(engine)} engine"
918918
)
919919
else:
920920
value = _deprecated_defaults.get(argname, default)
@@ -3607,8 +3607,8 @@ def __init__(self, f, colspecs, delimiter, comment, skiprows=None, infer_nrows=1
36073607

36083608
if not isinstance(self.colspecs, (tuple, list)):
36093609
raise TypeError(
3610-
"column specifications must be a list or tuple, "
3611-
"input was a %r" % type(colspecs).__name__
3610+
f"column specifications must be a list or tuple, "
3611+
f"input was a {repr(type(colspecs).__name__)}"
36123612
)
36133613

36143614
for colspec in self.colspecs:

0 commit comments

Comments
 (0)