Re:Beartype: Fast runtime type checking in Python
by topoloneuron on Monday November 22, 2021 @04:29AM
(#29304519)
Can I use this on my full codebase all at once, without inserting "from beartype import beartype" into each file and decorating every single function and method?
[ Parent
| on HN ]
Re:Beartype: Fast runtime type checking in Python
by Joker_vD on Monday November 22, 2021 @07:31AM
(#29305644)
I guess you could, near the beginning of your program's entry point, decorate the importlib's functions to decorate the top-level functions of imported modules with "@beartype" decorator.
Or there is always find+grep+sed, if you prefer a different style of madness.