Skip to content

More type annotations, to_float() default fix - #62

Merged
zsimic merged 3 commits into
mainfrom
more-type-annotations
Oct 9, 2026
Merged

zsimic merged 3 commits into
mainfrom
more-type-annotations

Conversation

@zsimic

@zsimic zsimic commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Found while bringing pickley to zero type-checker findings:

  • Better type annotations: to_int(), to_float() (overloads on default), json_sanitized() (dict in -> dict out, sequence in -> list out), ClickRunner.context_wrapper (any context manager class) and ClickRunner.context
  • Bug fix: to_float() (and so Configuration.get_float()) returned default for any non-integer string when a default was given: to_float("1.5", default=0) yielded 0.0
  • Version.mm and Version.main are now empty strings (instead of None) when not applicable, so they're typed str (callers already gate with if v.mm:, and Version("") == Version(None))

ty, pyrefly, pyright and mypy remain at zero, coverage at 100%.

🤖 Generated with Claude Code

@zsimic
zsimic merged commit d7ecfcd into main Oct 9, 2026
8 checks passed
@zsimic
zsimic deleted the more-type-annotations branch October 9, 2026 17:08
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