Bump min Python version to 3.7.

Because I do no longer have a 3.6 on my machine to test it.
This commit is contained in:
Julien Palard 2023-11-20 11:57:44 +01:00
parent b164f089d6
commit c26878af0b
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
5 changed files with 6 additions and 50 deletions

1
.github/FUNDING.yml vendored
View File

@ -1 +0,0 @@
github: JulienPalard

View File

@ -1,44 +0,0 @@
---
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Run tox
runs-on: ubuntu-latest
strategy:
matrix:
tox:
- py_version: '3.6'
env: py36
- py_version: '3.7'
env: py37
- py_version: '3.8'
env: py38,flake8,mypy,black,pylint,pydocstyle,coverage
- py_version: '3.9'
env: py39
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.tox.py_version }}
- uses: actions/cache@v2
with:
path: .tox
key: ${{ matrix.tox.python-version }}-${{ hashFiles('tox.ini') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y hunspell
- name: Install tox
run: python3 -m pip install tox
- name: Run tox
run: tox -q -p all -e ${{ matrix.tox.env }}

View File

@ -28,6 +28,7 @@ __version__ = "1.3"
DEFAULT_DROP_CAPITALIZED = {"fr": True, "fr_FR": True}
Error = Tuple[str, int, str]
input_line = collections.namedtuple("input_line", "filename line text")
@ -326,7 +327,7 @@ def look_like_a_word(word):
return True
def run_hunspell(language, personal_dict, input_lines):
def run_hunspell(language, personal_dict, input_lines) -> List[Error]:
"""Run hunspell over the given input lines."""
personal_dict_arg = ["-p", personal_dict] if personal_dict else []
try:
@ -399,7 +400,7 @@ def spell_check(
return len(errors)
def parse_hunspell_output(inputs, outputs) -> List[Tuple[str, int, str]]:
def parse_hunspell_output(inputs, outputs) -> List[Error]:
"""Parse `hunspell -a` output and collect all errors."""
# skip first line of hunspell output (it's the banner)
outputs = iter(outputs[1:])

View File

@ -24,7 +24,7 @@ classifiers = [
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
requires-python = ">= 3.6"
requires-python = ">= 3.7"
dependencies = [
"polib",
"docutils>=0.18",

View File

@ -23,7 +23,7 @@ exclude_lines =
[tox]
envlist = py37, py38, py39, py310, py311, flake8, mypy, black, pylint, pydocstyle, coverage
envlist = py37, py38, py39, py310, py311, py312, flake8, mypy, black, pylint, pydocstyle, coverage
isolated_build = True
skip_missing_interpreters = True
@ -36,7 +36,7 @@ setenv =
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
[testenv:coverage]
depends = py36, py37, py38, py39
depends = py37, py38, py39, py310, py312
parallel_show_output = True
deps = coverage
skip_install = True