-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Type hint overall improving #929
base: main
Are you sure you want to change the base?
Conversation
removed unnused import
for expression field it can allow to define the type like inc, only taking number for inc operation, taking any for set ? for current_time maybe taking only datetime or any affiliate things ? |
@roman-right which i can add if you think its ok (i think it would be great to take that) other than that my pull request is normally ok (i tested it with pytest)? |
beanie/odm/documents.py
Outdated
**pymongo_kwargs, | ||
) -> DocType: | ||
**pymongo_kwargs: Any, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove return type?
If you using mypy as a type checker you will facing Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it doesn't return any thing
You can using '-> None'
beanie/odm/documents.py
Outdated
@@ -1247,19 +1246,19 @@ async def delete( | |||
@classmethod | |||
def find_many_in_all( # type: ignore | |||
cls: Type[FindType], | |||
*args: Union[Mapping[str, Any], bool], | |||
*args: Union[Mapping[Any, Any], bool], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you all *args to Any?
Why it was mpping[str,any]
Hi @CAPITAINMARVEL , |
Thanks for the reply i will fix it |
weird there are many sort missing in find |
gotta fix BaseFindBitwiseOperator |
Fix correct return type for query update operation, fix type hint for sort, correct return type for document update and removed awaitable making it not able to be used in asyncio task