Skip to content

CLN: use f-strings in core.categorical.py #29748

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 2 commits into from
Nov 21, 2019

Conversation

topper-123
Copy link
Contributor

also rename an inner function from f to func, which is clearer.

@topper-123 topper-123 changed the title CLN: Convert core.categorical to use f-strings CLN: Convert core.categorical.py to use f-strings Nov 20, 2019
@topper-123 topper-123 changed the title CLN: Convert core.categorical.py to use f-strings CLN: use f-strings in core.categorical.py Nov 20, 2019
raise TypeError(
f"Cannot compare a Categorical for op {opname} with "
f"type {type(other)}.\nIf you want to compare values, "
f"use 'np.asarray(cat) <op> other'."
Copy link
Member

@jschendel jschendel Nov 20, 2019

Choose a reason for hiding this comment

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

the last line doesn't need the f prefix

@jschendel jschendel added this to the 1.0 milestone Nov 20, 2019
@jreback jreback merged commit a46806c into pandas-dev:master Nov 21, 2019
@jreback
Copy link
Contributor

jreback commented Nov 21, 2019

thanks @topper-123

@jreback jreback added the Code Style Code style, linting, code_checks label Nov 21, 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
Clean Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants