File: python.mk

package info (click to toggle)
pacemaker 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 68,576 kB
  • sloc: xml: 160,564; ansic: 143,744; python: 5,670; sh: 2,969; makefile: 2,426
file content (31 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# Copyright 2024 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
# This source code is licensed under the GNU General Public License version 2
# or later (GPLv2+) WITHOUT ANY WARRANTY.
#

.PHONY: pylint
pylint: $(PYCHECKFILES)
	PYTHONPATH=$(abs_top_builddir)/python \
	pylint --rcfile $(top_srcdir)/python/pylintrc $(PYCHECKFILES)

# Disabled warnings:
# W503 - Line break occurred before a binary operator
#        (newer versions of pyflake and PEP8 want line breaks after binary
#        operators, but older versions still suggest before)
# E402 - Module level import not at top of file
# 	 (pylint already warns about this, and we shouldn't need to add
# 	 ignore pragmas for two tools)
# E501 - Line too long
# F401 - Imported but not used
# 	 (pylint already warns about this, and we shouldn't need to add
# 	 ignore pragmas for two tools)
#
# Disable docstrings warnings on unit tests.
.PHONY: pyflake
pyflake: $(PYCHECKFILES)
	PYTHONPATH=$(abs_top_builddir)/python \
	flake8 --ignore=W503,E402,E501,F401 --per-file-ignores="tests/*:D100,D101,D102,D104" $(PYCHECKFILES)