Skip to content
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

CLN: Update .format(...) strings to f-expressions #29571

Merged
merged 3 commits into from
Nov 15, 2019
Merged

CLN: Update .format(...) strings to f-expressions #29571

merged 3 commits into from
Nov 15, 2019

Conversation

srinivasreddy
Copy link
Contributor

@srinivasreddy srinivasreddy commented Nov 12, 2019

@alimcmaster1
Copy link
Member

Thanks - please link the issue #29547

@alimcmaster1
Copy link
Member

CI failures related to black

All done! 💥 💔 💥
2 files would be reformatted, 865 files would be left unchanged.
Checking black formatting DONE

Please run black pandas

@alimcmaster1 alimcmaster1 self-requested a review November 13, 2019 21:38
@datapythonista datapythonista changed the title Update .format(...) strings to f-expressions CLN: Update .format(...) strings to f-expressions Nov 14, 2019
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @srinivasreddy. Please run black asv_bench/benchmarks/gil.py and push the changes, so the CI is green and we can merge.

Also, avoid unrelated changes if they are not coming from black.

"foo",
index=range(rows),
columns=["object%03d".format(i) for i in range(5)],
"foo", index=range(rows), columns=[f"object%03d" for i in range(5)],
Copy link
Member

Choose a reason for hiding this comment

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

i was ignored, no need for an f-string here I think

@@ -1159,7 +1159,7 @@ def compute(self, method):
n = min(n, narr)

kth_val = algos.kth_smallest(arr.copy(), n - 1)
ns, = np.nonzero(arr <= kth_val)
(ns,) = np.nonzero(arr <= kth_val)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is from black. Can you use the version in environment.yml (conda install black<=19.3b0), so no unrelated changes are applied.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for working on this @srinivasreddy

@jreback jreback added this to the 1.0 milestone Nov 15, 2019
@jreback jreback added Code Style Code style, linting, code_checks and removed Clean labels Nov 15, 2019
@jreback jreback merged commit 207ab74 into pandas-dev:master Nov 15, 2019
@jreback
Copy link
Contributor

jreback commented Nov 15, 2019

thanks @srinivasreddy

@srinivasreddy srinivasreddy deleted the asv_bench_fstrings branch November 15, 2019 15:31
@ShaharNaveh ShaharNaveh mentioned this pull request Nov 16, 2019
5 tasks
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants