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

Applying UP015 to aiofiles #12879

Closed
jamesbraza opened this issue Aug 14, 2024 · 0 comments · Fixed by #13173
Closed

Applying UP015 to aiofiles #12879

jamesbraza opened this issue Aug 14, 2024 · 0 comments · Fixed by #13173
Assignees
Labels
rule Implementing or modifying a lint rule

Comments

@jamesbraza
Copy link
Contributor

With ruff==0.5.7, UP015 applies to the built-in open function:

import aiofiles

with open("stub.txt", mode="r") as f:  # Ruff UP015 removes this mode="r"
    pass

async with aiofiles.open("stub.txt", mode="r") as f:  # Ruff doesn't yet remove this mode="r"
    pass

It would be nice to apply this same logic to aiofiles.open's mode argument

@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Aug 14, 2024
@charliermarsh charliermarsh self-assigned this Aug 30, 2024
charliermarsh added a commit that referenced this issue Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants