Skip to content

Formatter incompatibility: extra parentheses around await assignment #7420

@charliermarsh

Description

@charliermarsh

Given:

result = await self.request(
    f"/applications/{int(application_id)}/guilds/{int(scope)}/commands/{int(command_id)}/permissions"
)

Ruff formats as:

result = (
    await self.request(
        f"/applications/{int(application_id)}/guilds/{int(scope)}/commands/{int(command_id)}/permissions"
    )
)

While Black formats as:

result = await self.request(
    f"/applications/{int(application_id)}/guilds/{int(scope)}/commands/{int(command_id)}/permissions"
)

Sourced from: #7394.

Metadata

Metadata

Assignees

Labels

acceptedReady for implementationformatterRelated to the formatter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions