From 5fbe965919badc8d0e5824a365470fec8f8797cf Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Wed, 24 Jun 2026 13:40:23 +0200 Subject: [PATCH] feat(checker): add typing submodule with cast functions --- midas/typing.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 midas/typing.py diff --git a/midas/typing.py b/midas/typing.py new file mode 100644 index 0000000..9c5b407 --- /dev/null +++ b/midas/typing.py @@ -0,0 +1,34 @@ +from typing import cast as typing_cast + +cast = typing_cast +"""### Midas documentation +Cast a value to a type. + +- **Compile-time**: tells the type checker that the return value has the designated type. +- **Run-time**: generates assertions to ensure the value can be interpreted as the given type. + +--- +
+
+
+ +_**Internal Python documentation**_ +""" + + +unsafe_cast = typing_cast +"""### Midas documentation +Cast a value to a type. + +- **Compile-time**: tells the type checker that the return value has the designated type. +- **Run-time**: - + +This operation is unsound, use at your own risk! + +--- +
+
+
+ +_**Internal Python documentation**_ +"""