Skip to content

keller00/flake8-init-return

Repository files navigation

PyPi pre-commit.ci status Build and Test codecov

flake8-init-return

flake8 plugin which forbids not having a return type on a class' __init__ function

installation

pip install flake8-init-return

flake8 codes

Code Description
FIR100 missing return value for initializer

rationale

As PEP-484 says, a class' __init__ functions ought to be annotated with -> None. This plugin makes sure that they are annotated, but it leaves up the type checking for another tool.

This might be useful when a type checker is not yet integrated into a project's development flow.

as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pycqa/flake8
    rev: 3.8.1
    hooks:
    -   id: flake8
        additional_dependencies: [flake8-init-return==1.0.1]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages