Skip to content

Commit

Permalink
Add support for Python 3.8 (#37)
Browse files Browse the repository at this point in the history
* Add support for Python 3.8

* Use typing.List instead of list

* Sort imports
  • Loading branch information
binste authored Mar 10, 2024
1 parent 632edcb commit a7ff9b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_lint.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.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: py ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions altair_tiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import math
from dataclasses import dataclass
from typing import Final, Optional, Union, cast
from typing import Final, List, Optional, Union, cast

import altair as alt
import mercantile as mt
Expand Down Expand Up @@ -354,7 +354,7 @@ class _XYMinMax:
y_max: int


def _bounds_to_x_y_min_max(bounds: list[list[float]], zoom: int) -> _XYMinMax:
def _bounds_to_x_y_min_max(bounds: List[List[float]], zoom: int) -> _XYMinMax:
south_west, north_east = bounds
south, west = south_west
north, east = north_east
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ dependencies = ["altair", "xyzservices", "mercantile"]
description = "altair_tiles"
readme = "README.md"
keywords = ["altair", "basemaps", "tiles"]
requires-python = ">=3.9"
requires-python = ">=3.8"
dynamic = ["version"]
license-files = { paths = ["LICENSE"] }
classifiers = [
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -86,8 +87,11 @@ build-and-publish = ["clean", "build", "publish"]


[tool.ruff]
target-version = "py39"
target-version = "py38"
line-length = 88
exclude = [".git", "build", "__pycache__"]

[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
Expand Down Expand Up @@ -134,9 +138,8 @@ ignore = [
"ISC003",
"ISC001",
]
exclude = [".git", "build", "__pycache__"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# Allow assert statements in test files
"tests/**/*.py" = ["S101"]

Expand Down

0 comments on commit a7ff9b3

Please sign in to comment.