Skip to content

Ignore missing annotation in __init__ method by algorithms-keeper #7968

Open
@Cjkjvfnby

Description

@Cjkjvfnby

Feature description

Please provide return type hint for the function: init. If the function does not return a value, please provide the type hint as: def function() -> None:

Adding -> None have not sense, since this is a special method and it always returns None. Aslo this creates noise in code and even decreases readability when it's the reason for extra line breaks.

For example, this line fits without annotation and is split into 3 lines with it.

-    def __init__(self, initial_block_size: int = 8, capacity_factor: float = 0.75) -> None:
+    def __init__(
+        self, initial_block_size: int = 8, capacity_factor: float = 0.75
+    ) -> None:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions