Date: Monday, April 10, 2023 @ 14:03:06
  Author: felixonmars
Revision: 1444418

archrelease: copy trunk to community-staging-any

Added:
  pylama/repos/community-staging-any/
  pylama/repos/community-staging-any/PKGBUILD
    (from rev 1444417, pylama/trunk/PKGBUILD)
  pylama/repos/community-staging-any/pylama-pyflakes-2.5.patch
    (from rev 1444417, pylama/trunk/pylama-pyflakes-2.5.patch)

---------------------------+
 PKGBUILD                  |   48 +++++++++++++++++++++++++++++++++++++
 pylama-pyflakes-2.5.patch |   57 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)

Copied: pylama/repos/community-staging-any/PKGBUILD (from rev 1444417, 
pylama/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-10 14:03:06 UTC (rev 1444418)
@@ -0,0 +1,48 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Pieter Goetschalckx <3.14.e.ter at gmail dot com>
+# Contributor: Stijn Seghers (Procrat) <stijnseghers at gmail dot com>
+
+pkgname=pylama
+pkgver=7.7.1
+pkgrel=9
+pkgdesc="Code audit tool for python"
+arch=('any')
+url="https://github.com/klen/pylama";
+license=('GPL3')
+depends=('python-pycodestyle' 'python-pydocstyle' 'python-pyflakes' 
'python-mccabe')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'git' 'mypy')
+optdepends=('python-radon: radon support')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/klen/pylama/archive/$pkgver.tar.gz";
+        pylama-pytest-6.patch::https://github.com/klen/pylama/pull/189.patch
+        pylama-pyflakes-2.5.patch)
+sha256sums=('acec2b80ad6a4781dc2626992b10ecac7b81be6c0145750c11688c281298f6fe'
+            '6a025bb41afe783841ecb28ab6faada4be9d7b3d152f0a58970757953d343cba'
+            'a236eb95ad4c835ae4bdc50950f8ede89bdb84c89726d38304f896ce553604fc')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i ../pylama-pytest-6.patch
+  patch -p1 -i ../pylama-pyflakes-2.5.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  local python_version=$(python -c 'import sys; print(".".join(map(str, 
sys.version_info[:2])))')
+  
PYTHONPATH="$PWD/tmp_install/usr/lib/python$python_version/site-packages:$PYTHONPATH:$PWD/tests"
 py.test --pylama pylama
+  
PYTHONPATH="$PWD/tmp_install/usr/lib/python$python_version/site-packages:$PYTHONPATH:$PWD/tests"
 py.test tests --deselect tests/test_config.py::test_ignore_select \
+                                                                               
                      --deselect tests/test_linters.py::test_eradicate
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$pkgdir/" --optimize=1
+
+  mv "$pkgdir"/usr/lib/python3.11/site-packages/{,pylama/}tests
+}

Copied: pylama/repos/community-staging-any/pylama-pyflakes-2.5.patch (from rev 
1444417, pylama/trunk/pylama-pyflakes-2.5.patch)
===================================================================
--- community-staging-any/pylama-pyflakes-2.5.patch                             
(rev 0)
+++ community-staging-any/pylama-pyflakes-2.5.patch     2023-04-10 14:03:06 UTC 
(rev 1444418)
@@ -0,0 +1,57 @@
+From c6f3175c00a7e2b30e4ff5ab0e61c39967366c81 Mon Sep 17 00:00:00 2001
+From: Tsuyoshi Hombashi <[email protected]>
+Date: Sun, 31 Jul 2022 21:44:07 +0900
+Subject: [PATCH 1/2] Remove messages that were removed at pyflakes 2.5.0
+
+---
+ pylama/lint/pylama_pyflakes.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/pylama/lint/pylama_pyflakes.py b/pylama/lint/pylama_pyflakes.py
+index 81f695a..c828fdb 100644
+--- a/pylama/lint/pylama_pyflakes.py
++++ b/pylama/lint/pylama_pyflakes.py
+@@ -9,7 +9,6 @@
+
+ checker.messages.UnusedImport.message = "W0611 %r imported but unused"
+ checker.messages.RedefinedWhileUnused.message = "W0404 redefinition of unused 
%r from line %r"
+-checker.messages.RedefinedInListComp.message = "W0621 list comprehension 
redefines %r from line %r"
+ checker.messages.ImportShadowedByLoopVar.message = "W0621 import %r from line 
%r shadowed by loop variable"
+ checker.messages.ImportStarUsed.message = "W0401 'from %s import *' used; 
unable to detect undefined names"
+ checker.messages.ImportStarUsage.message = "W0401 '%s may be undefined, or 
defined from star imports: %s'"
+@@ -20,7 +19,6 @@
+ checker.messages.DuplicateArgument.message = "E1122 duplicate argument %r in 
function definition"
+ checker.messages.LateFutureImport.message = "W0410 future import(s) %r after 
other statements"
+ checker.messages.UnusedVariable.message = "W0612 local variable %r is 
assigned to but never used"
+-checker.messages.ReturnWithArgsInsideGenerator.message = "E0106 'return' with 
argument inside generator"
+ checker.messages.ReturnOutsideFunction.message = "E0104 'return' outside 
function"
+ 
+ 
+
+From 897b3fb9f923fd6eed77e50f22ecb0b9dfb8e472 Mon Sep 17 00:00:00 2001
+From: Tsuyoshi Hombashi <[email protected]>
+Date: Sat, 6 Aug 2022 15:45:06 +0900
+Subject: [PATCH 2/2] Modify to keep backward compatibility
+
+---
+ pylama/lint/pylama_pyflakes.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/pylama/lint/pylama_pyflakes.py b/pylama/lint/pylama_pyflakes.py
+index c828fdb..8a1a606 100644
+--- a/pylama/lint/pylama_pyflakes.py
++++ b/pylama/lint/pylama_pyflakes.py
+@@ -22,6 +22,13 @@
+ 
+ checker.messages.ReturnOutsideFunction.message = "E0104 'return' outside 
function"
+ 
++# RedefinedInListComp and ReturnWithArgsInsideGenerator were removed at 
pyflakes 2.5.0:
++#   
https://github.com/PyCQA/pyflakes/commit/2246217295dc8cb30ef4a7b9d8dc449ce32e603a
++if hasattr(checker.messages, "RedefinedInListComp"):
++    CODES[checker.messages.RedefinedInListComp.message] = "W0621"
++if hasattr(checker.messages, "ReturnWithArgsInsideGenerator"):
++    CODES[checker.messages.ReturnWithArgsInsideGenerator.message] = "E0106"
++
+ 
+ class Linter(Abstract):
+     """Pyflakes runner."""

Reply via email to