Skip to content

Commit

Permalink
Bump minimum Python version to 3.10 (#261)
Browse files Browse the repository at this point in the history
* Bump minimum Python version to 3.10

* Fix lint errors

* Bump version
  • Loading branch information
bieniu committed Oct 24, 2023
1 parent fb27da2 commit 81996c7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
4 changes: 2 additions & 2 deletions accuweather/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
def valid_coordinates(latitude: float | None, longitude: float | None) -> bool:
"""Return True if coordinates are valid."""
if (
isinstance(latitude, (int, float))
and isinstance(longitude, (int, float))
isinstance(latitude, int | float)
and isinstance(longitude, int | float)
and abs(latitude) <= MAX_LATITUDE
and abs(longitude) <= MAX_LONGITUDE
):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
asyncio_mode = "strict"

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
show_error_codes = true
follow_imports = "silent"
ignore_missing_imports = true
Expand All @@ -22,7 +22,7 @@ warn_unused_ignores = true
warn_unreachable = true

[tool.ruff]
target-version = "py39"
target-version = "py310"

select = [
"A", # flake8-builtins
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

PROJECT_DIR = Path(__file__).parent.resolve()
README_FILE = PROJECT_DIR / "README.md"
VERSION = "1.0.0"
VERSION = "2.0.0"

with open("requirements.txt", encoding="utf-8") as file:
requirements = file.read().splitlines()
Expand All @@ -22,17 +22,17 @@
license="Apache-2.0 License",
packages=["accuweather"],
package_data={"accuweather": ["py.typed"]},
python_requires=">=3.9",
python_requires=">=3.10",
install_requires=requirements,
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Typing :: Typed",
],
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[tox]
envlist = py39, py310, py311, py312, lint, typing, coverage
envlist = py310, py311, py312, lint, typing, coverage
skip_missing_interpreters = True

[gh-actions]
python =
3.9: py39, lint, typing, coverage
3.10: py310
3.10: py310, lint, typing, coverage
3.11: py311
3.12: py312

Expand Down

0 comments on commit 81996c7

Please sign in to comment.