From aff63245140600aefa1f00cf9b191d30cdb23597 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 6 Nov 2023 09:24:05 -0800 Subject: [PATCH] Upgrade Tox and fix flake issues. --- format_novel/format_novel.py | 4 ++-- tests/run-ci-tests | 5 ++--- tox.ini | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/format_novel/format_novel.py b/format_novel/format_novel.py index 69ebf41..ab088a5 100755 --- a/format_novel/format_novel.py +++ b/format_novel/format_novel.py @@ -7,8 +7,8 @@ import docx def expand_chapter_range(chapter_request): - if not '-' in chapter_request: - return (int(chapter_request),) + if '-' not in chapter_request: + return (int(chapter_request),) chapter_range = chapter_request.split('-') diff --git a/tests/run-ci-tests b/tests/run-ci-tests index f10a100..375b610 100755 --- a/tests/run-ci-tests +++ b/tests/run-ci-tests @@ -8,8 +8,7 @@ set -e apk add --no-cache python3 py3-pip # If certain dependencies of black are available in this version of Alpine, install them. -apk add --no-cache py3-typed-ast py3-regex || true -python3 -m pip install --upgrade pip==22.2.2 setuptools==65.3.0 -pip3 install --ignore-installed tox==3.25.1 +apk add --no-cache py3-typed-ast py3-regex py3-pip || true +pip3 install --ignore-installed tox==4.11.13 export COVERAGE_FILE=/tmp/.coverage tox --workdir /tmp/.tox --sitepackages diff --git a/tox.ini b/tox.ini index fdfbb0e..37a6322 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,12 @@ [tox] -envlist = py37,py38,py39,py310 +envlist = py38,py39,py310,py311 skip_missing_interpreters = True -skipsdist = True -minversion = 3.14.1 +package = editable +min_version = 4.0 [testenv] -usedevelop = True deps = -rtest_requirements.txt -passenv = COVERAGE_FILE +pass_env = COVERAGE_FILE commands = #pytest {posargs} py38,py39: black --check .