diff mbox series

[bug#42465,v2,09/10] gnu: Add python-flake8-pyi.

Message ID 20200722120940.13811-9-tanguy@bioneland.org
State Accepted
Headers show
Series [bug#42465,v2,01/10] gnu: python-typing-extension: Update to 3.7.4.2. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Tanguy LE CARROUR July 22, 2020, 12:09 p.m. UTC
* gnu/packages/python-xyz.scm (python-flake8-pyi): New variable.
---
 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6be4c29976..6deab39b0e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7980,6 +7980,35 @@  plugins that intend to support Flake8 2.x and 3.x simultaneously.")
 (define-public python2-flake8-polyfill
   (package-with-python2 python-flake8-polyfill))
 
+(define-public python-flake8-pyi
+  (package
+    (name "python-flake8-pyi")
+    (version "20.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-pyi" version))
+       (sha256
+        (base32
+         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-attrs" ,python-attrs)
+       ("python-flake8" ,python-flake8)
+       ("python-pyflakes" ,python-pyflakes)))
+    (home-page "https://github.com/ambv/flake8-pyi")
+    (synopsis
+      "A plugin for Flake8 that provides specializations for type hinting stub files.")
+    (description
+     "A plugin for Flake8 that provides specializations for type hinting stub files,
+especially interesting for linting typeshed.  1) Adds the .pyi extension to
+the default value of the --filename command-line argument to Flake8.  This means
+stubs are linted by default with this plugin enabled, without needing to explicitly list
+every file.  2) Modifies PyFlakes runs for .pyi files to defer checking type annotation
+expressions after the entire file has been read.  This enables support for first-class
+forward references that stub files use.")
+    (license license:expat)))
+
 (define-public python-mistune
   (package
     (name "python-mistune")