Skip to content

model.datatypes: Fix parsing of long and negative XSD years#586

Open
paul-gerber-svg wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/gyear-validation
Open

model.datatypes: Fix parsing of long and negative XSD years#586
paul-gerber-svg wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/gyear-validation

Conversation

@paul-gerber-svg

Copy link
Copy Markdown

Previously, _parse_xsd_gyear and _parse_xsd_gyearmonth in datatypes.py reject values with more than 4 digits or negative signs.

Now, the regexes support an optional minus sign and 4+ digits, and the parsers correctly handle the sign from match[1]. Unit tests were added.

Fixes #566

…ear values

Previously, `_parse_xsd_gyear` and `_parse_xsd_gyearmonth` in `datatypes.py` reject values with more than 4 digits or negative signs.

Now, the regexes support an optional minus sign and 4+ digits, and the parsers correctly handle the sign from `match[1]`. Unit tests were added.

Fixes eclipse-basyx#566
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