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

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

Closed
messense opened this issue Feb 11, 2023 · 2 comments · Fixed by #2773
Closed

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

messense opened this issue Feb 11, 2023 · 2 comments · Fixed by #2773
Labels
bug Something isn't working

Comments

@messense
Copy link
Contributor

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:
        ...
@messense messense changed the title ruff and black disagree on .pyi format ruff and black disagree on .pyi format for one line def Feb 11, 2023
@charliermarsh charliermarsh added the bug Something isn't working label Feb 11, 2023
@charliermarsh
Copy link
Member

Need to figure out how to handle this because Flake8 and pycodestyle actually do flag these as errors (they just don't enable that rule by default, AFAICT).

@charliermarsh
Copy link
Member

I'm going to either disable this rule by default or remove it entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants