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:
parent
b164f089d6
commit
c26878af0b
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
|
@ -1 +0,0 @@
|
||||||
github: JulienPalard
|
|
44
.github/workflows/tests.yml
vendored
44
.github/workflows/tests.yml
vendored
|
@ -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 }}
|
|
|
@ -28,6 +28,7 @@ __version__ = "1.3"
|
||||||
|
|
||||||
DEFAULT_DROP_CAPITALIZED = {"fr": True, "fr_FR": True}
|
DEFAULT_DROP_CAPITALIZED = {"fr": True, "fr_FR": True}
|
||||||
|
|
||||||
|
Error = Tuple[str, int, str]
|
||||||
|
|
||||||
input_line = collections.namedtuple("input_line", "filename line text")
|
input_line = collections.namedtuple("input_line", "filename line text")
|
||||||
|
|
||||||
|
@ -326,7 +327,7 @@ def look_like_a_word(word):
|
||||||
return True
|
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."""
|
"""Run hunspell over the given input lines."""
|
||||||
personal_dict_arg = ["-p", personal_dict] if personal_dict else []
|
personal_dict_arg = ["-p", personal_dict] if personal_dict else []
|
||||||
try:
|
try:
|
||||||
|
@ -399,7 +400,7 @@ def spell_check(
|
||||||
return len(errors)
|
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."""
|
"""Parse `hunspell -a` output and collect all errors."""
|
||||||
# skip first line of hunspell output (it's the banner)
|
# skip first line of hunspell output (it's the banner)
|
||||||
outputs = iter(outputs[1:])
|
outputs = iter(outputs[1:])
|
||||||
|
|
|
@ -24,7 +24,7 @@ classifiers = [
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
]
|
]
|
||||||
requires-python = ">= 3.6"
|
requires-python = ">= 3.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"polib",
|
"polib",
|
||||||
"docutils>=0.18",
|
"docutils>=0.18",
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -23,7 +23,7 @@ exclude_lines =
|
||||||
|
|
||||||
|
|
||||||
[tox]
|
[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
|
isolated_build = True
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ setenv =
|
||||||
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
|
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
|
||||||
|
|
||||||
[testenv:coverage]
|
[testenv:coverage]
|
||||||
depends = py36, py37, py38, py39
|
depends = py37, py38, py39, py310, py312
|
||||||
parallel_show_output = True
|
parallel_show_output = True
|
||||||
deps = coverage
|
deps = coverage
|
||||||
skip_install = True
|
skip_install = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user