From c05611adde746d11a3061e8ceb1dd957aa64c7ba Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Tue, 17 Aug 2021 08:50:30 +0000 Subject: [PATCH] Include hacking to test-requirements Hacking provides valuable standard checks such as imports in alphabetical order. Having this included in our pep8 check/job the quality and readability of the code will be improved. Change-Id: Ieedfcd340e9b700bdead0073bac39a505c8628b5 --- test-requirements.txt | 2 ++ tools/checktests.py | 2 +- tox.ini | 4 +--- working_materials/tabulate_scores.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 52d6366e..ae4d8b59 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,5 @@ jsonschema Sphinx sphinxcontrib.datatemplates refstack>=2.0.0 +hacking>=1.1.0,!=1.2.0 # Apache-2.0 +flake8!=3.0.0,!=2.6.2 # MIT diff --git a/tools/checktests.py b/tools/checktests.py index 6b148788..eeac86a3 100644 --- a/tools/checktests.py +++ b/tools/checktests.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -import ast import argparse +import ast import importlib import json import os diff --git a/tox.ini b/tox.ini index 0fd58c5c..66bdeb92 100644 --- a/tox.ini +++ b/tox.ini @@ -24,9 +24,7 @@ commands= [testenv:pep8] ignore = W504 -deps = - flake8 - {[testenv]deps} +deps = {[testenv]deps} commands= bash tools/flake8wrap.sh doc8 -e .rst doc/source diff --git a/working_materials/tabulate_scores.py b/working_materials/tabulate_scores.py index 26d59496..c0578b68 100755 --- a/working_materials/tabulate_scores.py +++ b/working_materials/tabulate_scores.py @@ -14,9 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -import re -import json import argparse +import json +import re import textwrap