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

F601 Dictionary key literal repeated check of ruff is not case sensitive, but python dicts are case sensitive #16323

Open
timothytrust opened this issue Feb 22, 2025 · 5 comments
Labels
needs-mre Needs more information for reproduction

Comments

@timothytrust
Copy link

Description

I have a dict as follows:

'Mio': 'million',
'MIO': 'million',
'Mrd': 'billion',
'MRD': 'billion',

Ruff marks a F601, which is - from what I know - wrong: python dict keys are case sensitive.

@VascoSch92
Copy link
Contributor

Which Ruff version are you using?

I checked with the playground (here) and it seems that Ruff doesn't mark a F601 violation.

@timothytrust
Copy link
Author

$ pip show ruff
Name: ruff
Version: 0.7.4

I just checked - you are right, I should updated. Newer versions seem to evolve quickly here!
Thanks for pointing that out.

@timothytrust
Copy link
Author

I just checked: even after updating to latest version, this error still persists. I updated to:

$ ruff version
ruff 0.9.7 (54fccb3 2025-02-20)

@dylwil3 dylwil3 added the needs-mre Needs more information for reproduction label Feb 23, 2025
@dylwil3
Copy link
Collaborator

dylwil3 commented Feb 23, 2025

Hm, unfortunately I'm still not able to reproduce this. Could you provide either a full code snippet, configuration, etc. or try to reproduce this on the playground and then click the "Share" button and copy the link here?

Here's my failed attempt at reproducing on the playground Link

@VascoSch92
Copy link
Contributor

Or could you provide the Ruff error stacktrace? Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mre Needs more information for reproduction
Projects
None yet
Development

No branches or pull requests

3 participants