add static type checker to dev environment #194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is your pull request related to a problem? Please describe.
Currently there is a good chance to make mistakes when contributing new code, for example the invalid arguments in #191, which could have easily been caught before making its way into the production build using static analysis
Why should this feature be added?
This feature will work directly to reduce the amount of bugs in the code and drastically help with refactoring code. Here are some example issues that it detected when I was testing the scripts:
endpoints\OAI\utils\embeddings.py:64: error: Incompatible return value type (got "EmbeddingsResponse", expected "dict[Any, Any]") [return-value]
endpoints\Kobold\router.py:126: error: Incompatible return value type (got "dict[str, Any]", expected "MaxLengthResponse") [return-value]
Examples
see #191
Additional context
moving the config to pydantic as in #189 would expand the functionality in this to prevent issues like #104