[Python] How to prevent ruff from formatting arguments of a function into separate lines?

Discussão em 'Python' iniciado por Stack, Abril 6, 2025.

  1. Stack

    Stack Membro Participativo

    I have a function like so:

    def get_foo(a: object, b: tuple, c: int,) -> dict:
    .....


    When I do $ ruff format myfile.py, my function is changed to

    def get_foo(
    a: object,
    b: tuple,
    c: int,
    ) -> dict:
    ....


    How do I stop this behaviour?

    Continue reading...

Compartilhe esta Página