TheHive4py icon indicating copy to clipboard operation
TheHive4py copied to clipboard

Review type hints for Input/Output objects

Open Kamforka opened this issue 1 year ago • 0 comments

Go through the types/ module to review and update outdated/incorrect type hints for the input output modules.

Use the latest API docs https://docs.strangebee.com/thehive/api-docs/ as reference.

As a future proof solution probably writing a linter is the best idea, which automatically picks up TypedDicts from the types module and cross reference them with the API docs. The linter should have two ways of working:

  • --check: only check for discrepancies and error out with the findings if any (good for the github CI)
  • --fix: checks and also fixes incorrect/outdated TypedDict based on the API docs.

The linter should always start from the types module and only look up existing definitions, so the declaration would remain manual, but the maintenance became automated.

Kamforka avatar Jan 18 '24 15:01 Kamforka