From 782f4053069bc72414445f39ca44c9af46c783e0 Mon Sep 17 00:00:00 2001 From: Alexander Burmak Date: Wed, 26 Jul 2023 12:55:50 +0300 Subject: [PATCH] Enable mypy (#30) --- .github/workflows/workflow.yml | 7 ++----- Makefile | 9 +++++++-- pyproject.toml | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 45ac928a..59e0e14e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -22,11 +22,8 @@ jobs: run: make flake8 - name: "lint: pylint" run: make pylint - # Temporarily disabled due to bugs in typing in click library - # https://github.com/pallets/click/pull/2559 - # https://github.com/python/mypy/issues/13250 - # https://github.com/python/mypy/issues/13449 - #- {name: "lint: mypy", run: make mypy } + - name: "lint: mypy" + run: make mypy push_to_dockerhub: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 111a3f39..d45507b8 100644 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ clean: .PHONY: lint -lint: isort black flake8 pylint +lint: isort black flake8 pylint mypy .PHONY: isort isort: @@ -151,6 +151,10 @@ pylint: pylint src pylint --disable=missing-docstring tests +.PHONY: mypy +mypy: + mypy src tests + .PHONY: format format: isort . @@ -160,11 +164,12 @@ format: .PHONY: help help: @echo "Base targets:" - @echo " lint Run linters. Alias for \"isort black flake8 pylint\"." + @echo " lint Run linters. Alias for \"isort black flake8 pylint mypy\"." @echo " isort Perform isort checks." @echo " black Perform black checks." @echo " flake8 Perform flake8 checks." @echo " pylint Perform pylint checks." + @echo " mypy Perform mypy checks." @echo " format Re-format source code to conform style settings enforced by" @echo " isort and black tools." @echo " prepare-changelog Add an autobuild version entity to changelog" diff --git a/pyproject.toml b/pyproject.toml index 1572bf51..80ae699a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,6 @@ test = [ "types-tabulate", "types-pyOpenSSL", "types-setuptools", -#bandit = "*" "behave", "docker", "docker-compose",