Skip to content

Commit

Permalink
Merge pull request #21 from PH-KDX/support-python-312
Browse files Browse the repository at this point in the history
Support Python 3.12
  • Loading branch information
PH-KDX authored Dec 24, 2023
2 parents 6094af7 + 41ad820 commit 5fd6ca4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
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

0 comments on commit 5fd6ca4

Please sign in to comment.