Skip to content

Applying UP015 to aiofiles #12879

@jamesbraza

Description

@jamesbraza

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

Metadata

Metadata

Assignees

Labels

ruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions