Skip to content

herczy/piano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

piano

Python static typing with annotations

Usage

Piano can be enabled the following way:

import piano
piano.install()

All modules loaded after this will have type checking automatically enabled.

Piano requires for checks that you define your functions with annotations. The annotation should be a type or check function:

def my_function(arg0 : int, arg1 : str) -> str:
    ...

When module containing such functions is loaded, all functions and class members will be checked.

''WARNING'': piano is slow. The recommended usage is to only use piano for tests.

About

Python static typing with annotations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages