summary refs log tree commit diff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm48
1 files changed, 30 insertions, 18 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 87e15b4560..0ccae07093 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1834,24 +1834,14 @@ supported by the MyPy typechecker.")
 (define-public python-mypy
   (package
     (name "python-mypy")
-    (version "0.971")
+    (version "1.4.1")
     (source
      (origin
-       ;; Because of https://github.com/python/mypy/issues/9584, the
-       ;; mypyc/analysis directory is missing in the PyPI archive, leading to
-       ;; test failures.
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/python/mypy")
-             (commit (string-append "v" version))
-             ;; Fetch git submodules otherwise typeshed is not fetched.
-             ;; Typeshed is a collection of Python sources type annotation
-             ;; (data) files.
-             (recursive? #t)))
-       (file-name (git-file-name name version))
+       (method url-fetch)
+       (uri (pypi-uri "mypy" version))
        (sha256
         (base32
-         "0i8swdynms1wpiprgqn24za6mx8rlgxr2jash3cb5xi8jyf58n97"))))
+         "06svfmqbnb45pydy8lcrr12wqhhla5dl888w0g4f3wm1ismxkg4v"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1859,10 +1849,7 @@ supported by the MyPy typechecker.")
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "pytest" "-vv" "mypyc"
-                       ;; XXX: This test gets an unexpected DeprecationWarning
-                       ;; from recent versions of setuptools.  Ignore for now.
-                       "-k" "not testImports")))))))
+               (invoke "pytest" "mypyc")))))))
     (native-inputs
      (list python-attrs
            python-lxml
@@ -2036,6 +2023,31 @@ valid Python syntax that are likely to be commented out code.")
 behavior-driven development (TDD and BDD).")
     (license license:expat)))
 
+(define-public python-slotscheck
+  (package
+    (name "python-slotscheck")
+    (version "0.17.0")
+    (home-page "https://github.com/ariebovenberg/slotscheck")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0k5jjabd219ndlssfqcdb5sn891ffrxzw84l5r8pirzy74i7znr4"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     (list python-poetry-core
+           python-pydantic
+           python-pytest
+           python-pytest-mock))
+    (propagated-inputs (list python-click python-tomli))
+    (synopsis "Ensure @code{__slots__} are working properly")
+    (description
+     "@code{slotscheck} is a tool to validate Python class @code{__slots__}.")
+    (license license:expat)))
+
 (define-public python-stestr
   (package
     (name "python-stestr")