RedHatProductSecurity/cvss

mypy type hints

Opened this issue · 2 comments

would be nice to have type hints added to the library

mypy currently complains due to cvss: module is installed, but missing library stubs or py.typed marker

https://peps.python.org/pep-0484/

Before supporting type hints, we should also consider dropping support for Python 2.7 to ease the potential work.

Since the function annotation syntax was introduced in Python 3.5, we would have to use comments to be compatible with Python 2.7, see https://peps.python.org/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code.

@jobselko Python 2.7 support can be dropped now, as it is no longer supported, even by Red Hat (EOL June 2024).