Skip to content

CLN Replace old string formatting syntax with f-strings #29547: 2 files w… #34370

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

Merged
merged 3 commits into from
May 26, 2020

Conversation

OlivierLuG
Copy link
Contributor

Hello, i'm new to github / opensource. Let me know if I'm doing things correctly

pandas/_libs/tslibs/timedeltas.pyx
pandas/_libs/tslibs/timestamps.pyx

Replace old string formatting syntax with f-strings #29547

  • [ x ] passes black pandas
  • [ ] passes git diff upstream/master -u -- "*.py" | flake8 --diff

@@ -584,7 +584,7 @@ cdef inline int64_t parse_iso_format_string(str ts) except? -1:
bint have_dot = 0, have_value = 0, neg = 0
list number = [], unit = []

err_msg = "Invalid ISO 8601 Duration format - {}".format(ts)
err_msg = "Invalid ISO 8601 Duration format - {ts}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How dumb I am ! I will propose a new (valid) PR tomorow.
Thank for the reply

@@ -194,7 +194,7 @@ def integer_op_not_supported(obj):
"Addition/subtraction of integers and integer-arrays with {cls} is "
"no longer supported. Instead of adding/subtracting `n`, "
"use `n * obj.freq`"
).format(cls=cls)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well

@OlivierLuG OlivierLuG changed the title Replace old string formatting syntax with f-strings #29547: 2 files w… CLN Replace old string formatting syntax with f-strings #29547: 2 files w… May 26, 2020
@OlivierLuG
Copy link
Contributor Author

Hello, I’ve fixed the 2 issues. All test were passed successfully.

@jreback jreback added the Clean label May 26, 2020
@jreback jreback added this to the 1.1 milestone May 26, 2020
@jreback jreback merged commit 75c0e24 into pandas-dev:master May 26, 2020
@jreback
Copy link
Contributor

jreback commented May 26, 2020

thanks @OlivierLuG

@OlivierLuG OlivierLuG deleted the test/format branch May 28, 2020 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants