nvdlib
nvdlib copied to clipboard
Add type hinting to function definitions
Type hinting has been added to function and method definitions, as discussed in #32. This has been added based on how the variables are used in the code, so please let me know if the defined types don't match the intended behaviour and I'll be happy to update the PR.
Modifications of existing type hinting:
-
Tuple
's changed toUnion
's, as raised by ammerzon in #32.
Behavioural changes, believed to be bugfixes:
- Occurrences of
if variable:
changed toif variable is not None:
, to avoid unintended falsy comparisons of NoneType values (many instances). - Request parameters set to passed values, rather than
None
. - Updating error messages to match code behavioural requirements.
This is a terrific project and I'm glad to be able to contribute to it! All going well, I should have some more PR's coming through following this one.