Skip to content

CLN: Replace old string formatting syntax with f-strings for scripts/validate_docstrings.py #32122

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 1 commit into from
Feb 20, 2020

Conversation

raisadz
Copy link
Contributor

@raisadz raisadz commented Feb 19, 2020

@raisadz raisadz changed the title Replace old string formatting syntax with f-strings for scripts/validate_docstrings.py CLN: Replace old string formatting syntax with f-strings for scripts/validate_docstrings.py Feb 19, 2020
title_line = "{side} {title}{adj} {side}".format(
side=char * side_len, title=title, adj=adj
)
title_line = f"{char * side_len} {title}{adj} {char * side_len}"
Copy link
Member

Choose a reason for hiding this comment

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

can you do the multiplication on the previous line

Copy link
Member

Choose a reason for hiding this comment

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

I think this is OK for now (we have a pretty large queue) but if a sticking point can certainly be done as a follow up

title_line = "{side} {title}{adj} {side}".format(
side=char * side_len, title=title, adj=adj
)
title_line = f"{char * side_len} {title}{adj} {char * side_len}"
Copy link
Member

Choose a reason for hiding this comment

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

I think this is OK for now (we have a pretty large queue) but if a sticking point can certainly be done as a follow up

@WillAyd WillAyd added the Code Style Code style, linting, code_checks label Feb 20, 2020
@WillAyd WillAyd added this to the 1.1 milestone Feb 20, 2020
@WillAyd WillAyd merged commit 421f654 into pandas-dev:master Feb 20, 2020
@WillAyd
Copy link
Member

WillAyd commented Feb 20, 2020

Thanks @raisadz

roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
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.

3 participants