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

run CI tests on PRs and ignore mypy errors from last PR #94

Merged
merged 2 commits into from
Sep 30, 2023
Merged

run CI tests on PRs and ignore mypy errors from last PR #94

merged 2 commits into from
Sep 30, 2023

Conversation

shouples
Copy link
Collaborator

@shouples shouples commented Sep 30, 2023

chatlab/registry.py:161: error: No overload variant of "create_model" matches argument types "str", "Type[FunctionSchemaConfig]", "Dict[str, Tuple[Any, ellipsis]]"  [call-overload]
chatlab/registry.py:161: note: Possible overload variants:
chatlab/registry.py:161: note:     def create_model(str, /, *, __config__: Optional[Type[BaseConfig]] = ..., __base__: None = ..., __module__: str = ..., __validators__: Dict[str, classmethod[Any, Any, Any]] = ..., __cls_kwargs__: Dict[str, Any] = ..., **field_definitions: Any) -> Type[BaseModel]
chatlab/registry.py:161: note:     def [Model <: BaseModel] create_model(str, /, *, __config__: Optional[Type[BaseConfig]] = ..., __base__: Union[Type[Model], Tuple[Type[Model], ...]], __module__: str = ..., __validators__: Dict[str, classmethod[Any, Any, Any]] = ..., __cls_kwargs__: Dict[str, Any] = ..., **field_definitions: Any) -> Type[Model]

chatlab/registry.py:166: error: Name "parameters" already defined on line 131  [no-redef]

Found 2 errors in 1 file (checked 23 source files)

@shouples shouples changed the title run CI tests on PRs run CI tests on PRs and ignore mypy errors from last PR Sep 30, 2023
@shouples shouples requested a review from rgbkrk September 30, 2023 15:51
@shouples shouples marked this pull request as ready for review September 30, 2023 15:52
@@ -161,9 +161,9 @@ def generate_function_schema(
model = create_model(
function.__name__,
__config__=FunctionSchemaConfig,
**fields,
**fields, # type: ignore
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

)
parameters: dict = model.schema()
parameters: dict = model.schema() # type: ignore
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this type not work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't like the redefinition of parameters

@rgbkrk rgbkrk merged commit 253a58e into rgbkrk:main Sep 30, 2023
5 checks passed
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.

2 participants