Skip to content
/ classist Public

Pretty classist signature inheritance with decorators.

License

Notifications You must be signed in to change notification settings

sirno/classist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classist

Pretty classist signature inheritance with decorators.

Features

This is just a basic proof of concept. Currently, only very basic runtime signature inheritance is implemented. It may be possible to generate stubs to support static type checking.

Usage

import classist
import inspect

class A:
    def __init__(self, a: int):
        self.a = a

@classist.decorate
class B:
    def __init__(self, t: int, *args):
        self.b = b
        super().__init__(*args)

print(inspect.signature(B.__init__))

Installation

pip install classist

About

Pretty classist signature inheritance with decorators.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages