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

Fix CI: Pin Black version for linting #150

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

notatallshaw
Copy link
Contributor

@notatallshaw notatallshaw commented Feb 3, 2024

Black 24.1.0 has updated the formatting style and it changes several things in the resolvelib codebase: https://github.com/psf/black/releases/tag/24.1.0

In providers.py it changes:

    class Preference(Protocol):
        def __lt__(self, __other: Any) -> bool:
            ...

To:

    class Preference(Protocol):
        def __lt__(self, __other: Any) -> bool: ...

Which fails the flake8 rule "E704 multiple statements on one line (def)". I am therefore pinning the black version so it does not impact other PRs, and does not fight with flake8. Also in general it makes sense to pin your formatting tool so these breakages don't happen.

I'd also be happy to do a follow up PR that moves the linting and formatting config to ruff if the resolvelib maintainers view this as a good idea.

@notatallshaw notatallshaw changed the title Pin Black version for linting Fix CI: Pin Black version for linting Feb 3, 2024
@frostming frostming merged commit a062162 into sarugaku:main Feb 5, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants