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

STY: Pylint f-string Errors C0209 #26278

Open
HenryAsa opened this issue Apr 15, 2024 · 3 comments · May be fixed by #26279
Open

STY: Pylint f-string Errors C0209 #26278

HenryAsa opened this issue Apr 15, 2024 · 3 comments · May be fixed by #26279

Comments

@HenryAsa
Copy link

Describe the issue:

There are a number of areas throughout the numpy module that have Pylint linting issues, specifically in regards to using f-strings as opposed to the .format() method. I noticed that Pylint C0209 was particularly prevalent throughout the numpy repository, so I updated these linting errors.

See Pylint C0209 for more details.

Reproduce the code example:

import numpy as np

Error message:

Formatting a regular string which could be an f-string: Pylint C0209: consider-using-f-string

Python and NumPy Versions:

Python version >= 3.6

Runtime Environment:

No response

Context for the issue:

No response

@rkern
Copy link
Member

rkern commented Apr 15, 2024

We don't use pylint for our linting, nor have we adopted the policy of only using f-strings in all places where it is possible. Changing those usages to f-strings may or may not be desirable (weighed against the churn), but it's definitely not a bug.

@rkern rkern changed the title BUG: Pylint f-string Errors C0209 STY: Pylint f-string Errors C0209 Apr 15, 2024
@HenryAsa
Copy link
Author

Got it, that makes sense. Yes, I realize that I should have marked this as an Enhancement, not a Bug.

@rgommers
Copy link
Member

It's also not an enhancement, since that means an improvement visible to users. I marked it as maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants