typet
typet copied to clipboard
Types that make coding in Python quick and safe.
```python from typet import Object class Base(Object): x: int = 5 class Sub(Base): pass Sub().x ```
When using @singleton on a class that does not inherit from Object (no other metaclasses defined) throws an exception. ``` Traceback (most recent call last): File "", line 1, in...
When using a default value, the type should be inferred from that value instead of requiring it to be specified.
If I make a proper typet Object, I can still assign to its attributes at run time, subsequent comparison or hash operations on the resulting instance will now return unexpected...
Currently, using Generics with Object is a pain. Initial support for casting and type validation exist, but creating the class itself is awkward as it requires creating a metaclass. ```python...
Perhaps we could say "checking"?
`mypy` reports validation objects as invalid type aliases. Additionally, if a validation type is used as a class annotation without being aliased, `mypy` ends analysis with an invalid syntax error....
`typet` needs to supply a rich collection of types by default. This issue will track ideas for the initial types.