]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
disable pyright from pep 484
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Feb 2022 19:02:07 +0000 (14:02 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Feb 2022 19:02:07 +0000 (14:02 -0500)
new version of pyright is suddenly emitting an
error that makes no sense for a particular line of code,
breaking builds.  As we already have mypy which is generally
more conservative in its checking, disable pyright from CI
for now until it changes its behaviors less often.

Change-Id: I862de1b2c8a180df95c74c1c6dafa96d86c36ef1

lib/sqlalchemy/util/_collections.py
tox.ini

index bbb08d91f2474dbacda2a4ae110a91d344970586..84735316d2ee7d281ce43afe41b21163da8e0d0e 100644 (file)
@@ -511,7 +511,7 @@ class LRUCache(typing.MutableMapping[_KT, _VT]):
 
     capacity: int
     threshold: float
-    size_alert: Callable[["LRUCache[_KT, _VT]"], None]
+    size_alert: Optional[Callable[["LRUCache[_KT, _VT]"], None]]
 
     def __init__(self, capacity=100, threshold=0.5, size_alert=None):
         self.capacity = capacity
diff --git a/tox.ini b/tox.ini
index c3420a00f7c3dfb30627fb9062858feb49dfd6e5..961add4b0dca7143f3912f0242858ece561ff3aa 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -133,10 +133,12 @@ deps=
      greenlet != 0.4.17
      importlib_metadata; python_version < '3.8'
      mypy
-     pyright
+     pyright
 commands =
     mypy  ./lib/sqlalchemy
-    pyright
+    # pyright changes too often with not-exactly-correct errors
+    # suddently appearing for it to be stable enough for CI
+    # pyright
 
 [testenv:mypy]
 deps=