Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding logic to handle prop that end in "ref(s)" #47

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

ryantxu1
Copy link
Contributor

Resolves issue #46

If substring "ref(s)" in the property name, it generates a ListProperty with a subclass of ReferenceProperty, solving the ValueError. It detects the valid_type by looking at the spec's stix-type

@ryantxu1 ryantxu1 force-pushed the issue-46-custom-spec-valueerror branch from 5e9b7a8 to 38dbd3a Compare October 16, 2023 14:56
@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2023

Codecov Report

Merging #47 (4d0922d) into main (04df298) will decrease coverage by 0.05%.
Report is 2 commits behind head on main.
The diff coverage is 77.77%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   90.54%   90.50%   -0.05%     
==========================================
  Files          35       35              
  Lines        3470     3474       +4     
==========================================
+ Hits         3142     3144       +2     
- Misses        328      330       +2     
Files Coverage Δ
stix2generator/stixcustom.py 88.70% <77.77%> (-2.67%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ejratl
Copy link
Contributor

ejratl commented Oct 16, 2023

Thanks for the bug report and the PR! The build failure is caused by a style issue:

./stix2generator/stixcustom.py:75:1: W293 blank line contains whitespace

@ejratl ejratl merged commit afbe459 into oasis-open:main Oct 16, 2023
5 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.

3 participants