From 90125ea5ec54431bfafb504def8c4551e3d43fa4 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Wed, 21 Feb 2024 18:51:35 +0100 Subject: Specify minimum python version for tools in pyproject.toml --- .github/workflows/wee-slack.yml | 6 +++--- build.sh | 4 ++-- docs/contributing.md | 2 +- pyproject.toml | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wee-slack.yml b/.github/workflows/wee-slack.yml index d7e6fcf..fb6f3d7 100644 --- a/.github/workflows/wee-slack.yml +++ b/.github/workflows/wee-slack.yml @@ -24,11 +24,11 @@ jobs: - run: poetry install - - run: poetry run ruff format --check --target-version py37 + - run: poetry run ruff format --check - - run: poetry run ruff check --target-version py37 main.py slack tests typings + - run: poetry run ruff check main.py slack tests typings - - run: poetry run pyright --pythonversion 3.7 main.py slack tests typings + - run: poetry run pyright main.py slack tests typings - run: poetry run pytest tests diff --git a/build.sh b/build.sh index 3ec64a5..6ee3ede 100755 --- a/build.sh +++ b/build.sh @@ -20,6 +20,6 @@ contents="$(cat slack/python_compatibility.py slack/util.py slack/shared.py slac ruff_cmd="$(poetry run sh -c 'command -v ruff' 2>/dev/null || command -v ruff)" if [ -x "$ruff_cmd" ]; then - "$ruff_cmd" check -q --fix-only --target-version py37 build/slack.py - "$ruff_cmd" format -q --target-version py37 build/slack.py + "$ruff_cmd" check -q --fix-only build/slack.py + "$ruff_cmd" format -q build/slack.py fi diff --git a/docs/contributing.md b/docs/contributing.md index a9f4827..5584f0e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -30,7 +30,7 @@ The code is formatted with [`ruff`](https://docs.astral.sh/ruff/). To format all the files, first navigate to the project root, and then execute: ``` -$ ruff format --target-version py37 +$ ruff format ``` ## Linting diff --git a/pyproject.toml b/pyproject.toml index fd14017..3c32749 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ +[project] +requires-python = ">=3.7" + [tool.poetry] name = "wee-slack" version = "3.0.0" @@ -39,6 +42,7 @@ disable = [ ] [tool.pyright] +pythonVersion = "3.7" strict = ["**"] reportMissingModuleSource = false -- cgit