Skip to content

Commit

Permalink
Update the changes to resolve the linter issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
harshalizode committed Apr 29, 2024
1 parent 81d4213 commit be4be19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mongoz/core/db/documents/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Document(DocumentRow):
Representation of an Mongoz Document.
"""

async def create(self: "Document", collection: AsyncIOMotorCollection = None) -> "Document":
async def create(self: "Document", collection: AsyncIOMotorCollection = None) -> "Document": # type: ignore
"""
Inserts a document.
"""
Expand Down
4 changes: 2 additions & 2 deletions mongoz/core/db/querysets/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(
def __get__(self, instance: Any, owner: Any) -> "Manager":
return self.__class__(model_class=owner)

def using(self, database_name: str):
def using(self, database_name: str) -> "Manager":
"""
**Type** Public
Expand All @@ -87,7 +87,7 @@ class registry using the database_name that provided in \
self._collection.name
- return the self instance.
"""
database = self.model_class.meta.registry.get_database(database_name)
database = self.model_class.meta.registry.get_database(database_name) # type: ignore
self._collection = database.get_collection(
self._collection.name)._collection
return self
Expand Down
2 changes: 1 addition & 1 deletion tests/models/manager/test_using.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import mongoz
from mongoz import Document, ObjectId
from mongoz.exceptions import DocumentNotFound, MultipleDocumentsReturned
from mongoz.exceptions import DocumentNotFound

pytestmark = pytest.mark.anyio
pydantic_version = pydantic.__version__[:3]
Expand Down

0 comments on commit be4be19

Please sign in to comment.