[Python 3.8] Invalid syntax for Python 3.8
PaulWassermann opened this issue · comments
Description of the bug
In deepeval\test_run\cache.py, there is an invalid type hint for Python 3.8, see : https://github.com/confident-ai/deepeval/blob/main/deepeval/test_run/cache.py#L65
Indeed, generic type hints in standard collections is a feature available starting from Python 3.9, which makes the package unsuitable for Python 3.8 projects.
How to fix the bug
Replace Optional[dict[str, CachedTestCase]]
with Optional[Dict[str, CachedTestCase]]
Just saw that the package does not officially support Python 3.8, although apart from the bug I described, it seems to work fine on Python 3.8.
@PaulWassermann Thanks! Just cut a new release for this. Come join our discord btw: https://discord.com/invite/a3K9c8GRGt for any other suggestions!