RedHatProductSecurity / cvss

CVSS2/3/4 library with interactive calculator for Python 2 and Python 3
GNU Lesser General Public License v3.0
81 stars 29 forks source link

mypy type hints #57

Open dacevedo12 opened 3 months ago

dacevedo12 commented 3 months ago

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/

jobselko commented 3 months ago

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.

skontar commented 4 weeks ago

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