Skip to content

Python formatter and format correctness checker disagree and cause issues only caught on CI. #143243

@chinmaygarde

Description

@chinmaygarde

For Python files in the engine, we seem to be using YAPF for formatting and Pylint for checking if the Python file is "correctly" formatted.

But the two tools don't seem to agree on what the correct formatting is. So even if you perform a ./ci/format.sh --fix and submit the patch, it is possible that your file is still incorrectly formatted per Pylint.

In my case, the line was apparently too long (101 chars instead of <=100).

Perhaps the linter should check formatting using YAPF since that is used to fix formatting too?

Not a super high priority but an annoyance I want to document. To be clear, I don't care how we format the files. Just want consistency so I can tell my editor to format on save.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: tech-debtTechnical debt, code quality, testing, etc.team-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions