]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: bump mypy
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 24 Jul 2024 09:10:10 +0000 (11:10 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 24 Jul 2024 09:10:10 +0000 (11:10 +0200)
psycopg/setup.cfg
tests/constraints.txt
tests/test_cursor_server.py
tests/test_cursor_server_async.py
tests/types/test_enum.py

index 6ac1b3fa39031af4f761aa48e81e1a9252f19581..9de886908103f2dae51b2ec7fce9006613ae9bdf 100644 (file)
@@ -67,7 +67,7 @@ pool =
     psycopg-pool
 test =
     anyio >= 4.0
-    mypy >= 1.6
+    mypy >= 1.11
     pproxy >= 2.7
     pytest >= 6.2.5
     pytest-cov >= 3.0
@@ -78,7 +78,7 @@ dev =
     codespell >= 2.2
     dnspython >= 2.1
     flake8 >= 4.0
-    mypy >= 1.6
+    mypy >= 1.11
     types-setuptools >= 57.4
     wheel >= 0.37
 docs =
index 22fe8337d336306b8e22dea3d16b3538cd6f6128..1ff490ef2abbb222ff2a5f31fa40afb9db0690ce 100644 (file)
@@ -10,7 +10,7 @@ importlib-metadata == 1.4
 
 # From the 'test' extra
 anyio == 4.0
-mypy == 1.6.0
+mypy == 1.11.0
 pproxy == 2.7.0
 pytest == 6.2.5
 pytest-cov == 3.0.0
index bf990a0302d2119df557fe0b933af52d9866bfe2..30a6a5e3557eae121b18db3ceee2411e2dad3ca5 100644 (file)
@@ -37,7 +37,7 @@ def test_init_row_factory(conn):
 
     with psycopg.ServerCursor(conn, "baz", row_factory=rows.namedtuple_row) as cur:
         assert cur.name == "baz"
-        assert cur.row_factory is rows.namedtuple_row  # type: ignore
+        assert cur.row_factory is rows.namedtuple_row
 
 
 def test_init_params(conn):
index 348dc2f66f08066a1111dfd50211124a6d366dd3..92b669405d0befc21a6d1f90e261e5dbc2f9876a 100644 (file)
@@ -38,7 +38,7 @@ async def test_init_row_factory(aconn):
         aconn, "baz", row_factory=rows.namedtuple_row
     ) as cur:
         assert cur.name == "baz"
-        assert cur.row_factory is rows.namedtuple_row  # type: ignore
+        assert cur.row_factory is rows.namedtuple_row
 
 
 async def test_init_params(aconn):
index e40c610257d3c99b78be2288576b78b4a35238b3..482b5879b02cf703403e5fe410fe385a7b787647 100644 (file)
@@ -306,7 +306,8 @@ def test_remap(conn, fmt_in, fmt_out, mapping):
 
 
 def test_remap_rename(conn):
-    enum = Enum("RenamedEnum", "FOO BAR QUX")
+    RenamedEnum = Enum("RenamedEnum", "FOO BAR QUX")
+    enum = RenamedEnum
     info = EnumInfo.fetch(conn, "puretestenum")
     register_enum(info, conn, enum, mapping={enum.QUX: "BAZ"})
 
@@ -318,7 +319,8 @@ def test_remap_rename(conn):
 
 
 def test_remap_more_python(conn):
-    enum = Enum("LargerEnum", "FOO BAR BAZ QUX QUUX QUUUX")
+    LargerEnum = Enum("LargerEnum", "FOO BAR BAZ QUX QUUX QUUUX")
+    enum = LargerEnum
     info = EnumInfo.fetch(conn, "puretestenum")
     mapping = {enum[m]: "BAZ" for m in ["QUX", "QUUX", "QUUUX"]}
     register_enum(info, conn, enum, mapping=mapping)
@@ -333,7 +335,8 @@ def test_remap_more_python(conn):
 
 
 def test_remap_more_postgres(conn):
-    enum = Enum("SmallerEnum", "FOO")
+    SmallerEnum = Enum("SmallerEnum", "FOO")
+    enum = SmallerEnum
     info = EnumInfo.fetch(conn, "puretestenum")
     mapping = [(enum.FOO, "BAR"), (enum.FOO, "BAZ")]
     register_enum(info, conn, enum, mapping=mapping)