Hello, I have the following descriptor:
self._pi = None @property def pi(self) -> list: self._pi = self._root.xpath('processing-instruction()') return self._pi Mypy says: "Incompatible return value type (got "None", expected "List[Any]")" The xpath expression always returns a list, if it doesn't find anything it is an empty list. I am just getting started with type hinting, would appreciate any help. Best regards, -- https://mail.python.org/mailman/listinfo/python-list