diff --git a/.github/workflows/lint-test-docs.yml b/.github/workflows/lint-test-docs.yml index 47bedd5..1254062 100644 --- a/.github/workflows/lint-test-docs.yml +++ b/.github/workflows/lint-test-docs.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11","pypy3.7", "pypy3.8", "pypy3.9"] steps: - uses: actions/checkout@v3 @@ -27,4 +27,4 @@ jobs: python -m pytest - name: Build docs run: | - python -m sphinx-build -b html docs docs/_build/html + python -m sphinx.cmd.build -b html docs docs/_build/html diff --git a/pyproject.toml b/pyproject.toml index 7704bf5..1038cbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ {name = "Bruno M. Custódio"}, ] readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.7" dependencies = [ ] @@ -22,8 +22,8 @@ repository = "https://github.com/frederickjansen/polyline" [project.optional-dependencies] dev = [ "pytest~=7.0", - "pytest-cov~=4.0.0", - "pylint~=2.14.0", + "pytest-cov~=4.0", + "pylint~=2.15.10", "sphinx~=4.2.0", "sphinx-rtd-theme~=1.0.0", "toml~=0.10.2", diff --git a/src/polyline/polyline.py b/src/polyline/polyline.py index 8143870..10fbd76 100644 --- a/src/polyline/polyline.py +++ b/src/polyline/polyline.py @@ -4,6 +4,7 @@ import io import itertools import math +from typing import List def _pcitr(iterable): @@ -43,7 +44,7 @@ def _trans(value, index): return ~(result >> 1) if comp else (result >> 1), index -def decode(expression: str, precision: int = 5, geojson: bool = False) -> list[tuple[float, float]]: +def decode(expression: str, precision: int = 5, geojson: bool = False) -> List[tuple[float, float]]: """ Decode a polyline string into a set of coordinates. @@ -68,7 +69,7 @@ def decode(expression: str, precision: int = 5, geojson: bool = False) -> list[t return coordinates -def encode(coordinates: list[tuple[float, float]], precision: int = 5, geojson: bool = False) -> str: +def encode(coordinates: List[tuple[float, float]], precision: int = 5, geojson: bool = False) -> str: """ Encode a set of coordinates in a polyline string.