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

Different rules for PYI files #1247

Open
Tatsh opened this issue Oct 6, 2024 · 0 comments
Open

Different rules for PYI files #1247

Tatsh opened this issue Oct 6, 2024 · 0 comments

Comments

@Tatsh
Copy link

Tatsh commented Oct 6, 2024

Ruff complains: https://docs.astral.sh/ruff/rules/too-many-blank-lines/#typing-stub-files-pyi

A fix would be akin to blank_lines_around_top_level_definition=1 in all PYI files.

Relevant doc: https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#blank-lines

There are other issues like adding a line between the attributes and methods of a class.

class X:
    x: int
    y: int
                      <-- blank line should not get added
    def __getitem__(self, key: str) -> Any:
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

No branches or pull requests

1 participant