Skip to content

Commit 05093a6

Browse files
committed
Makefile: Add python black style check
to keep the formatting correct add python black to the "make check". As black does not cooperate with autopep on some style options let's expand the default --disable-lint options in our inspektor and rely on black. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
1 parent a33d2a8 commit 05093a6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ rpm-release: srpm-release
7272
mock -r $(MOCK_CONFIG) --resultdir BUILD/RPM -D "rel_build 1" --rebuild BUILD/SRPM/python-aexpect-$(VERSION)-*.src.rpm
7373

7474
check: clean
75-
inspekt checkall --disable-lint R0917,R0205,W4901,W0703,W0511 --exclude .venv*
75+
inspekt checkall --disable-lint R0917,R0205,R0801,W4901,W0703,W0511 --disable-style E203,E501,E265,W601,E402 --exclude .venv*
76+
$(PYTHON) -m black --line-length 79 --check -- $(shell git ls-files -- "*.py")
7677
$(PYTHON) -m pip install -e .
7778
$(PYTHON) -m pytest tests
7879

requirements-travis.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ setuptools==80.8.0
22
pycodestyle==2.13.0
33
inspektor==0.5.3
44
pytest==8.3.5
5+
black==24.4.2

0 commit comments

Comments
 (0)