Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review type hints for Input/Output objects #317

Open
Kamforka opened this issue Jan 18, 2024 · 0 comments · Fixed by #318
Open

Review type hints for Input/Output objects #317

Kamforka opened this issue Jan 18, 2024 · 0 comments · Fixed by #318

Comments

@Kamforka
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant