Skip to content

fix(spec_object_parser): handle SPEC-OBJECT with no <VALUES> element#213

Merged
stanislaw merged 1 commit into
strictdoc-project:mainfrom
fNBU:fix/spec-object-missing-values
May 5, 2026
Merged

fix(spec_object_parser): handle SPEC-OBJECT with no <VALUES> element#213
stanislaw merged 1 commit into
strictdoc-project:mainfrom
fNBU:fix/spec-object-missing-values

Conversation

@fNBU

@fNBU fNBU commented May 5, 2026

Copy link
Copy Markdown
Contributor

ReqIF-1.2 §10.8.40 makes optional. The parser previously asserted that attributes is not None after parsing, which raised AssertionError on any SPEC-OBJECT without a child.

Replace the assert with an or [] fallback and tighten the return type from Optional[List[...]] to List[...].

Add test_03_missing_values_element to cover this case.

ReqIF-1.2 §10.8.40 makes <VALUES> optional. The parser previously
asserted that attributes is not None after parsing, which raised
AssertionError on any SPEC-OBJECT without a <VALUES> child.

Replace the assert with an `or []` fallback and tighten the return
type from Optional[List[...]] to List[...].

Add test_03_missing_values_element to cover this case.
@stanislaw
stanislaw merged commit 108fffb into strictdoc-project:main May 5, 2026
9 checks passed
@stanislaw

Copy link
Copy Markdown
Contributor

Thanks!

@stanislaw

Copy link
Copy Markdown
Contributor

@fNBU would you like a release right away/soon, or you are preparing more patches like this?

@fNBU

fNBU commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

There will probably be more. Me and my colleagues don't need a release in order to use the changes, so it's up to you.

@stanislaw

Copy link
Copy Markdown
Contributor

There will probably be more. Me and my colleagues don't need a release in order to use the changes, so it's up to you.

Nice, thanks for contributing!

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.

3 participants