mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
build-aux: skip E203 and W503 flake8 checks
The flake8 check W503 does not want a line break before binary operator. This is contrary to the style that the 'black' formatting tool wants to use. Defer to 'black' as it is intended to be an opinionated formatting tool standardizing python code style, and thus not to be customized per project. The flake8 check E203 does not want whitespace before a ':'. This is, however, desirable when indexing array slices eg self.lookahead[skip : skip + 1] which is a format that 'black' produces. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
07e18c18a4
commit
72a5ccedf0
@ -581,15 +581,22 @@ sc_prohibit_python_without_env:
|
|||||||
|
|
||||||
# We're intentionally ignoring a few warnings
|
# We're intentionally ignoring a few warnings
|
||||||
#
|
#
|
||||||
|
# E302: whitespace before ':'. This is something that is
|
||||||
|
# desirable when indexing array slices and is used by the
|
||||||
|
# 'black' formatting tool
|
||||||
|
#
|
||||||
# E501: Force breaking lines at < 80 characters results in
|
# E501: Force breaking lines at < 80 characters results in
|
||||||
# some really unnatural code formatting which harms
|
# some really unnatural code formatting which harms
|
||||||
# readability.
|
# readability.
|
||||||
#
|
#
|
||||||
|
# W503: line break before binary operator, because this
|
||||||
|
# is contrary to what 'black' formatting tool wants
|
||||||
|
#
|
||||||
# W504: Knuth code style requires the operators "or" and "and" etc
|
# W504: Knuth code style requires the operators "or" and "and" etc
|
||||||
# to be at the start of line in a multi-line conditional.
|
# to be at the start of line in a multi-line conditional.
|
||||||
# This the opposite to what is normal libvirt practice.
|
# This the opposite to what is normal libvirt practice.
|
||||||
#
|
#
|
||||||
FLAKE8_IGNORE = E501,W504
|
FLAKE8_IGNORE = E203,E501,W503,W504
|
||||||
|
|
||||||
sc_flake8:
|
sc_flake8:
|
||||||
@if [ -n "$(FLAKE8)" ]; then \
|
@if [ -n "$(FLAKE8)" ]; then \
|
||||||
|
Loading…
Reference in New Issue
Block a user