Skip to content

Allow table_guid to be None when searching for and deleting list items #417

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

Merged
merged 9 commits into from
May 12, 2025

Conversation

Andy-Grigg
Copy link
Contributor

Closes #409

Allow table_guid to be set to None when instantiating a RecordListItem object. Document the conditions under which it is permissible to set the guid to None and validate that it is not set to None when not permitted, i.e. when adding items to a list.

It's not possible to give table_guid a default value of None without re-ordering the arguments, because record_history_guid is not optional. I have therefore documented the type explicitly as str | None, to indicate that it can be provided as either a string or None, but must be provided as one of these values.

If a RecordListItem is empty and it is passed to the add_items_to_list method, raise a ValueError. It is unfortunate that we cannot raise the exception earlier, but we don't know what the RecordListItem will be used for when it is instantiated.

@github-actions github-actions bot added the enhancement New features or code improvements label May 8, 2025
@Andy-Grigg Andy-Grigg changed the title Allow table_guid to be None when searching and deleting list items Allow table_guid to be None when searching for and deleting list items May 8, 2025
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.61%. Comparing base (294be93) to head (79328e5).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #417      +/-   ##
==========================================
+ Coverage   99.58%   99.61%   +0.02%     
==========================================
  Files           4        4              
  Lines         726      778      +52     
==========================================
+ Hits          723      775      +52     
  Misses          3        3              
Flag Coverage Δ
integration-ubuntu-latest-24.1 48.97% <66.66%> (+1.72%) ⬆️
integration-ubuntu-latest-24.2 79.04% <83.33%> (+0.39%) ⬆️
integration-ubuntu-latest-25.1 79.04% <83.33%> (+0.39%) ⬆️
integration-ubuntu-latest-25.2 85.73% <83.33%> (-0.64%) ⬇️
unittests 94.47% <100.00%> (-1.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Andy-Grigg Andy-Grigg merged commit 32588db into main May 12, 2025
49 checks passed
@Andy-Grigg Andy-Grigg deleted the feat/allow-optional-table-guid branch May 12, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow table_guid parameter on RecordListItem to be omitted when created by user
3 participants