[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Overriding property types on instances from a library
From:       "Joseph L. Casale" <jcasale () activenetwerx ! com>
Date:       2021-02-20 14:36:11
Message-ID: de5f33b9ff1c4b53befb331ac7193a88 () activenetwerx ! com
[Download RAW message or body]

I have some code that makes use of the typing module.
This code creates several instances of objects it creates
from a library that has some issues.

For example, I have multiple list comps that iterate properties
of those instance and the type checker fails with:

    Expected type 'collections.Iterable', got '() -> Any' instead

How can I override the type with a hint on a property of
those instances?

Thanks,
jlc
-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic