nvdlib icon indicating copy to clipboard operation
nvdlib copied to clipboard

Add type hinting to function definitions

Open LachJones opened this issue 5 months ago • 0 comments

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 to Union's, as raised by ammerzon in #32.

Behavioural changes, believed to be bugfixes:

  • Occurrences of if variable: changed to if 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.

LachJones avatar Sep 23 '24 03:09 LachJones