-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
#29886 - Replace !r for repr() on pandas/io/parses.py #30073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
182c68b
029ee4d
4ea03fc
9b9f283
80e8a1a
198c0a4
848e542
eed4528
9305b3f
a42ba49
2608e39
3702186
ae24a20
a5ce1f2
bbf9f81
2e63f0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -913,8 +913,8 @@ def _get_options_with_defaults(self, engine): | |
pass | ||
else: | ||
raise ValueError( | ||
"The %r option is not supported with the" | ||
" %r engine" % (argname, engine) | ||
f"The {repr(argname)} option is not supported with the" | ||
f" {repr(engine)} engine" | ||
) | ||
else: | ||
value = _deprecated_defaults.get(argname, default) | ||
|
@@ -3607,8 +3607,8 @@ def __init__(self, f, colspecs, delimiter, comment, skiprows=None, infer_nrows=1 | |
|
||
if not isinstance(self.colspecs, (tuple, list)): | ||
raise TypeError( | ||
"column specifications must be a list or tuple, " | ||
"input was a %r" % type(colspecs).__name__ | ||
f"column specifications must be a list or tuple, " | ||
f"input was a {repr(type(colspecs).__name__)}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't need any of the repr except for this one as they are all repr'ing strings. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I change the other strings to something like this? f"input was a {(type(colspecs).name)}" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yesp (but you can leave anything that is not a string with |
||
) | ||
|
||
for colspec in self.colspecs: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
f
prefix is only needed if actually substitutingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. I'll change it tonight!