[lxc-devel] [lxd/master] Use flake8 instead of separate pyflakes and pep8

albertodonato on Github lxc-bot at linuxcontainers.org
Wed Apr 19 10:28:44 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170419/f7f70422/attachment.bin>
-------------- next part --------------
From 84d59afad31011bc58218191f5d311a3f64c7764 Mon Sep 17 00:00:00 2001
From: Alberto Donato <alberto.donato at canonical.com>
Date: Wed, 19 Apr 2017 12:27:07 +0200
Subject: [PATCH] Use flake8 instead of separate pyflakes and pep8

---
 README.md                      | 2 +-
 test/main.sh                   | 2 +-
 test/suites/static_analysis.sh | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 test/suites/static_analysis.sh

diff --git a/README.md b/README.md
index 003f605..06f2043 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@ host boot, but are needed if you'd like to use a particular backend:
 
 To run the testsuite, you'll also need:
 
-    sudo apt-get install curl gettext jq sqlite3 uuid-runtime pyflakes pep8 shellcheck bzr
+    sudo apt-get install curl gettext jq sqlite3 uuid-runtime flake8 shellcheck bzr
 
 ### Building the tools
 
diff --git a/test/main.sh b/test/main.sh
index 63564a0..6765386 100755
--- a/test/main.sh
+++ b/test/main.sh
@@ -20,7 +20,7 @@ if [ -n "${LXD_DEBUG:-}" ]; then
 fi
 
 echo "==> Checking for dependencies"
-for dep in lxd lxc curl jq git xgettext sqlite3 msgmerge msgfmt shuf setfacl uuidgen pyflakes3 pep8 shellcheck; do
+for dep in lxd lxc curl jq git xgettext sqlite3 msgmerge msgfmt shuf setfacl uuidgen flake8 shellcheck; do
   which "${dep}" >/dev/null 2>&1 || (echo "Missing dependency: ${dep}" >&2 && exit 1)
 done
 
diff --git a/test/suites/static_analysis.sh b/test/suites/static_analysis.sh
old mode 100644
new mode 100755
index aa69b92..201427f
--- a/test/suites/static_analysis.sh
+++ b/test/suites/static_analysis.sh
@@ -10,8 +10,7 @@ test_static_analysis() {
 
     cd ../
     # Python3 static analysis
-    pep8 test/deps/import-busybox
-    pyflakes3 test/deps/import-busybox
+    flake8 test/deps/import-busybox
 
     # Shell static analysis
     shellcheck test/main.sh test/suites/* test/backends/*


More information about the lxc-devel mailing list