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

Adds checks for applicable types to YAMLData* #821

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Conversation

skrawcz
Copy link
Collaborator

@skrawcz skrawcz commented Apr 15, 2024

Some fun facts:

Union[int, float, bool] == Union[(int, float, bool)]

So just needed to change the types to be a tuple
rather than a list, and then things work in a DRY way.

We could just want dict & list (since that is most likely from an actual user setting) -- you're likely not going to just save values, but in some sort of list or dict...

Changes

  • yaml_extensions.py
  • test_yaml_extenstions.py

How I tested this

  • locally

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

Some fun facts:

```python
Union[int, float, bool] == Union[(int, float, bool)]
```

So just needed to change the types to be a tuple
rather than a list, and then things work in a DRY way.

We could just want dict & list (since that is most likely from
an actual user setting) -- you're likely not going to just
save values, but in some sort of list or dict...
@skrawcz skrawcz merged commit f2dbb81 into main Apr 15, 2024
23 checks passed
@skrawcz skrawcz deleted the add_adapter_tests branch April 15, 2024 06:40
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