Skip to content

Commit d17b72b

Browse files
committed
update test matrix back to 3.11
1 parent ca87285 commit d17b72b

File tree

6 files changed

+342
-70
lines changed

6 files changed

+342
-70
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111

1212
jobs:
1313
test:
14+
strategy:
15+
matrix:
16+
python-version: ["pypy3.11", "3.11", "3.12", "3.13"]
1417
name: test
1518
runs-on: ubuntu-latest
1619
steps:
@@ -19,10 +22,13 @@ jobs:
1922
with:
2023
fetch-depth: 0
2124

22-
- name: Set up Python 3.13
25+
- name: Set up Python ${{ matrix.python-version }}
2326
uses: actions/setup-python@v4
2427
with:
25-
python-version: "3.13"
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Display Python version
31+
run: python -c "import sys; print(sys.version)"
2632

2733
- name: Install PDM
2834
run: |

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ _cov_html
6565
secrets.json
6666
tokens.json
6767
TODO.md
68-
68+
.tool-versions

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
1111
[![Doc style: MDformat](https://img.shields.io/badge/doc_style-mdformat-1c55ff?style=flat)](https://mdformat.readthedocs.io/en/stable/)
1212

13-
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/release/python-3130/)
13+
[![PyPy 3.11](https://img.shields.io/badge/pypy-3.11-4bb2c5.svg)](https://doc.pypy.org/en/latest/release-v7.3.17.html)
14+
[![Python 3.11](https://img.shields.io/badge/python-3.11-1e405d.svg)](https://www.python.org/downloads/release/python-3110/)
15+
[![Python 3.12](https://img.shields.io/badge/python-3.12-1e405d.svg)](https://www.python.org/downloads/release/python-3120/)
16+
[![Python 3.13](https://img.shields.io/badge/python-3.13-1e405d.svg)](https://www.python.org/downloads/release/python-3130/)
1417

1518
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
1619

@@ -19,7 +22,7 @@ OAuth2 PKCE authentication and resource-based API interactions.
1922

2023
## Installation
2124

22-
This package requires Python 3.13 (or later, when there is a later).
25+
Requires Python 3.11 or later
2326

2427
Once published, install like this:
2528

fitbit_client/resources/intraday.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def get_activity_intraday_by_interval(
374374
IntradayDetailLevel.FIVE_MINUTES,
375375
IntradayDetailLevel.FIFTEEN_MINUTES,
376376
]
377-
if detail_level not in IntradayDetailLevel:
377+
if detail_level not in valid_levels:
378378
raise IntradayValidationException(
379379
message="Invalid detail level",
380380
field_name="detail_level",
@@ -532,11 +532,12 @@ def get_heartrate_intraday_by_date(
532532
Personal applications automatically have access to intraday data.
533533
Other application types require special approval from Fitbit.
534534
"""
535-
if detail_level not in IntradayDetailLevel:
535+
valid_levels = list(IntradayDetailLevel)
536+
if detail_level not in valid_levels:
536537
raise IntradayValidationException(
537538
message="Invalid detail level",
538539
field_name="detail_level",
539-
allowed_values=[l.value for l in IntradayDetailLevel],
540+
allowed_values=[l.value for l in valid_levels],
540541
resource_name="heart rate",
541542
)
542543

0 commit comments

Comments
 (0)