Start linting with mypy
This commit is contained in:
parent
ceb40ee216
commit
3dbc1205d0
|
@ -4,6 +4,7 @@ include ../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := libretimeapi
|
PYLINT_ARG := libretimeapi
|
||||||
|
MYPY_ARG := libretimeapi
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -34,6 +34,7 @@ setup(
|
||||||
],
|
],
|
||||||
"dev": [
|
"dev": [
|
||||||
"psycopg2-binary",
|
"psycopg2-binary",
|
||||||
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,7 @@ include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := airtime-celery
|
PYLINT_ARG := airtime-celery
|
||||||
|
MYPY_ARG := airtime-celery
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -26,6 +26,7 @@ setup(
|
||||||
extras_require={
|
extras_require={
|
||||||
"prod": [],
|
"prod": [],
|
||||||
"dev": [
|
"dev": [
|
||||||
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,9 +4,10 @@ include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := airtime_analyzer tests
|
PYLINT_ARG := airtime_analyzer tests
|
||||||
|
MYPY_ARG := airtime_analyzer tests
|
||||||
PYTEST_ARG := --cov=airtime_analyzer tests
|
PYTEST_ARG := --cov=airtime_analyzer tests
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
|
|
||||||
fixtures:
|
fixtures:
|
||||||
bash tests/fixtures/generate.sh
|
bash tests/fixtures/generate.sh
|
||||||
|
|
|
@ -37,6 +37,7 @@ setup(
|
||||||
"prod": [],
|
"prod": [],
|
||||||
"dev": [
|
"dev": [
|
||||||
"distro",
|
"distro",
|
||||||
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"pytest-cov",
|
"pytest-cov",
|
||||||
|
|
|
@ -4,8 +4,9 @@ include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := api_clients tests
|
PYLINT_ARG := api_clients tests
|
||||||
|
MYPY_ARG := api_clients tests
|
||||||
PYTEST_ARG := --cov=api_clients tests
|
PYTEST_ARG := --cov=api_clients tests
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
test: .pytest
|
test: .pytest
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -26,6 +26,7 @@ setup(
|
||||||
extras_require={
|
extras_require={
|
||||||
"prod": [],
|
"prod": [],
|
||||||
"dev": [
|
"dev": [
|
||||||
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"pytest-cov",
|
"pytest-cov",
|
||||||
|
|
|
@ -4,6 +4,7 @@ include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := liquidsoap pypo
|
PYLINT_ARG := liquidsoap pypo
|
||||||
|
MYPY_ARG := liquidsoap pypo
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -40,6 +40,7 @@ setup(
|
||||||
extras_require={
|
extras_require={
|
||||||
"prod": [],
|
"prod": [],
|
||||||
"dev": [
|
"dev": [
|
||||||
|
"mypy",
|
||||||
"pylint",
|
"pylint",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,8 +4,9 @@ include python.mk
|
||||||
|
|
||||||
PIP_INSTALL := -r requirements-dev.txt
|
PIP_INSTALL := -r requirements-dev.txt
|
||||||
PYLINT_ARG := tools
|
PYLINT_ARG := tools
|
||||||
|
MYPY_ARG := .
|
||||||
PYTEST_ARG := .
|
PYTEST_ARG := .
|
||||||
|
|
||||||
lint: .pylint
|
lint: .pylint .mypy
|
||||||
test: .pytest
|
test: .pytest
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -5,6 +5,7 @@ CPU_CORES := $(shell nproc)
|
||||||
|
|
||||||
# PIP_INSTALL := --editable .[dev]
|
# PIP_INSTALL := --editable .[dev]
|
||||||
# PYLINT_ARG :=
|
# PYLINT_ARG :=
|
||||||
|
# MYPY_ARG :=
|
||||||
# PYTEST_ARG :=
|
# PYTEST_ARG :=
|
||||||
|
|
||||||
VENV := venv
|
VENV := venv
|
||||||
|
@ -19,6 +20,11 @@ $(VENV):
|
||||||
source $(VENV)/bin/activate
|
source $(VENV)/bin/activate
|
||||||
pylint --output-format=colorized $(PYLINT_ARG) || true
|
pylint --output-format=colorized $(PYLINT_ARG) || true
|
||||||
|
|
||||||
|
.PHONY: .mypy
|
||||||
|
.mypy: $(VENV)
|
||||||
|
source $(VENV)/bin/activate
|
||||||
|
mypy $(MYPY_ARG) || true
|
||||||
|
|
||||||
.PHONY: .pytest
|
.PHONY: .pytest
|
||||||
.pytest: $(VENV)
|
.pytest: $(VENV)
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
mypy
|
||||||
pylint
|
pylint
|
||||||
pytest
|
pytest
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
|
|
Loading…
Reference in New Issue