From 1e1a760da07939ee6ecb3b914fb8a0a9c1849e19 Mon Sep 17 00:00:00 2001 From: Yu Ming Zhu Date: Tue, 10 Dec 2019 00:27:52 +0000 Subject: [PATCH] `make flake8` targets and .flake8 config it requires ``` pip install flake8 pip install flake8-import-order ``` or ``` dnf install python3-flake8 python3-flake8-import-order ``` --- .flake8 | 20 ++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..65dba9aa --- /dev/null +++ b/.flake8 @@ -0,0 +1,20 @@ +[flake8] +select = I,C,F4 +ignore = F +exclude = .git, + __pycache__, + tests, + docs, + ./koji-* +filename = *.py + ./cli/koji + ./builder/kojid + ./builder/mergerepos + ./hub/rpmdiff + ./util/kojira + ./util/koji-gc + ./util/koji-shadow + ./util/koji-sweep-db + ./vm/kojivmd +application_import_names = koji,koji_cli,kojihub,kojiweb,__main__ +import_order_style = pep8 diff --git a/Makefile b/Makefile index a1b9496f..995b23f5 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,9 @@ pypi: pypi-upload: twine upload dist/* +flake8: + flake8 + tag:: git tag -a $(TAG) @echo "Tagged with: $(TAG)"