Skip to content

settings: share settings.native() between pump() and Auto - #140

Merged
davanstrien merged 2 commits into
mainfrom
unify-settings-native
Dec 3, 2026
Merged

davanstrien merged 2 commits into
mainfrom
unify-settings-native

Conversation

@davanstrien

Copy link
Copy Markdown
Owner

Follow-up to #138: removes the duplicate _infinite() and _native() helpers in saturate/__init__.py and routes pump()'s setting coercion through settings.native(..., allow_zero_underflow=False).

  • saturate/settings.py: extends _infinite() to match pump()'s handling of Decimal, Integral/Fraction, and NumPy floats; adds allow_zero_underflow: bool = True to native() / coerce() so durations where 0 means no timer still refuse positive values that underflow to 0.0.
  • saturate/__init__.py: drops duplicate _infinite() / _native() and unused numbers / Decimal / Fraction / math imports (-33/+17 net lines).

Verification

  • ruff check . & ruff format --check .: passed
  • ty check saturate tests: passed
  • pytest tests/test_pump_settings.py tests/test_controller_properties.py -q: 81 passed

@davanstrien
davanstrien merged commit 15ff02b into main Dec 3, 2026
18 checks passed
@davanstrien
davanstrien deleted the unify-settings-native branch December 3, 2026 10:36
@davanstrien davanstrien mentioned this pull request Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant