Skip to content

Handle invalid versions in valid()#54

Merged
podhmo merged 1 commit into
podhmo:masterfrom
StantonMatt:codex/valid-invalid-version-none
Jun 23, 2026
Merged

Handle invalid versions in valid()#54
podhmo merged 1 commit into
podhmo:masterfrom
StantonMatt:codex/valid-invalid-version-none

Conversation

@StantonMatt

@StantonMatt StantonMatt commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • return None from valid() when parse() cannot build a semantic version
  • add regression coverage for invalid version strings in strict and loose modes

Fixes #42.

Tests

  • venv/bin/python -m pytest nodesemver/tests/test_regression.py -q
  • venv/bin/python -m pytest -q

@StantonMatt
StantonMatt marked this pull request as ready for review June 1, 2026 18:53
@podhmo
podhmo merged commit 3411bc0 into podhmo:master Jun 23, 2026
2 of 3 checks passed
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.

Unhandled AttributeError in parse() call

2 participants