Repository navigation
Code quality review: final cleanup and mypy scope (#79, #81) - #82
Merged
Merged
Conversation
- drop the unused _KNOWN_COMPONENTS and _register_developer_field aliases - move project_records test scaffolding out of compatibility - keep TIMESTAMP_FIELD_ID in wire.model instead of three modules - share crc16_chunks between FitFile and FitFileBuilder - read STRING fields by field size instead of buffer length Amp-Thread-ID: https://ampcode.com/threads/T-01a180a3-b0f6-711b-bca9-09e4a1f830d0 Co-authored-by: Amp <amp@ampcode.com>
The config advertised disallow_untyped_defs for every non-generated module while CI relaxed all of those flags and checked three files. List the checked files in [tool.mypy].files and run bare mypy in CI so the config and the gate agree. Expanding the list is tracked in #79. Amp-Thread-ID: https://ampcode.com/threads/T-01a180a3-b0f6-711b-bca9-09e4a1f830d0 Co-authored-by: Amp <amp@ampcode.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
==========================================
- Coverage 93.06% 93.03% -0.04%
==========================================
Files 46 46
Lines 2741 2728 -13
Branches 427 425 -2
==========================================
- Hits 2551 2538 -13
Misses 109 109
Partials 81 81 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
preserve= was ignored whenever options= was supplied, and an explicit strict=False could not turn off options.strict. Merge kwargs over a base EncodeOptions in one path and use None (instead of a sentinel object) to mean "omitted", so explicit values always win. Amp-Thread-ID: https://ampcode.com/threads/T-01a180a3-b0f6-711b-bca9-09e4a1f830d0 Co-authored-by: Amp <amp@ampcode.com>
shaonianche
added a commit
that referenced
this pull request
Oct 28, 2026
Bump the package version to 0.9.17 and fold the pending news fragments into the release section: FIT protocol 2.0 headers (#78), explicit encode kwargs overriding EncodeOptions (#82), Garmin FIT SDK profile 21.218.0 (#68), and the Python 3.15 CI matrix (#python-315). Amp-Thread-ID: https://ampcode.com/threads/T-01a180f7-8bdd-77a3-bedc-fcca2ad4bd20 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from the 2026-10-28 code quality review. Nine of the eleven review issues (#71–#78, #80) already landed on
main; this PR carries the remaining commits and closes out the whole set.[tool.mypy].fileslists the checked modules and CI runs baremypyinstead of relaxing every flag on the command line._KNOWN_COMPONENTS/_register_developer_fieldaliases, keep oneTIMESTAMP_FIELD_ID, sharecrc16_chunksbetweenFitFileandFitFileBuilder, read STRING fields by field size, and moveproject_recordstest scaffolding out ofcompatibility.to_bytesoption merging intoresolve_encode_options#72 follow-up — explicit encode kwargs now win overEncodeOptions:preserve=is honored whenoptions=is also given,strict=Falsecan turn offoptions.strict, and the_CHECK_CRC_UNSETsentinel is replaced byNonedefaults.Review issues
Closes #71
Closes #72
Closes #73
Closes #74
Closes #75
Closes #76
Closes #77
Closes #78
Closes #79
Closes #80
Closes #81
Verification
uv run ruff check fit_tool— cleanuv run mypy— 3 files, successuv run pytest -q— 447 passed, 1 skipped