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

add static type checker to dev environment #194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SecretiveShell
Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

1 participant