Skip to content

Commit

Permalink
Update Pylint version to fix Python 3.11 bug
Browse files Browse the repository at this point in the history
Add Python 3.7 again
  • Loading branch information
frederickjansen committed Jan 19, 2023
1 parent 56bf1d8 commit bf5caf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint-test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
{name = "Bruno M. Custódio"},
]
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.7"

dependencies = [
]
Expand All @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/polyline/polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import itertools
import math
from typing import List


def _pcitr(iterable):
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit bf5caf9

Please sign in to comment.