From 59ed35c45d87c247c9e067e5ec1cbe734f6b8596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Mon, 10 Jul 2023 21:31:44 -0600 Subject: [PATCH] Fix mypy checks --- poetry.lock | 16 +--------------- pyproject.toml | 3 --- singer_sdk/sinks/sql.py | 3 +-- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6c2590e469..4afc5926ac 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2350,20 +2350,6 @@ postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"] pymysql = ["pymysql"] sqlcipher = ["sqlcipher3-binary"] -[[package]] -name = "sqlalchemy2-stubs" -version = "0.0.2a34" -description = "Typing Stubs for SQLAlchemy 1.4" -optional = false -python-versions = ">=3.6" -files = [ - {file = "sqlalchemy2-stubs-0.0.2a34.tar.gz", hash = "sha256:2432137ab2fde1a608df4544f6712427b0b7ff25990cfbbc5a9d1db6c8c6f489"}, - {file = "sqlalchemy2_stubs-0.0.2a34-py3-none-any.whl", hash = "sha256:a313220ac793404349899faf1272e821a62dbe1d3a029bd444faa8d3e966cd07"}, -] - -[package.dependencies] -typing-extensions = ">=3.7.4" - [[package]] name = "termcolor" version = "2.3.0" @@ -2733,4 +2719,4 @@ testing = ["pytest", "pytest-durations"] [metadata] lock-version = "2.0" python-versions = "<3.12,>=3.7.1" -content-hash = "ad437e482680a84a9f6b25bf17fdd27d51ab6ec88c2e5ad766f2169a9316937b" +content-hash = "06f8ff872a5b195bb9fa6e51fba65dea50addcdd4652dede82764ff6c0363542" diff --git a/pyproject.toml b/pyproject.toml index 127ca66e3f..3a67ef7735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -186,9 +186,6 @@ fail_under = 82 [tool.mypy] exclude = "tests" files = "singer_sdk" -plugins = [ - "sqlalchemy.ext.mypy.plugin", -] python_version = "3.8" warn_unused_configs = true warn_unused_ignores = true diff --git a/singer_sdk/sinks/sql.py b/singer_sdk/sinks/sql.py index 3a91446a2b..02fd307b99 100644 --- a/singer_sdk/sinks/sql.py +++ b/singer_sdk/sinks/sql.py @@ -7,7 +7,6 @@ from collections import defaultdict from copy import copy from textwrap import dedent -from typing import Any, Iterable import sqlalchemy from pendulum import now @@ -299,7 +298,7 @@ def bulk_insert_records( self, full_table_name: str, schema: dict, - records: Iterable[dict[str, Any]], + records: t.Iterable[dict[str, t.Any]], ) -> int | None: """Bulk insert records to an existing destination table.