Skip to content

ruff and black disagree on .pyi format for one line def #2763

@messense

Description

@messense
class DummyClass:
    @staticmethod
    def get_42() -> int: ...

ruff gives test-crates/pyo3-pure/pyo3_pure.pyi:3:5: E704 Multiple statements on one line (def) while black formats it back to one line if you change it to

class DummyClass:
    @staticmethod
    def get_42() -> int:
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions