From 86a8c56275d3dbd7a3c19573c6ffd9d19b1521bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Mar 2023 20:33:04 +0000 Subject: [PATCH 1/5] chore(deps): update dev --- databases/requirements.txt | 2 +- pipelines/requirements/coverage.txt | 2 +- pipelines/requirements/deps/pyright.txt | 2 +- pipelines/requirements/deps/pytest.txt | 2 +- pipelines/requirements/docs.txt | 2 +- pipelines/requirements/lint.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/databases/requirements.txt b/databases/requirements.txt index 4b2bd12e5..c1be543ef 100644 --- a/databases/requirements.txt +++ b/databases/requirements.txt @@ -1,5 +1,5 @@ # TODO: merge with other dev requirements -coverage==7.1.0 +coverage==7.2.1 syrupy==3.0.6 dirty-equals==0.5.0 distro diff --git a/pipelines/requirements/coverage.txt b/pipelines/requirements/coverage.txt index d95259c53..e8c9f2442 100644 --- a/pipelines/requirements/coverage.txt +++ b/pipelines/requirements/coverage.txt @@ -1 +1 @@ -coverage==7.1.0 +coverage==7.2.1 diff --git a/pipelines/requirements/deps/pyright.txt b/pipelines/requirements/deps/pyright.txt index 8b297a366..689ccee6d 100644 --- a/pipelines/requirements/deps/pyright.txt +++ b/pipelines/requirements/deps/pyright.txt @@ -1 +1 @@ -pyright==1.1.291 +pyright==1.1.298 diff --git a/pipelines/requirements/deps/pytest.txt b/pipelines/requirements/deps/pytest.txt index 805eb2a9f..c021c5b5b 100644 --- a/pipelines/requirements/deps/pytest.txt +++ b/pipelines/requirements/deps/pytest.txt @@ -1 +1 @@ -pytest==7.2.1 +pytest==7.2.2 diff --git a/pipelines/requirements/docs.txt b/pipelines/requirements/docs.txt index d820969e0..06be5cde6 100644 --- a/pipelines/requirements/docs.txt +++ b/pipelines/requirements/docs.txt @@ -1,2 +1,2 @@ mkdocs==1.4.2 -mkdocs-material==9.0.9 +mkdocs-material==9.1.2 diff --git a/pipelines/requirements/lint.txt b/pipelines/requirements/lint.txt index 1adc0a856..14b37a727 100644 --- a/pipelines/requirements/lint.txt +++ b/pipelines/requirements/lint.txt @@ -6,4 +6,4 @@ -r ../../databases/requirements.txt interrogate==1.5.0 mypy==1.0.1 -slotscheck==0.16.4 +slotscheck==0.16.5 From ece83fb3415842ebc43c3d6851ce807268839028 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Sun, 12 Mar 2023 13:48:28 +0000 Subject: [PATCH 2/5] Add pyright ignore comment --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 0a590d685..e047b4860 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,7 +50,9 @@ def pytest_sessionstart(session: pytest.Session) -> None: def pytest_sessionfinish(session: pytest.Session) -> None: - if LOGGING_CONTEXT_MANAGER is not None: # pragma: no branch + if ( + LOGGING_CONTEXT_MANAGER is not None + ): # pragma: no branch # pyright: ignore[reportUnnecessaryComparison] LOGGING_CONTEXT_MANAGER.__exit__(None, None, None) From 603cab3bee1e2cecc0ec0ee4f4ef09facdd7e49d Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Sun, 12 Mar 2023 14:10:28 +0000 Subject: [PATCH 3/5] Another pyright fix --- src/prisma/cli/commands/dev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prisma/cli/commands/dev.py b/src/prisma/cli/commands/dev.py index bff91f311..7d1043eb3 100644 --- a/src/prisma/cli/commands/dev.py +++ b/src/prisma/cli/commands/dev.py @@ -16,7 +16,7 @@ def _cli() -> None: # for some reason. Fixing the errors for one type checker causes errors in an another # so just switch to Any for the time being as this is internal and only used once, directly # below this line. -cli = cast(Any, _cli) +cli: Any = cast(Any, _cli) @cli.command() # type: ignore[misc] From c0e0309a0ddd99f4ad62d2019922656f77d9e37e Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Sun, 12 Mar 2023 15:58:04 +0000 Subject: [PATCH 4/5] Fix unnecessary comparison --- src/prisma/generator/generator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/prisma/generator/generator.py b/src/prisma/generator/generator.py index 6a38e8262..f461b3dad 100644 --- a/src/prisma/generator/generator.py +++ b/src/prisma/generator/generator.py @@ -174,8 +174,7 @@ def _on_request(self, request: jsonrpc.Request) -> None: f'JSON RPC received unexpected method: {request.method}' ) - if response is not None: - jsonrpc.reply(response) + jsonrpc.reply(response) @cached_property def data_class(self) -> Type[BaseModelT]: From 5ef73ed502338f7291014c17dc3cef90372aaa60 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Sun, 12 Mar 2023 16:20:09 +0000 Subject: [PATCH 5/5] Move coverage comment --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e047b4860..90678c389 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -50,9 +50,9 @@ def pytest_sessionstart(session: pytest.Session) -> None: def pytest_sessionfinish(session: pytest.Session) -> None: - if ( + if ( # pragma: no branch LOGGING_CONTEXT_MANAGER is not None - ): # pragma: no branch # pyright: ignore[reportUnnecessaryComparison] + ): # pyright: ignore[reportUnnecessaryComparison] LOGGING_CONTEXT_MANAGER.__exit__(None, None, None)