Subject: [bug#42465] [PATCH 10/10] gnu: Add python-mypy.

From: Marius Bakke <[email-masked]>
Date: Sat, 25 Jul 2020 18:18:21 +0200

Tanguy Le Carrour <[email-masked]> writes:

> * gnu/packages/python-check.scm (python-mypy): New variable.

Neat!  I only recently learned about MyPy, good to have it in Guix.

> +(define-public python-mypy
> +  (package
> +    (name "python-mypy")
> +    (version "0.782")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "mypy" version))
> +        (sha256
> +         (base32
> +          "030kn709515452n6gy2i1d9fg6fyrkmdz228lfpmbslybsld9xzg"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (invoke "./runtests.py")
> +             #t)))))
> +    (native-inputs
> +     `(("python-attrs" ,python-attrs)
> +       ("python-flake8" ,python-flake8)
> +       ("python-flake8-bugbear" ,python-flake8-bugbear)
> +       ("python-flake8-pyi" ,python-flake8-pyi)
> +       ("python-importlib-metadata" ,python-importlib-metadata)
> +       ("python-lxml" ,python-lxml)
> +       ("python-psutil" ,python-psutil)
> +       ("python-py" ,python-py)
> +       ("python-pytest" ,python-pytest)
> +       ("python-pytest-cov" ,python-pytest-cov)
> +       ("python-pytest-forked" ,python-pytest-forked)
> +       ("python-pytest-xdist" ,python-pytest-xdist)
> +       ("python-setuptools" ,python-setuptools)
> +       ("python-virtualenv" ,python-virtualenv)))
> +    (propagated-inputs
> +     `(("python-mypy-extensions" ,python-mypy-extensions)
> +       ("python-typing-extensions" ,python-typing-extensions)
> +       ("python-typed-ast" ,python-typed-ast)))
> +    (home-page "http://www.mypy-lang.org/")
> +    (synopsis "Optional static type checker for Python")

Perhaps s/Optional//?  I mean, if it was mandatory, wouldn't it be part
of cpython?  :-P  Probably I'm missing something, I see upstream uses
optional too.

Anyway, LGTM, nice work!