[code-quality] assigning node type with function annotations?
Claudiu Popa
pcmanticore at gmail.com
Tue Apr 28 08:55:10 CEST 2015
On Tue, Apr 28, 2015 at 9:03 AM, Jarrad Hope <me at jarradhope.com> wrote:
> Hello
>
> Been using astroid extensively this past week, really enjoying it! Great work!
Thank you.
>
> What's the best way I can deliberately set the type of an argument,
> based on the function annotations?
Currently we don't have any mechanism for this (but it is something
that we want). One way to do it would be to add a Transform in
astroid.brain for Function nodes, which checks that it has
annotations, infers them and replaces the default inference with that
one.
More information about the code-quality
mailing list