Skip to content

format.sh does not format correctly enough for check.sh #950

@H-Huang

Description

@H-Huang

I noticed for many of my PRs after running ./format.sh, it still does not pass the checks in ./check.sh. This causes the PR to fail in the lint check in CI. The reason is because ./format.sh does not satisfy all the requirements in ./check.sh, check.sh is using ufmt and format is using some packages like autoflake or isort that do not work completely:

PiPPy/format.sh

Lines 40 to 52 in f2e605d

# TODO: enable autoflake and isort.
# these are not currently enabeled because the existing
# import structure has magic side-effects that need to
# be cleaned up so that isort and autoflake don't break them.
# | autoflake \
# --stdin-display-name "$TARGET" \
# --remove-all-unused-imports \
# - \
# | isort \
# --filename "$TARGET" \
# - \

I wonder if we can just turn to an all in one solution like ruff (https://github.com/astral-sh/ruff) to act as both our linter, formatter, and checker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions