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

chore(deps): update dev #742

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions databases/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TODO: merge with other dev requirements
coverage==7.2.2
coverage==7.2.5
syrupy==3.0.6
dirty-equals==0.5.0
dirty-equals==0.6.0
distro

-r ../pipelines/requirements/deps/pyright.txt
Expand Down
20 changes: 16 additions & 4 deletions databases/tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,30 @@ async def test_update_with_create_disconnect(
assert updated.posts is not None
assert len(updated.posts) == 1

post_id = updated.posts[0].id

if method == 'disconnect':
# pyright: reportOptionalSubscript=false
updated = await client.user.update(
where={'id': user_id},
data={'posts': {'disconnect': [{'id': updated.posts[0].id}]}},
data={
'posts': {
'disconnect': [
{'id': post_id},
]
}
},
include={'posts': True},
)
else:
# pyright: reportOptionalSubscript=false
updated = await client.user.update(
where={'id': user_id},
data={'posts': {'delete': [{'id': updated.posts[0].id}]}},
data={
'posts': {
'delete': [
{'id': post_id},
],
}
},
include={'posts': True},
)

Expand Down
2 changes: 1 addition & 1 deletion pipelines/requirements/coverage.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
coverage==7.2.2
coverage==7.2.5
2 changes: 1 addition & 1 deletion pipelines/requirements/deps/pyright.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyright==1.1.302
pyright==1.1.306
2 changes: 1 addition & 1 deletion pipelines/requirements/deps/pytest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pytest==7.2.2
pytest==7.3.1
2 changes: 1 addition & 1 deletion pipelines/requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ wheel==0.40.0
blue==0.9.1
pre-commit==2.21.0
twine==4.0.2
typer==0.7.0
typer==0.9.0
rtoml==0.9.0
GitPython
distro
4 changes: 2 additions & 2 deletions pipelines/requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs==1.4.2
mkdocs-material==9.1.5
mkdocs==1.4.3
mkdocs-material==9.1.9
2 changes: 1 addition & 1 deletion pipelines/requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-r deps/pytest-asyncio.txt
-r deps/pytest.txt
pytest-sugar
mock==5.0.1
mock==5.0.2
pytest-mock==3.10.0
pytest-subprocess==1.5.0
syrupy==3.0.6
3 changes: 1 addition & 2 deletions tests/test_generation/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ def test_field_map(testdir: Testdir) -> None:
# NOTE: this just tests that map can be used with Prisma Client Python
# prisma handles mapping for us
def tests() -> None: # mark: filedef
# pyright: reportUnusedFunction = false, reportGeneralTypeIssues = false
from prisma.models import User

def test_field_map() -> None:
def test_field_map() -> None: # pyright: ignore[reportUnusedFunction]
"""Correct model field name access"""
user = User(id='1', my_field='bar', foo_field='baz') # type: ignore[call-arg]
assert user.id == '1'
Expand Down
23 changes: 11 additions & 12 deletions tests/test_generation/test_partial_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,17 @@ def tests() -> None: # mark: filedef
from pydantic import BaseModel
from prisma import Base64
from prisma.partials import ( # type: ignore[attr-defined]
# pyright: reportGeneralTypeIssues = false
PostWithoutDesc,
PostOptionalPublished,
PostRequiredDesc,
PostOnlyId,
PostNoRelations,
PostOptionalInclude,
PostRequiredAuthor,
PostModifiedAuthor,
UserModifiedPosts,
UserBytesList,
PostNoRelationsAndExclude,
PostWithoutDesc, # pyright: ignore
PostOptionalPublished, # pyright: ignore
PostRequiredDesc, # pyright: ignore
PostOnlyId, # pyright: ignore
PostNoRelations, # pyright: ignore
PostOptionalInclude, # pyright: ignore
PostRequiredAuthor, # pyright: ignore
PostModifiedAuthor, # pyright: ignore
UserModifiedPosts, # pyright: ignore
UserBytesList, # pyright: ignore
PostNoRelationsAndExclude, # pyright: ignore
)

base_fields = {
Expand Down