diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 5b7424e..381473d 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -21,8 +21,4 @@ jobs: - name: Lint run: | cd basic_games - poetry run black . --check --diff - poetry run isort -c . - poetry run mypy . - poetry run ruff . - poetry run pyright . + poetry run poe lint-all diff --git a/poetry.lock b/poetry.lock index 1667f60..2259db9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -267,6 +267,17 @@ files = [ {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] + [[package]] name = "pathspec" version = "0.11.2" @@ -293,6 +304,24 @@ files = [ docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] +[[package]] +name = "poethepoet" +version = "0.23.0" +description = "A task runner that works well with poetry." +optional = false +python-versions = ">=3.8" +files = [ + {file = "poethepoet-0.23.0-py3-none-any.whl", hash = "sha256:d573ff31d7678e62b6f9bc9a1291ae2009ac14e0eead0a450598f9f05abb27a3"}, + {file = "poethepoet-0.23.0.tar.gz", hash = "sha256:62a0a6a518df5985c191aee0c1fcd2bb6a0a04eb102997786fcdf118e4147d22"}, +] + +[package.dependencies] +pastel = ">=0.2.1,<0.3.0" +tomli = ">=1.2.2" + +[package.extras] +poetry-plugin = ["poetry (>=1.0,<2.0)"] + [[package]] name = "psutil" version = "5.8.0" @@ -470,6 +499,17 @@ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "types-psutil" version = "5.9.5.16" @@ -506,4 +546,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "08559c779e515410d43f943d96594448d4b4634a141bd0af2cf720eb7d80f619" +content-hash = "dd1f302247f70f8e0f6dbf48824a132862774f75b623444c98e16c0f5d2a8789" diff --git a/pyproject.toml b/pyproject.toml index a1b9c71..3bbf9e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,11 +27,28 @@ isort = "^5.12.0" black = "^23.9.1" flake8-black = "^0.3.6" types-psutil = "^5.9.5.16" +poethepoet = "^0.23.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" +[tool.poe.tasks] +lint-black = "black --check --diff ." +lint-isort = "isort -c ." +lint-mypy = "mypy ." +lint-ruff = "ruff ." +lint-pyright = "pyright ." + +lint-all.sequence = [ + "lint-black", + "lint-isort", + "lint-mypy", + "lint-ruff", + "lint-pyright", +] +lint-all.ignore_fail = "return_non_zero" + [tool.flake8] max-line-length = 88 extend-ignore = ["E203"]