Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #21

Merged
merged 7 commits into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ jobs:
with:
max-line-length: "88" # match limit set by black
args: "--extend-ignore E203"
flake8-version: "6.1.0"
- name: isort
uses: isort/isort-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
unittests:
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11']
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ubuntu-latest

name: Unit tests, Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: '6.0.0'
rev: '6.1.0'
hooks:
- id: flake8
args: [--max-line-length=88, --extend-ignore=E203]
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
--------------------

0.8.2
^^^^^^^^^^^^^^^^^^^^
This adds support for Python 3.12.

0.8.1
^^^^^^^^^^^^^^^^^^^^
This makes the library compatible with mypy strict checking, and slightly cleans up the release workflow.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
Expand Down
2 changes: 1 addition & 1 deletion src/flightplandb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# Version of the flightplandb package
__version__ = "0.8.1"
__version__ = "0.8.2"

from . import api, datatypes, exceptions, internal, nav, plan, tags, user, weather

Expand Down
4 changes: 2 additions & 2 deletions src/flightplandb/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ class Plan:
cycle: Optional[Cycle] = None

def __post_init__(self) -> None:
if self.createdAt and type(self.createdAt) == str:
if self.createdAt and isinstance(self.createdAt, str):
self.createdAt = isoparse(self.createdAt)

if self.updatedAt and type(self.updatedAt) == str:
if self.updatedAt and isinstance(self.updatedAt, str):
self.updatedAt = isoparse(self.updatedAt)

if self.user and isinstance(self.user, dict):
Expand Down